Skip to navigation

nemo_gym.tasks.harbor.digest

View as Markdown

Whole-folder digest of a Harbor task.

Same record format as Harbor’s package publisher and Gym’s Terminal Bench 4 loader: SHA256 over sorted relative_path NUL file_sha256 LF records covering task.toml, instruction.md, README.md, trajectory.json and everything under environment/, tests/, solution/ and steps/. The digest travels in task_data under DIGEST_KEY so the resources server can refuse a row whose folder changed after materialization.

Module Contents

Functions

NameDescription
_ignored-
content_hashDigest the task folder at path.

Data

DIGEST_KEY

_DIRECTORIES

_IGNORED

_SINGLE_FILES

API

nemo_gym.tasks.harbor.digest._ignored(
relative: str
) -> bool
nemo_gym.tasks.harbor.content_hash(
path: pathlib.Path
) -> str

Digest the task folder at path.

nemo_gym.tasks.harbor.digest.DIGEST_KEY = '_ng_digest'
nemo_gym.tasks.harbor.digest._DIRECTORIES = ('environment', 'tests', 'solution', 'steps')
nemo_gym.tasks.harbor.digest._IGNORED = ('__pycache__', '*.pyc', '.DS_Store', '*.swp', '*.swo', '*~')
nemo_gym.tasks.harbor.digest._SINGLE_FILES = ('task.toml', 'instruction.md', 'README.md', 'trajectory.json')