[executor] Add .mirrored() to ExecutorStep and InputName#4224
[executor] Add .mirrored() to ExecutorStep and InputName#4224claude[bot] wants to merge 8 commits intomainfrom
Conversation
Add mirror_budget_gb field to InputName and .mirrored(budget_gb) methods to both ExecutorStep and InputName, so callers can request mirror:// resolution without manually wrapping in MirroredValue. The budget is preserved through cd() and nonblocking() chains, does not affect version hashing, and is picked up by _max_mirror_budget. Fixes #4223 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f254bcec72
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| if obj.mirror_budget_gb is not None and not resolved.startswith("mirror://"): | ||
| return f"mirror://{resolved}" |
There was a problem hiding this comment.
Normalize mirrored InputName paths before prefixing protocol
When InputName.mirror_budget_gb is set, this wraps the fully resolved dependency path (e.g. gs://.../train-hash) as mirror://{resolved}. MirrorFileSystem treats the mirror path as a relative key and prepends regional prefixes (_local_url/_remote_url in lib/iris/src/iris/marin_fs.py), so passing a full URL produces malformed lookups like gs://local/gs://... and the file is reported missing. This means the new ExecutorStep.mirrored()/InputName.mirrored() flow fails for normal absolute executor output paths.
Useful? React with 👍 / 👎.
|
Hmmm, @claude upon closer inspection I made a bad design decision here. I think we just want to make it so that |
|
Claude finished @Helw150's task in 6m 32s —— View job Redesigned
|
…apper Instead of adding mirror_budget_gb to InputName (mixing concerns), as_mirrored_value() returns MirroredValue(value=InputName(...)) which reuses the existing MirroredValue handling in collect_dependencies_and_version and instantiate_config. This also fixes the codex review concern about malformed mirror:// paths since MirroredValue already handles the prefix correctly. Co-authored-by: William Held <Helw150@users.noreply.github.com>
|
@claude can you specifically update ref_hparam_sweep to use this mirrored value so it would be distributed in Iris as an example? |
|
Claude finished @Helw150's task in 4m 53s —— View job Updated
|
…stribution Update the reference sweep to mirror training step outputs when reading them cross-region in the update step, demonstrating the new as_mirrored_value() API. Co-authored-by: William Held <Helw150@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude You'll need to mirror the outputs of the update step as well? |
|
Claude finished @Helw150's task in 4m 22s —— View job
Mirrored all cross-step DB paths for Iris distributionUpdated all Vizier DB path references to use
Also updated all Testing: Pre-commit clean, 25 executor tests pass (1 skipped for unrelated reasons). |
…ibution Wrap all Vizier DB path references (suggest step DB → update step, update step DB → next suggest step, update step DB → optimal step) with as_mirrored_value() so Iris caches them locally before reads. Co-authored-by: William Held <Helw150@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude Can you make MirroredValue support truediv and cd()? That way it serves as a more drop in replacement for InputNames and ExecutorSteps when referring to files? |
|
Claude finished @Helw150's task in 3m 25s —— View job Add
|
MirroredValue now supports / and cd() so callers can navigate into subdirectories without unwrapping and re-wrapping: step.as_mirrored_value() / "hf" / "checkpoint" The budget_gb is preserved through chaining. Works with inner types ExecutorStep, InputName, and str. Co-authored-by: William Held <Helw150@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
@claude I think you lost context here. Can you update the example (ref_hparam_sweep) based on the new changes to support truediv |
|
Claude finished @Helw150's task in 3m 15s —— View job Update
|
Simplify mirrored path expressions by applying .as_mirrored_value() first then using / to navigate into subdirectories, demonstrating the new MirroredValue.__truediv__ support as a drop-in replacement. Co-authored-by: William Held <Helw150@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
|
Claude finished @Helw150's task in 4m 17s —— View job Cleaned up tests and types
Changes:
Testing: Pre-commit clean, 17 tests pass (1 skipped for unrelated reasons). |
Remove 10 redundant mirrored tests, keeping only the 3 meaningful ones: instantiate_config, truediv_instantiate, and version stability. Remove unnecessary | MirroredValue union types from hparam sweep since the file is self-contained and doesn't need backward compat. Co-authored-by: William Held <Helw150@users.noreply.github.com> Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
rjpower
left a comment
There was a problem hiding this comment.
I feel like we should be a bit less magical in our handling of these things like path-likes, but this is consistent with the existing work so I won't complain.
(I really feel outputs should be value with types on them instead of raw paths, but... that's for another time)
Add mirror_budget_gb field to InputName and .mirrored(budget_gb) methods to both ExecutorStep and InputName, so callers can write default_eval(step=training_run.mirrored()) instead of manually resolving paths and prepending mirror://. The budget propagates through cd() and nonblocking() chains, does not affect version hashing (consistent with MirroredValue), and is picked up by _max_mirror_budget. Adds seven tests covering the new methods, chaining, instantiation, and version stability.
Fixes #4223