nemo_gym.tasks.harbor.hub
nemo_gym.tasks.harbor.hub
Resolve harbor:<dataset>[@<version>] through the Harbor registry.
The registry is one JSON file listing datasets; each task entry names a git
repository, a commit and a path. Fetching copies the task folders into Gym’s shared
datasets folder so that every server reads the same bytes and nothing downloads at
run time. A HEAD pin is resolved to a commit before anything is copied.
Module Contents
Classes
Functions
Data
API
Bases: ValueError
The reference cannot be resolved or fetched.
<name>-<version>, so two versions of one dataset never share a folder.
The (git_url, commit, path) pins a previous fetch recorded, or {}.
Refuse links that could import host files, before any task bytes are copied.
Total order over versions: numeric versions first (by component), then the rest by text.
Gym’s shared datasets folder: $NEMO_GYM_DATASETS_DIR or ./datasets.
Fetch tasks, retaining the recorded source pins of existing folders.
Publish a pin after each task, so a later failure leaves completed tasks reusable. A folder without a trustworthy pin (including interruption before pin publication) is refused; the user can move it aside and retry without losing local edits.
Resolve and fetch a harbor: reference; return the dataset folder.
Read the registry, validating downloads before atomically replacing the cache.
A damaged cache raises HubError with its path and recovery instructions.
Failed downloads or updates leave any previous cache intact.
Pin HEAD (or a branch name) to the commit it points at right now.
cache memoizes the answer per (git_url, ref) so one fetch asks each remote once.
Return git_url if it is an https, ssh or git URL (or user@host:path); else raise.
Require one folder component, reserving the dataset manifest’s name.