Skip to content

Commit 56a6c5f

Browse files
eexwhyzeeclaude
andauthored
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>
1 parent d69dbb8 commit 56a6c5f

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

src/prime_rl/trainer/runs.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,9 +236,20 @@ def get_orchestrator_config(self, run_id: str) -> Optional["OrchestratorConfig"]
236236
with open(config_path, "rb") as f:
237237
config_dict = tomli.load(f)
238238

239+
from verifiers.v1.loaders import skip_plugin_install
240+
239241
from prime_rl.configs.orchestrator import OrchestratorConfig
240242

241-
config = OrchestratorConfig(**config_dict)
243+
# The trainer only reads training-relevant fields (model, lora, seq_len, buffers,
244+
# env names) and never runs the env, so skip resolving/installing taskset/harness
245+
# plugins from the Environments Hub while parsing. Otherwise a private v1 hub env
246+
# (`taskset.id = owner/name@version`) 404s here — the trainer has no Hub creds — and
247+
# the run is silently skipped. The env server still installs the plugin at runtime.
248+
token = skip_plugin_install.set(True)
249+
try:
250+
config = OrchestratorConfig(**config_dict)
251+
finally:
252+
skip_plugin_install.reset(token)
242253
except Exception as e:
243254
if error_path.parent.exists():
244255
with open(error_path, "w") as f:

0 commit comments

Comments
 (0)