Skip to navigation

nemo_gym.web.artifacts

View as MarkdownOpen in Claude

Backend-neutral artifact persistence for web rollouts.

Module Contents

Classes

NameDescription
WebArtifactStorePersist screenshots and recordings without depending on a browser backend.

Functions

NameDescription
_png_bytes-
_safe_component-

Data

_SAFE_COMPONENT

API

class nemo_gym.web.artifacts.WebArtifactStore(
root: str | pathlib.Path,
inline_screenshots: bool = True
)

Persist screenshots and recordings without depending on a browser backend.

root
= Path(root).expanduser().resolve()
nemo_gym.web.artifacts.WebArtifactStore.recording_artifacts(
session_id: str

Return finalized, non-empty recordings for a closed browser session.

nemo_gym.web.artifacts.WebArtifactStore.save_screenshot(
session_id: str,
step: int,
image: typing.Any,
suffix: str = ''
nemo_gym.web.artifacts.WebArtifactStore.session_dir(
session_id: str
) -> pathlib.Path
nemo_gym.web.artifacts._png_bytes(
image: typing.Any
) -> bytes
nemo_gym.web.artifacts._safe_component(
value: str
) -> str
nemo_gym.web.artifacts._SAFE_COMPONENT = re.compile('[^A-Za-z0-9_.-]+')