Return a run snapshot by ID, or None when it is unknown.
(&self, py: Python<'_>, run_id: String)
| 1812 | |
| 1813 | /// Return a run snapshot by ID, or None when it is unknown. |
| 1814 | fn run_snapshot(&self, py: Python<'_>, run_id: String) -> PyResult<PyObject> { |
| 1815 | let session = self.inner.clone(); |
| 1816 | let snapshot = |
| 1817 | py.allow_threads(move || get_runtime().block_on(session.run_snapshot(&run_id))); |
| 1818 | let json = serde_json::to_string(&snapshot).map_err(|e| { |
| 1819 | PyRuntimeError::new_err(format!("Failed to serialize run snapshot: {e}")) |
| 1820 | })?; |
| 1821 | json_string_to_py(py, &json) |
| 1822 | } |
| 1823 | |
| 1824 | /// Return recorded runtime events for a run. |
| 1825 | fn run_events(&self, py: Python<'_>, run_id: String) -> PyResult<PyObject> { |
nothing calls this directly
no test coverage detected