loginowskid commited on
Commit
0099164
·
1 Parent(s): 917d818

Streaming-zip: default use_plugin_default=True

Browse files
Files changed (1) hide show
  1. tools/hf_space/runner.py +11 -10
tools/hf_space/runner.py CHANGED
@@ -408,16 +408,17 @@ def _validate_zip_streaming(*, api: HfApi, dataset: str, token: str | None,
408
  val_ver = _validator_version()
409
  found_sha = _foundation_sha()
410
 
411
- # Deterministic recovery state. When the default CLI loader emits
412
- # "FATAL: profile X not registered" on the first zip (which is the
413
- # signature of the foundation specs referencing requirement codes
414
- # the simready-validate package doesn't have registered), we retry
415
- # that zip with --use-plugin. If --use-plugin works, we promote it
416
- # to the default for every subsequent zip in this run so we don't
417
- # pay the retry cost N times. This is the same strategy the agent
418
- # would have chosen, just done in code so we don't burn an LLM
419
- # call per zip on a deterministically-known failure mode.
420
- use_plugin_default = False
 
421
  issue_filed_for_registration_bug = False
422
  # Once an issue-filing attempt 404s (token can't reach the repo,
423
  # repo wrong, permissions missing), don't try again this run —
 
408
  val_ver = _validator_version()
409
  found_sha = _foundation_sha()
410
 
411
+ # Always use --use-plugin in the streaming path. With the patched
412
+ # foundation wheel installed, SimReadyPlugin's on_startup() loads
413
+ # profiles via simready.validate.impl.loader at omni.asset_validator
414
+ # import time fully populated ProfileRegistry before validate.py
415
+ # main() runs. The default CLI-loader path still attempts a
416
+ # second `load_validation_implementation` call which races with
417
+ # the plugin's registration and ends up failing in subtle ways
418
+ # (we've observed FATAL: profile X not registered even though
419
+ # the plugin succeeded different code path, different bug).
420
+ # Skip the doomed-first-attempt entirely.
421
+ use_plugin_default = True
422
  issue_filed_for_registration_bug = False
423
  # Once an issue-filing attempt 404s (token can't reach the repo,
424
  # repo wrong, permissions missing), don't try again this run —