-
Notifications
You must be signed in to change notification settings - Fork 56
Refactor Container Index JSON Loader: Move to Config Package & Switch to Pydantic #1092
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
ads/aqua/extension/model_handler.py
Outdated
@@ -45,7 +38,7 @@ def get( | |||
400, Errors.MISSING_REQUIRED_PARAMETER.format("model_format") | |||
) | |||
try: | |||
model_format = ModelFormat(model_format.upper()) | |||
model_format = model_format.upper() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this code is no longer checking if the model format is valid? In that case, I guess there is no need to have try/except for upper()
?
------- | ||
AquaContainerConfig: The constructed container configuration. | ||
""" | ||
# if not config: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? I see you are adding config=get_container_config()
in every call instead. So the config
should not be None
anymore. Or maybe having a default is better?
dd15934
Description
This PR enhances the container index JSON loader by moving it from the UI module to the config package and refactoring it to use Pydantic instead of dataclasses.
Key Changes