Skip to content

Add deploy_agent#924

Open
aversey wants to merge 16 commits into
logicalclocks:mainfrom
aversey:agent-deployments
Open

Add deploy_agent#924
aversey wants to merge 16 commits into
logicalclocks:mainfrom
aversey:agent-deployments

Conversation

@aversey
Copy link
Copy Markdown
Contributor

@aversey aversey commented Apr 27, 2026

This PR adds/fixes/changes...

  • please summarize your changes to the code
  • and make sure to include all changes to user-facing APIs

JIRA Issue: -

Priority for Review: -

Related PRs: -

How Has This Been Tested?

  • Unit Tests
  • Integration Tests
  • Manual Tests on VM

Checklist For The Assigned Reviewer:

- [ ] Checked if merge conflicts with master exist
- [ ] Checked if stylechecks for Java and Python pass
- [ ] Checked if all docstrings were added and/or updated appropriately
- [ ] Ran spellcheck on docstring
- [ ] Checked if guides & concepts need to be updated
- [ ] Checked if naming conventions for parameters and variables were followed
- [ ] Checked if private methods are properly declared and used
- [ ] Checked if hard-to-understand areas of code are commented
- [ ] Checked if tests are effective
- [ ] Built and deployed changes on dev VM and tested manually
- [x] (Checked if all type annotations were added and/or updated appropriately)

@aversey aversey requested a review from Copilot April 27, 2026 13:53
@aversey aversey self-assigned this Apr 27, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 .py entrypoint or a pyproject.toml package 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.

Comment thread python/hsml/deployment.py Outdated
Comment thread python/hopsworks_common/environment.py Outdated
Comment thread python/hsml/model_serving.py
Comment thread python/hsml/model_serving.py Outdated
Comment thread python/hsml/model_serving.py Outdated
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 27, 2026

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  python/hopsworks
  __init__.py
  python/hopsworks_common
  environment.py 174-175
  project.py
  spark_connect_utils.py
  python/hopsworks_common/core
  app_api.py
  dataset_api.py
  project_api.py
  type_systems.py
  python/hsfs
  feature_group.py
  feature_store.py
  ge_validation_result.py
  online_config.py
  storage_connector.py
  validation_report.py
  python/hsfs/core
  data_source_api.py
  delta_engine.py
  python/hsfs/engine
  python.py
  spark.py
  python/hsml
  deployable_component_logs.py
  inference_batcher.py
  predictor.py
  python/hsml/core
  serving_api.py
  python/hsml/engine
  model_engine.py
  serving_engine.py
  python/hsml/llm
  predictor.py
Project Total  

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

aversey and others added 3 commits April 27, 2026 16:27
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a 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 9 out of 9 changed files in this pull request and generated 6 comments.

Comment thread python/hsml/model_serving.py Outdated
Comment thread python/hsml/model_serving.py
Comment thread python/pyproject.toml
Comment thread python/hsml/model_serving.py
Comment thread python/hsml/model_serving.py
Comment thread python/hsml/model_serving.py
@aversey aversey requested a review from javierdlrm April 30, 2026 09:26
Comment thread python/hsml/deployment.py Outdated
@aversey
Copy link
Copy Markdown
Contributor Author

aversey commented Apr 30, 2026

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants