Extended settings checker#40
Open
jpn-- wants to merge 5 commits into
Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new settings_checker extension intended to validate model settings (via Pydantic models) and enables model settings checking in the resident configuration.
Changes:
- Added
extensions/settings_checker.pywith anEXTENSION_CHECKER_SETTINGSmapping of model/step names to settings classes and YAML files. - Registered the new extension in
extensions/__init__.py. - Enabled
check_model_settings: Trueinconfigs/resident/settings.yamlandconfigs/resident/settings_mp.yaml(and added distributed time-factor settings insettings.yaml).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| extensions/settings_checker.py | Introduces the settings validation mapping used by the new checker extension. |
| extensions/init.py | Registers the new settings_checker extension module. |
| configs/resident/settings.yaml | Enables model settings checking and adds distributed time-factor parameters. |
| configs/resident/settings_mp.yaml | Enables model settings checking for multiprocess runs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+20
to
+23
| "airport_returns": { | ||
| "settings_cls": PydanticReadable, | ||
| "settings_file": "airport_returns.yaml" | ||
| }, |
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This pull request introduces a new extension,
settings_checker, and integrates it into the project. The main goal is to provide a mechanism for verifying model-specific settings using Pydantic data models. Additionally, it enables this settings check in two configuration files. The most important changes are as follows:New extension for settings validation:
settings_checker.py, which definesEXTENSION_CHECKER_SETTINGS. This mapping links model names to their respective Pydantic settings classes and YAML settings files, facilitating automated validation of model settings.settings_checkerextension inextensions/__init__.py, making it available to the application.Configuration updates:
check_model_settings: Truetoconfigs/resident/settings.yamlandconfigs/resident/settings_mp.yaml. This activates the new validation logic during model runs. [1] [2]