nemo_gym.environment.manifest

View as Markdown

Typed contract for an environment manifest.yaml.

Module Contents

Classes

NameDescription
AdoptedFrom-
DatasetKind-
Determinism-
EnvironmentKind-
EnvironmentManifestAuthored metadata plus a read-only mirror of the resolved Gym composition.
EnvironmentState-
IntegrationProfile-
Lifecycle-
ManifestDataset-
ManifestErrorA manifest could not be read, parsed, or validated.
Reward-
SessionModel-
_ManifestModel-

Functions

Data

CALLABLE_PATTERN

GitRef

JSON_SCHEMA_DIALECT

License

MANIFEST_SCHEMA_ID

NonEmptyString

PythonCallable

SOURCE_PATTERN

Source

_BENCHMARK_REQUIRED_FIELDS

_PRIVATE_LICENSE_VALUES

_PROFILE_REQUIRED_FIELDS

API

class nemo_gym.environment.manifest.AdoptedFrom()

Bases: _ManifestModel

reconciled
date
ref
GitRef
source
Source
class nemo_gym.environment.manifest.DatasetKind

Bases: enum.Enum

BENCHMARK
= 'benchmark'
EXAMPLE
= 'example'
TRAIN
= 'train'
VALIDATION
= 'validation'
class nemo_gym.environment.manifest.Determinism

Bases: enum.Enum

SEEDED
= 'seeded'
STOCHASTIC
= 'stochastic'
UNKNOWN
= 'unknown'
class nemo_gym.environment.manifest.EnvironmentKind

Bases: enum.Enum

BENCHMARK
= 'benchmark'
ENVIRONMENT
= 'environment'
class nemo_gym.environment.manifest.EnvironmentManifest()

Bases: _ManifestModel

Authored metadata plus a read-only mirror of the resolved Gym composition.

adopted_from
AdoptedFrom | None = None
agent_server
NonEmptyString
authors
list[NonEmptyString]
canonical_split
NonEmptyString | None = None
datasets
list[ManifestDataset] = Field(min_length=1)
description
NonEmptyString
determinism
Determinism = Determinism.UNKNOWN
domain
Domain
grading_mode
NonEmptyString | None = None
integration_profile
IntegrationProfile
kind
EnvironmentKind
licensing
License
lifecycle
Lifecycle = Lifecycle.ACTIVE
modality
NonEmptyString
model_config
model_server
NonEmptyString | None = None
name
NonEmptyString
resources_server
NonEmptyString
reward
Reward
rollout_driver
PythonCallable | None = None
sandbox
NonEmptyString | None = None
session_model
SessionModel | None = None
standard_prompt_config
NonEmptyString | None = None
state
EnvironmentState | None = None
version
NonEmptyString
nemo_gym.environment.manifest.EnvironmentManifest.validate_contract() -> 'EnvironmentManifest'
nemo_gym.environment.manifest.EnvironmentManifest.validate_licensing(
value: str
) -> str
classmethod
nemo_gym.environment.manifest.EnvironmentManifest.validate_unique_authors(
value: list[str]
) -> list[str]
classmethod
class nemo_gym.environment.manifest.EnvironmentState

Bases: enum.Enum

NONE
= 'none'
PER_SESSION
= 'per_session'
class nemo_gym.environment.manifest.IntegrationProfile

Bases: enum.Enum

CUSTOM_GYM_AGENT_LOOP
= 'custom-gym-agent-loop'
CUSTOM_GYM_VERIFIER
= 'custom-gym-verifier'
EXTERNAL_AGENT_LOOP
= 'external-agent-loop'
EXTERNAL_ROLLOUT_DRIVER
= 'external-rollout-driver'
class nemo_gym.environment.manifest.Lifecycle

Bases: enum.Enum

ACTIVE
= 'active'
DEPRECATED
= 'deprecated'
class nemo_gym.environment.manifest.ManifestDataset()

Bases: _ManifestModel

jsonl_fpath
NonEmptyString
model_config
name
NonEmptyString
num_repeats
int = Field(default=1, ge=1)
prepare_script
NonEmptyString | None = None
prompt_config
NonEmptyString | None = None
type
DatasetKind
nemo_gym.environment.manifest.ManifestDataset.validate_benchmark_dataset() -> 'ManifestDataset'
class nemo_gym.environment.manifest.ManifestError()

Bases: ConfigError

A manifest could not be read, parsed, or validated.

class nemo_gym.environment.manifest.Reward()

Bases: _ManifestModel

higher_is_better
bool
range
tuple[FiniteFloat, FiniteFloat]
nemo_gym.environment.manifest.Reward.validate_range() -> 'Reward'
class nemo_gym.environment.manifest.SessionModel

Bases: enum.Enum

EPISODE
= 'episode'
STEP
= 'step'
class nemo_gym.environment.manifest._ManifestModel()

Bases: BaseModel

model_config
nemo_gym.environment.manifest._profile_schema_conditions() -> list[dict[str, typing.Any]]
nemo_gym.environment.manifest._validation_error(
path: pathlib.Path,
error: pydantic.ValidationError
) -> nemo_gym.environment.manifest.ManifestError
nemo_gym.environment.manifest.dump_manifest(
manifest: nemo_gym.environment.manifest.EnvironmentManifest | typing.Mapping[str, typing.Any]
) -> str
nemo_gym.environment.manifest.load_manifest(
path: str | pathlib.Path
) -> nemo_gym.environment.manifest.EnvironmentManifest
nemo_gym.environment.manifest.manifest_json_schema() -> dict[str, typing.Any]
nemo_gym.environment.manifest.CALLABLE_PATTERN = '^[A-Za-z_][A-Za-z0-9_]*(?:\\.[A-Za-z_][A-Za-z0-9_]*)*:[A-Za-z_][A-Za-z0-9_]*$'
nemo_gym.environment.manifest.GitRef = Annotated[str, StringConstraints(strip_whitespace=True, min_length=1, pattern='^...
nemo_gym.environment.manifest.JSON_SCHEMA_DIALECT = 'https://json-schema.org/draft/2020-12/schema'
nemo_gym.environment.manifest.License = Annotated[str, StringConstraints(strip_whitespace=True, min_length=1)]
nemo_gym.environment.manifest.MANIFEST_SCHEMA_ID = 'environment-manifest.schema.json'
nemo_gym.environment.manifest.NonEmptyString = Annotated[str, StringConstraints(strip_whitespace=True, min_length=1)]
nemo_gym.environment.manifest.PythonCallable = Annotated[str, StringConstraints(strip_whitespace=True, pattern=CALLABLE_PATTERN...
nemo_gym.environment.manifest.SOURCE_PATTERN = '^(?:(?:https?|ssh|git|file)://\\S+|[^@\\s]+@[^:\\s]+:\\S+)$'
nemo_gym.environment.manifest.Source = Annotated[str, StringConstraints(strip_whitespace=True, pattern=SOURCE_PATTERN)]
nemo_gym.environment.manifest._BENCHMARK_REQUIRED_FIELDS = ('canonical_split', 'standard_prompt_config')
nemo_gym.environment.manifest._PRIVATE_LICENSE_VALUES = frozenset({'internal', 'proprietary', 'unknown'})
nemo_gym.environment.manifest._PROFILE_REQUIRED_FIELDS = {IntegrationProfile.CUSTOM_GYM_VERIFIER: ('model_server',), IntegrationProfile.C...