-
Notifications
You must be signed in to change notification settings - Fork 109
: config: straighten out naming #1995
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
shayne-fletcher
wants to merge
1
commit into
meta-pytorch:main
from
shayne-fletcher:export-D87866946
Closed
: config: straighten out naming #1995
shayne-fletcher
wants to merge
1
commit into
meta-pytorch:main
from
shayne-fletcher:export-D87866946
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D87866946. |
d7f31bd to
993679b
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 25, 2025
Summary: this diff follows up on mariusae's [comment in D87795973](https://www.internalfb.com/diff/D87795973?dst_version_fbid=861202266855169&transaction_fbid=1244851620803763) and completes the cleanup he hinted at. the main change is to make the Python-owned "Runtime" layer an explicit, coherent concept throughout the module. the Rust helpers are renamed (`*_py`, `configure_kwarg`, etc.) so their roles are unambiguous, and the documentation now reflects the actual data flow: `configure(**kwargs)` writes only into `Source::Runtime`, while `get_global_config` and `get_runtime_config` clearly separate merged vs. layer-local views. on the Python side, the API surface is aligned with these semantics. the `configured(...)` context manager (the 'test_config.py' version) is rewritten to snapshot and restore only the Runtime layer instead of resetting global config, which makes overrides composable while continuing to prevent state leakage across tests. the .pyi file is updated to document the layered model and the historical naming of `configure(...)`. this diff further formalizes the contract implied by the earlier code: Python exclusively owns the Runtime layer, and all read/write paths now reflect that consistently in naming, behavior, and documentation. Differential Revision: D87866946
Summary: this diff follows up on mariusae's [comment in D87795973](https://www.internalfb.com/diff/D87795973?dst_version_fbid=861202266855169&transaction_fbid=1244851620803763) and completes the cleanup he hinted at. the main change is to make the Python-owned "Runtime" layer an explicit, coherent concept throughout the module. the Rust helpers are renamed (`*_py`, `configure_kwarg`, etc.) so their roles are unambiguous, and the documentation now reflects the actual data flow: `configure(**kwargs)` writes only into `Source::Runtime`, while `get_global_config` and `get_runtime_config` clearly separate merged vs. layer-local views. on the Python side, the API surface is aligned with these semantics. the `configured(...)` context manager (the 'test_config.py' version) is rewritten to snapshot and restore only the Runtime layer instead of resetting global config, which makes overrides composable while continuing to prevent state leakage across tests. the .pyi file is updated to document the layered model and the historical naming of `configure(...)`. this diff further formalizes the contract implied by the earlier code: Python exclusively owns the Runtime layer, and all read/write paths now reflect that consistently in naming, behavior, and documentation. Reviewed By: dulinriley Differential Revision: D87866946
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 26, 2025
Summary: this diff follows up on mariusae's [comment in D87795973](https://www.internalfb.com/diff/D87795973?dst_version_fbid=861202266855169&transaction_fbid=1244851620803763) and completes the cleanup he hinted at. the main change is to make the Python-owned "Runtime" layer an explicit, coherent concept throughout the module. the Rust helpers are renamed (`*_py`, `configure_kwarg`, etc.) so their roles are unambiguous, and the documentation now reflects the actual data flow: `configure(**kwargs)` writes only into `Source::Runtime`, while `get_global_config` and `get_runtime_config` clearly separate merged vs. layer-local views. on the Python side, the API surface is aligned with these semantics. the `configured(...)` context manager (the 'test_config.py' version) is rewritten to snapshot and restore only the Runtime layer instead of resetting global config, which makes overrides composable while continuing to prevent state leakage across tests. the .pyi file is updated to document the layered model and the historical naming of `configure(...)`. this diff further formalizes the contract implied by the earlier code: Python exclusively owns the Runtime layer, and all read/write paths now reflect that consistently in naming, behavior, and documentation. Reviewed By: dulinriley Differential Revision: D87866946
97f59d7 to
ac9e124
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Nov 26, 2025
Summary: this diff follows up on mariusae's [comment in D87795973](https://www.internalfb.com/diff/D87795973?dst_version_fbid=861202266855169&transaction_fbid=1244851620803763) and completes the cleanup he hinted at. the main change is to make the Python-owned "Runtime" layer an explicit, coherent concept throughout the module. the Rust helpers are renamed (`*_py`, `configure_kwarg`, etc.) so their roles are unambiguous, and the documentation now reflects the actual data flow: `configure(**kwargs)` writes only into `Source::Runtime`, while `get_global_config` and `get_runtime_config` clearly separate merged vs. layer-local views. on the Python side, the API surface is aligned with these semantics. the `configured(...)` context manager (the 'test_config.py' version) is rewritten to snapshot and restore only the Runtime layer instead of resetting global config, which makes overrides composable while continuing to prevent state leakage across tests. the .pyi file is updated to document the layered model and the historical naming of `configure(...)`. this diff further formalizes the contract implied by the earlier code: Python exclusively owns the Runtime layer, and all read/write paths now reflect that consistently in naming, behavior, and documentation. Reviewed By: dulinriley Differential Revision: D87866946
|
This pull request has been merged in e91c0c4. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary:
this diff follows up on mariusae's comment in D87795973 and completes the cleanup he hinted at. the main change is to make the Python-owned "Runtime" layer an explicit, coherent concept throughout the module. the Rust helpers are renamed (
*_py,configure_kwarg, etc.) so their roles are unambiguous, and the documentation now reflects the actual data flow:configure(**kwargs)writes only intoSource::Runtime, whileget_global_configandget_runtime_configclearly separate merged vs. layer-local views.on the Python side, the API surface is aligned with these semantics. the
configured(...)context manager (the 'test_config.py' version) is rewritten to snapshot and restore only the Runtime layer instead of resetting global config, which makes overrides composable while continuing to prevent state leakage across tests. the .pyi file is updated to document the layered model and the historical naming ofconfigure(...).this diff further formalizes the contract implied by the earlier code: Python exclusively owns the Runtime layer, and all read/write paths now reflect that consistently in naming, behavior, and documentation.
Differential Revision: D87866946