fix(trainer): don't resolve Hub envs when parsing orchestrator configs (#3096)
* fix(trainer): don't resolve Hub envs when parsing orchestrator configs discover_runs() builds OrchestratorConfig to read training-relevant fields, but constructing a v1 env config eagerly resolves (imports/installs) its taskset/ harness plugins from the Environments Hub. On the trainer that 404s for private hub envs (taskset.id = owner/name@version) — the trainer has no Hub credentials — so get_orchestrator_config() returns None and the run is silently skipped. Parse under verifiers' skip_plugin_install contextvar so the trainer never touches the Hub; the env server still installs the plugin at runtime. Depends on verifiers exposing `skip_plugin_install` — bump deps/verifiers to a commit that includes it before this lands. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * chore(trainer): sort imports to satisfy ruff isort (I001) Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
d69dbb8da4
commit
56a6c5fea6
@@ -236,9 +236,20 @@ class MultiRunManager:
|
||||
with open(config_path, "rb") as f:
|
||||
config_dict = tomli.load(f)
|
||||
|
||||
from verifiers.v1.loaders import skip_plugin_install
|
||||
|
||||
from prime_rl.configs.orchestrator import OrchestratorConfig
|
||||
|
||||
config = OrchestratorConfig(**config_dict)
|
||||
# The trainer only reads training-relevant fields (model, lora, seq_len, buffers,
|
||||
# env names) and never runs the env, so skip resolving/installing taskset/harness
|
||||
# plugins from the Environments Hub while parsing. Otherwise a private v1 hub env
|
||||
# (`taskset.id = owner/name@version`) 404s here — the trainer has no Hub creds — and
|
||||
# the run is silently skipped. The env server still installs the plugin at runtime.
|
||||
token = skip_plugin_install.set(True)
|
||||
try:
|
||||
config = OrchestratorConfig(**config_dict)
|
||||
finally:
|
||||
skip_plugin_install.reset(token)
|
||||
except Exception as e:
|
||||
if error_path.parent.exists():
|
||||
with open(error_path, "w") as f:
|
||||
|
||||
Reference in New Issue
Block a user