-
Notifications
You must be signed in to change notification settings - Fork 26.3k
config: create Config objects with JK support #138766
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
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/138766
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d1aa4ef with merge base 5e4c8b6 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Seems fine, looks like you need to fix some brainos |
This teaches install_config_module (and the underlying code) to understands Config objects. Additionally we've added a JK option to this which resolves the JK. This config gets stored within the _ConfigEntry class and is evaluated when __getattr__ is called. If justknobs is set, it'll call justknobs_check to see the result. Due to preceeding work, basically everything works correctly here and we had to update a couple of tests, and modify the getattr behaviour. Note that we are updating the justknob_check function to support a default option, to make default work. ghstack-source-id: f52fb77 Pull Request resolved: pytorch#138766
|
Accidentally merged a second PR in somehow, undoing. |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 mandatory check(s) failed. The first few are: Dig deeper by viewing the failures on hud |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
This teaches install_config_module (and the underlying code) to understands Config objects. Additionally we've added a JK option to this which resolves the JK. This config gets stored within the _ConfigEntry class and is evaluated when __getattr__ is called. If justknobs is set, it'll call justknobs_check to see the result. Due to preceeding work, basically everything works correctly here and we had to update a couple of tests, and modify the getattr behaviour. Note that we are updating the justknob_check function to support a default option, to make default work. Pull Request resolved: pytorch#138766 Approved by: https://github.com/ezyang
This allows Configs to handle setting their defaults (or overriding themselves) via environment variables. The environment variables are resolved at install time (which is usually import time). This is done 1) to avoid any race conditions between threads etc..., but 2) to help encourage people to just go modify the configs directly, vs overriding environment variables to change pytorch behaviour. Pull Request resolved: #138956 Approved by: https://github.com/ezyang ghstack dependencies: #138766
This never ended up getting used, and instead we're doing this resolution within the configuration system. Removing these unused internal features. Pull Request resolved: #138767 Approved by: https://github.com/ezyang ghstack dependencies: #138766, #138956
This never ended up getting used, and instead we're doing this resolution within the configuration system. Removing these unused internal features. Pull Request resolved: pytorch#138767 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#138766, pytorch#138956
…8956) This allows Configs to handle setting their defaults (or overriding themselves) via environment variables. The environment variables are resolved at install time (which is usually import time). This is done 1) to avoid any race conditions between threads etc..., but 2) to help encourage people to just go modify the configs directly, vs overriding environment variables to change pytorch behaviour. Pull Request resolved: pytorch#138956 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#138766
This never ended up getting used, and instead we're doing this resolution within the configuration system. Removing these unused internal features. Pull Request resolved: pytorch#138767 Approved by: https://github.com/ezyang ghstack dependencies: pytorch#138766, pytorch#138956
Stack from ghstack (oldest at bottom):
This teaches install_config_module (and the underlying code) to
understands Config objects. Additionally we've added a JK option to this
which resolves the JK.
This config gets stored within the _ConfigEntry class and is evaluated
when getattr is called. If justknobs is set, it'll call
justknobs_check to see the result.
Due to preceeding work, basically everything works correctly here and we
had to update a couple of tests, and modify the getattr behaviour.
Note that we are updating the justknob_check function to support a
default option, to make default work.