Add deploy_agent#924
Open
aversey wants to merge 16 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR introduces a new user-facing workflow for deploying “agents” to Hopsworks Model Serving by uploading a local Python script or building+installing a local Python package, and adds supporting environment/library management and deployment lifecycle utilities.
Changes:
- Add
ModelServing.deploy_agent()to deploy/update an agent from a.pyentrypoint or apyproject.tomlpackage directory. - Add environment/library uninstall support (
Environment.uninstall()+LibraryApi._uninstall()) to support forced package reinstalls during agent deploys. - Add
Deployment.restart()convenience method and new/updated tests for agent deploy, restart, uninstall, and library API behavior.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| python/hsml/model_serving.py | Adds deploy_agent() plus helper functions for ensuring dataset directories and building/installing packages. |
| python/hsml/deployment.py | Adds Deployment.restart() public API. |
| python/hopsworks_common/environment.py | Adds Environment.uninstall() public API. |
| python/hopsworks_common/core/library_api.py | Adds _uninstall() DELETE call for environment libraries. |
| python/pyproject.toml | Adds build dependency required for local wheel builds. |
| python/tests/test_model_serving.py | New test suite covering deploy_agent validation, script/package paths, and helper functions. |
| python/tests/test_environment.py | New tests for uninstall awaiting behavior. |
| python/tests/core/test_library_api.py | New test validating uninstall DELETE path. |
| python/tests/test_deployment.py | Adds tests for Deployment.restart() behavior. |
Coverage reportClick to see where and how coverage changed
The report is truncated to 25 files out of 47. To see the full report, please visit the workflow summary page. This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
javierdlrm
approved these changes
Apr 30, 2026
Contributor
Author
|
To be merged after https://github.com/logicalclocks/docker-images/pull/801 |
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 PR adds/fixes/changes...
JIRA Issue: -
Priority for Review: -
Related PRs: -
How Has This Been Tested?
Checklist For The Assigned Reviewer: