nemo_gym.orchestration.executors.git_ref
nemo_gym.orchestration.executors.git_ref
Module Contents
Classes
Functions
Data
NEMO_GYM_SUBMIT_NO_REF_CHECK_ENV_VAR_NAME
API
Bases: Exception
The repo could not be listed: a network, access or remote failure, not an answer about the ref.
Whether a remote-tracking ref of repo in this Gym’s own clone contains commit sha right after a
successful git fetch --prune of that remote: then repo serves it.
Only remote-tracking refs count, so a local commit that was never pushed does not. A remote whose fetch fails is not consulted, so a stale ref (a branch deleted since the last fetch) never vouches for a commit. Any failure here (no clone, no such remote, git missing) answers False.
url without scheme, user, .git and case, so an https and an ssh URL of one repo compare equal.
Fail the submit early when driver.gym_install.ref cannot be found in repo.
A branch or tag is looked up with one git ls-remote, which transfers only ref names, and a
full commit hash that is not a branch/tag tip is probed with a depth-1, blob-less fetch. A
failure to reach the repo (timeout, unreachable or nonexistent repo, auth) is retried after each
of _RETRY_WAITS_SECONDS; when every attempt fails, the submit fails with an error that names a
network check, not a missing ref. A missing git binary is not retried.
The repo always answers when it can be reached; a ref it does not have fails the submit. Only when
every attempt failed to reach it is a full commit hash checked in this Gym’s own clone of repo,
and only after a git fetch --prune of that remote succeeds, so a remote branch deleted since the
clone’s last fetch cannot vouch for it; a hash such a fresh remote-tracking ref contains is accepted
with a warning that the local fallback was used. Set NEMO_GYM_SUBMIT_NO_REF_CHECK=true to skip the
check.