Skip to content

Conversation

shayne-fletcher
Copy link
Contributor

Differential Revision: D84085259

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 7, 2025
Copy link

meta-codesync bot commented Oct 7, 2025

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84085259.

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 7, 2025
…h#1457)

Summary: Pull Request resolved: meta-pytorch#1457

Differential Revision: D84085259
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 7, 2025
…h#1457)

Summary:

`override_key` now pushes frames onto a per-key stack with unique tokens, allowing out-of-order drops and deterministic restoration. `ConfigValueGuard::drop` pops the active frame, restores the previous or default value, and updates the mirrored env var only when the top changes. `ensure_test_override_layer_mut` removed as redundant. `Key::name` moved to an unconstrained impl to relax the `Named` bound.

adds tests verifying LIFO restoration and stability under out-of-order drops, covering both attrs and env behavior.

Differential Revision: D84085259
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…h#1457)

Summary:

`override_key` now pushes frames onto a per-key stack with unique tokens, allowing out-of-order drops and deterministic restoration. `ConfigValueGuard::drop` pops the active frame, restores the previous or default value, and updates the mirrored env var only when the top changes. `ensure_test_override_layer_mut` removed as redundant. `Key::name` moved to an unconstrained impl to relax the `Named` bound.

adds tests verifying LIFO restoration and stability under out-of-order drops, covering both attrs and env behavior.

Reviewed By: mariusae

Differential Revision: D84085259
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…h#1457)

Summary:

`override_key` now pushes frames onto a per-key stack with unique tokens, allowing out-of-order drops and deterministic restoration. `ConfigValueGuard::drop` pops the active frame, restores the previous or default value, and updates the mirrored env var only when the top changes. `ensure_test_override_layer_mut` removed as redundant. `Key::name` moved to an unconstrained impl to relax the `Named` bound.

adds tests verifying LIFO restoration and stability under out-of-order drops, covering both attrs and env behavior.

Reviewed By: mariusae

Differential Revision: D84085259
@shayne-fletcher shayne-fletcher force-pushed the export-D84085259 branch 2 times, most recently from af81a18 to d3408cd Compare October 9, 2025 20:35
shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 9, 2025
…h#1457)

Summary:

`override_key` now pushes frames onto a per-key stack with unique tokens, allowing out-of-order drops and deterministic restoration. `ConfigValueGuard::drop` pops the active frame, restores the previous or default value, and updates the mirrored env var only when the top changes. `ensure_test_override_layer_mut` removed as redundant. `Key::name` moved to an unconstrained impl to relax the `Named` bound.

adds tests verifying LIFO restoration and stability under out-of-order drops, covering both attrs and env behavior.

Reviewed By: mariusae

Differential Revision: D84085259
Summary:

this diff follows on from the discussions in D83778023 and lands `ConfigAttr` and the unified `CONFIG` meta-attribute for marking configuration keys, replaces all previous `CONFIG_ENV_VAR`/`PYTHON_CONFIG_KEY` usage, and narrows `attrs()` and `init_from_env()` to include only keys carrying this meta. it updates monarch python bindings to read `py_name` from `ConfigAttr`, rewrites affected documentation accordingly, and adds a unit test verifying that non-`CONFIG` keys are excluded from `attrs()`. all existing keys in hyperactor and hyperactor\_mesh have been migrated to the new form.

Reviewed By: mariusae, pablorfb-meta

Differential Revision: D83997813
…rides (meta-pytorch#1456)

Summary:

relates to part 2 of the refactors discussed in D83778023 

refactor(config/global.rs): introduce `Layer` enum and recover tests

- switch `Layer` representation from `struct`+`Source` to `enum` with variants:
  `File`, `Env`, `Runtime`, and `TestOverride { attrs, stacks }`.
- updated helpers (`layer_attrs`, `layer_attrs_mut`, `test_override_index`).
- adjusted `Drop` impls for `ConfigValueGuard` and `ConfigLock` to compile and preserve all existing behavior.

all unit tests pass; ready for semantic refactor of `TestOverride` logic next.

Reviewed By: mariusae

Differential Revision: D84072524
…h#1457)

Summary:

`override_key` now pushes frames onto a per-key stack with unique tokens, allowing out-of-order drops and deterministic restoration. `ConfigValueGuard::drop` pops the active frame, restores the previous or default value, and updates the mirrored env var only when the top changes. `ensure_test_override_layer_mut` removed as redundant. `Key::name` moved to an unconstrained impl to relax the `Named` bound.

adds tests verifying LIFO restoration and stability under out-of-order drops, covering both attrs and env behavior.

Reviewed By: mariusae

Differential Revision: D84085259
Copy link

meta-codesync bot commented Oct 10, 2025

This pull request has been merged in 052e78f.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged meta-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants