-
Notifications
You must be signed in to change notification settings - Fork 9
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
Fix: Error When Retrieving Server Information #28
Fix: Error When Retrieving Server Information #28
Conversation
…data no longer being compatible
…ServerInfo - problematic call no longer occurs
WalkthroughThe update introduces new type hint classes and refines several methods to enhance the handling of store configurations and server information. These improvements aim to provide more structured and detailed data for configurations and responses within the application. Changes
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yml
Review profile: CHILL
Files selected for processing (2)
- bundled/tool/type_hints.py (1 hunks)
- bundled/tool/zenml_wrappers.py (3 hunks)
Additional context used
Path-based instructions (2)
bundled/tool/type_hints.py (1)
Pattern
**/*.py
: "Review the Python code for conformity with Python best practices and industry standards, highlighting any deviations."bundled/tool/zenml_wrappers.py (1)
Pattern
**/*.py
: "Review the Python code for conformity with Python best practices and industry standards, highlighting any deviations."
Additional comments not posted (6)
bundled/tool/type_hints.py (4)
60-69
: Ensure all necessary fields are included.The
ZenmlStoreInfo
class looks good. Ensure that all necessary fields for store information are included and correctly typed.
71-74
: Ensure all necessary fields are included.The
ZenmlStoreConfig
class looks good. Ensure that all necessary fields for store configuration are included and correctly typed.
76-78
: Ensure all necessary fields are included.The
ZenmlServerInfoResp
class looks good. Ensure that all necessary fields for server information response are included and correctly typed.
80-87
: Ensure all necessary fields are included.The
ZenmlGlobalConfigResp
class looks good. Ensure that all necessary fields for global configuration response are included and correctly typed.bundled/tool/zenml_wrappers.py (2)
101-126
: Ensure adherence to the new type hint.The method correctly constructs the dictionary with user-related information and store details. Ensure that the returned dictionary adheres to the
ZenmlGlobalConfigResp
type hint.
182-213
: Ensure adherence to the new type hint.The method correctly constructs the dictionary with server info and store config. Ensure that the returned dictionary adheres to the
ZenmlServerInfoResp
type hint.
This pull request contains changes to fix an issue with Pydantic not being compatible with a zenml library call at the moment. Original code was developed when zenml used pydantic 1.x, but currently uses 2.x and causes problems with retrieving server information.
Changes:
json()
from object generated byzenml.config.global_config.GlobalConfiguration().zen_store
andzenml.config.global_config.GlobalConfiguration().get_store_info()
which would cause an error in thegetServerInfo
command (ZenServerWrapper.get_server_info
method). Instead now builds the dict manually for the response instead of converting to json and back to a dict.getGlobalConfig
command (GlobalConfigWrapper.get_global_configuration
), though this is never called in the entire extension, just to be safe by not using the problematic function.Summary by CodeRabbit