0.56.2
This release introduces a wide array of new features, enhancements, and bug fixes, with a strong emphasis on elevating the user experience and streamlining machine
learning workflows. Most notably, you can now deploy models using Hugging Face inference endpoints thanks to an open-source community contribution of this model deployer stack component!
Note that 0.56.0 and 0.56.1 were yanked and removed from PyPI due to an issue with the
alembic versions + migration which could affect the database state. This release
fixes that issue.
This release also comes with a breaking change to the services
architecture.
Breaking Change
A significant change in this release is the migration of the Service
(ZenML's technical term for deployment)
registration and deployment from local or remote environments to the ZenML server.
This change will be reflected in an upcoming tab in the dashboard which will
allow users to explore and see the deployed models in the dashboard with their live
status and metadata. This architectural shift also simplifies the model deployer
abstraction and streamlines the model deployment process for users by moving from
limited built-in steps to a more documented and flexible approach.
Important note: If you have models that you previously deployed with ZenML, you might
want to redeploy them to have them stored in the ZenML server and tracked by ZenML,
ensuring they appear in the dashboard.
Additionally, the find_model_server
method now retrieves models (services) from the
ZenML server instead of local or remote deployment environments. As a result, any
usage of find_model_server
will only return newly deployed models stored in the server.
It is also no longer recommended to call service functions like service.start()
.
Instead, use model_deployer.start_model_server(service_id)
, which will allow ZenML
to update the changed status of the service in the server.
Starting a service
Old syntax:
from zenml import pipeline,
from zenml.integrations.bentoml.services.bentoml_deployment import BentoMLDeploymentService
@step
def predictor(
service: BentoMLDeploymentService,
) -> None:
# starting the service
service.start(timeout=10)
New syntax:
from zenml import pipeline
from zenml.integrations.bentoml.model_deployers import BentoMLModelDeployer
from zenml.integrations.bentoml.services.bentoml_deployment import BentoMLDeploymentService
@step
def predictor(
service: BentoMLDeploymentService,
) -> None:
# starting the service
model_deployer = BentoMLModelDeployer.get_active_model_deployer()
model_deployer.start_model_server(service_id=service.service_id, timeout=10)
Enabling continuous deployment
Instead of replacing the parameter that was used in the deploy_model
method to replace the
existing service (if it matches the exact same pipeline name and step name without
taking into accounts other parameters or configurations), we now have a new parameter,
continuous_deployment_mode
, that allows you to enable continuous deployment for
the service. This will ensure that the service is updated with the latest version
if it's on the same pipeline and step and the service is not already running. Otherwise,
any new deployment with different configurations will create a new service.
from zenml import pipeline, step, get_step_context
from zenml.client import Client
@step
def deploy_model() -> Optional[MLFlowDeploymentService]:
# Deploy a model using the MLflow Model Deployer
zenml_client = Client()
model_deployer = zenml_client.active_stack.model_deployer
mlflow_deployment_config = MLFlowDeploymentConfig(
name: str = "mlflow-model-deployment-example",
description: str = "An example of deploying a model using the MLflow Model Deployer",
pipeline_name: str = get_step_context().pipeline_name,
pipeline_step_name: str = get_step_context().step_name,
model_uri: str = "runs:/<run_id>/model" or "models:/<model_name>/<model_version>",
model_name: str = "model",
workers: int = 1
mlserver: bool = False
timeout: int = DEFAULT_SERVICE_START_STOP_TIMEOUT
)
service = model_deployer.deploy_model(mlflow_deployment_config, continuous_deployment_mode=True)
logger.info(f"The deployed service info: {model_deployer.get_model_server_info(service)}")
return service
Major Features and Enhancements:
- A new
Huggingface Model Deployer
has been introduced, allowing you to seamlessly
deploy your Huggingface models using ZenML. (Thank you so much @dudeperf3ct for the contribution!) - Faster Integration and Dependency Management ZenML now leverages the
uv
library,
significantly improving the speed of integration installations and dependency management,
resulting in a more streamlined and efficient workflow. - Enhanced Logging and Status Tracking Logging have been improved, providing better
visibility into the state of your ZenML services. - Improved Artifact Store Isolation: ZenML now prevents unsafe operations that access
data outside the scope of the artifact store, ensuring better isolation and security. - Adding admin user notion for the user accounts and added protection to certain operations
performed via the REST interface to ADMIN-allowed only. - Rate limiting for login API to prevent abuse and protect the server from potential
security threats. - The LLM template is now supported in ZenML, allowing you to use the LLM template
for your pipelines.
🥳 Community Contributions 🥳
We'd like to give a special thanks to @dudeperf3ct he contributed to this release
by introducing the Huggingface Model Deployer. We'd also like to thank @moesio-f
for their contribution to this release by adding a new attribute to the Kaniko
image builder.
Additionally, we'd like to thank @christianversloot for his contributions to this release.
What's Changed
- Upgrading SQLModel to the latest version by @bcdurak in #2452
- Remove KServe integration by @safoinme in #2495
- Upgrade migration testing with 0.55.5 by @avishniakov in #2501
- Relax azure, gcfs and s3 dependencies by @strickvl in #2498
- Use HTTP forwarded headers to detect the real origin of client devices by @stefannica in #2499
- Update README.md for quickstart colab link by @strickvl in #2505
- Add sequential migration tests for MariaDB and MySQL by @strickvl in #2502
- Huggingface Model Deployer by @dudeperf3ct in #2376
- Use
uv
to speed up pip installs & the CI in general by @strickvl in #2442 - Handle corrupted or empty global configuration file by @stefannica in #2508
- Add admin users notion by @avishniakov in #2494
- Remove dashboard from gitignore by @safoinme in #2517
- Colima / Homebrew fix by @strickvl in #2512
- [HELM] Remove extra environment variable assignment by @wjayesh in #2518
- Allow installing packages using UV by @schustmi in #2510
- Additional fields for track events by @bcdurak in #2507
- Check if environment key is set before deleting in HyperAI orchestrator by @christianversloot in #2511
- Fix the pagination in the database backup by @stefannica in #2522
- Bump mlflow to version 2.11.1 by @christianversloot in #2524
- Add docs for uv installation by @schustmi in #2527
- Fix bug in HyperAI orchestrator depends_on parallelism by @christianversloot in #2523
- Upgrade pip in docker images by @schustmi in #2528
- Fix node selector and other fields for DB job in helm chart by @stefannica in #2531
- Revert "Upgrading SQLModel to the latest version" by @bcdurak in #2515
- Add
pod_running_timeout
attribute toKaniko
image builder by @moesio-f in #2509 - Add test to install dashboard script by @strickvl in #2521
- Sort pipeline namespaces by last run by @schustmi in #2514
- Add support for LLM template by @schustmi in #2519
- Rate limiting for login API by @avishniakov in #2484
- Try/catch for Docker client by @christianversloot in #2513
- Fix config file in starter guide by @schustmi in #2534
- Log URL for pipelines and model versions when running a pipeline by @wjayesh in #2506
- Add security exclude by @schustmi in #2541
- Update error message around notebook use by @strickvl in #2536
- Cap
fsspec
for Huggingface integration by @avishniakov in #2542 - Fix integration materializers' URLs in docs by @strickvl in #2538
- Bug fix HyperAI orchestrator: Offload scheduled pipeline execution to bash script by @christianversloot in #2535
- Update
pip check
command to useuv
by @strickvl in #2520 - Implemented bitbucket webhook event source by @AlexejPenner in #2481
- Add ZenMLServiceType and update service registration by @safoinme in #2471
- Prepare release 0.56.0 by @safoinme in #2546
- Fix formatting and release workflow by @strickvl in #2549
- Fix release workflow by @strickvl in #2550
- Fix pipelines and model links for the cloud dashboard by @wjayesh in #2554
- Make starlette non-must for client by @avishniakov in #2553
- Bump MLFlow to version 2.11.2 by @christianversloot in #2552
- Prepare release 0.56.1 by @avishniakov in #2555
- Updated neptune documentation by @SiddhantSadangi in #2548
- 0.56.0 and 0.56.1 in testing by @avishniakov in #2557
- Only install uv once by @schustmi in #2558
- Bump MLFlow to version 2.11.3 by @christianversloot in #2559
- Update docs with warning about pickle materializer insecurity by @avishniakov in #2561
- Add service table migration by @safoinme in #2563
New Contributors
- @dudeperf3ct made their first contribution in #2376
- @moesio-f made their first contribution in #2509
- @SiddhantSadangi made their first contribution in #2548
Full Changelog: 0.55.5...0.56.2