MCPcopy Create free account
hub / github.com/NVIDIA/NeMo-Relay / pop_scope

Function pop_scope

crates/python/src/py_api/mod.rs:267–285  ·  view source on GitHub ↗
(
    handle: &PyScopeHandle,
    output: Option<&Bound<'_, PyAny>>,
    metadata: Option<&Bound<'_, PyAny>>,
    timestamp: Option<&Bound<'_, PyAny>>,
)

Source from the content-addressed store, hash-verified

265#[pyfunction]
266#[pyo3(signature = (handle: "ScopeHandle", output: "object | None"=None, metadata: "object | None"=None, timestamp: "datetime.datetime | None"=None) -> "None", text_signature = "(handle: ScopeHandle, output: object | None = None, metadata: object | None = None, timestamp: datetime.datetime | None = None) -> None")]
267fn pop_scope(
268 handle: &PyScopeHandle,
269 output: Option<&Bound<'_, PyAny>>,
270 metadata: Option<&Bound<'_, PyAny>>,
271 timestamp: Option<&Bound<'_, PyAny>>,
272) -> PyResult<()> {
273 let output = opt_py_to_json(output)?;
274 let metadata = opt_py_to_json(metadata)?;
275 let timestamp = opt_py_to_timestamp(timestamp)?;
276 core_scope_api::pop_scope(
277 core_scope_api::PopScopeParams::builder()
278 .handle_uuid(&handle.inner.uuid)
279 .output_opt(output)
280 .metadata_opt(metadata)
281 .timestamp_opt(timestamp)
282 .build(),
283 )
284 .map_err(to_py_err)
285}
286
287/// Emit a ``Mark`` event under the current or specified scope.
288///

Calls 3

opt_py_to_jsonFunction · 0.85
opt_py_to_timestampFunction · 0.85
buildMethod · 0.45