-
Notifications
You must be signed in to change notification settings - Fork 294
[Hub] Implement get_hub_step new SDK and new HubStep class #9066
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
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.
Pull request overview
This PR implements support for hub steps in MLRun by introducing a new HubStep class and get_hub_step SDK function. The implementation follows a common pattern by creating a shared HubAsset base class that both HubModule and the new HubStep inherit from, promoting code reuse and consistency. The refactoring also deprecates the download_module_files method in favor of a unified download_files method across all hub assets.
Key changes:
- Introduced
HubAssetbase class to encapsulate common functionality for all hub assets (modules, steps) - Refactored
HubModuleto inherit fromHubAssetinstead ofModelObj - Added new
HubStepclass withget_hub_stepSDK function for retrieving steps from the hub - Deprecated
download_module_filesin favor of the unifieddownload_filesmethod
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| mlrun/hub/base.py | New base class providing shared functionality for hub assets including file downloading, module importing, and requirements installation |
| mlrun/hub/module.py | Refactored to inherit from HubAsset; deprecated download_module_files method; removed duplicated code now in base class |
| mlrun/hub/step.py | New HubStep class and get_hub_step function implementing hub step support |
| mlrun/hub/init.py | Added get_hub_step to module exports |
| mlrun/init.py | Added get_hub_step to top-level imports |
| mlrun/common/schemas/hub.py | Added 'steps' to HubSourceType enum |
| tests/integration/sdk_api/hub/test_hub.py | Updated test to use new download_files method; added tests for get_hub_step (marked as skipped until steps are available in hub) |
| docs/runtimes/load-from-hub.md | Updated documentation to reference new download_files method |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Pull request overview
Copilot reviewed 8 out of 8 changed files in this pull request and generated 8 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
301fdfd to
a577c75
Compare
Eyal-Danieli
left a comment
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.
Nice!
few comments
📝 Description
Implement
get_hub_stepnew SDK and newHubStepclass as part of supporting this new hub asset in MLRun.🛠️ Changes Made
HubAssetclass to implement all the common hub assets functionalitiesHubModuleinherit fromHubAssetHubStepclass which also inherits fromHubAssetget_hub_stepSDK✅ Checklist
🧪 Testing
🔗 References
🚨 Breaking Changes?
🔍️ Additional Notes