Releases: zenml-io/zenml
0.56.0 [YANKED]
[NOTICE] This version introduced the services class that is causing a bug for those users who are migrating from older versions. 0.56.3 will be out shortly in place of this release. For now, this release has been yanked.
ZenML 0.56.0 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 for an open-source community contribution of this model deployer stack component!
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.
All changes:
- 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 @christ...
0.55.5
This patch contains a number of bug fixes and security improvements.
We improved the isolation of artifact stores so that various artifacts cannot be stored or accessed outside of the configured artifact store scope. Such unsafe operations are no longer allowed. This may have an impact on existing codebases if you have used unsafe file operations in the past.
To illustrate such a side effect, let's consider a remote S3 artifact store is configured for the path s3://some_bucket/some_sub_folder
and in the code you use artifact_store.open("s3://some_bucket/some_other_folder/dummy.txt","w")
-> this operation is considered unsafe as it accesses the data outside the scope of the artifact store. If you really need this to achieve your goals, consider switching to s3fs
or similar libraries for such cases.
Also with this release, the server global configuration is no longer stored on the server file system to prevent exposure of sensitive information.
User entities are now uniquely constrained to prevent the creation of duplicate users under certain race conditions.
What's Changed
- Change runnerset name to ubuntu-runners by @safoinme in #2489
- Allow latest
ruff
versions by @strickvl in #2487 - Uniquely constrained users table by @avishniakov in #2483
- Add option to add base URL for zenml server (with support for cloud) by @wjayesh in #2464
- Improve Artifact Store isolation by @avishniakov in #2490
- Don't write the global config to file on server by @stefannica in #2491
- Add versions for DB migration testing by @strickvl in #2486
Full Changelog: 0.55.4...0.55.5
0.55.4
This release brings a host of enhancements and fixes across the board, including
significant improvements to our services logging and status, the integration of
model saving to the registry via CLI methods, and more robust handling of
parallel pipelines and database entities. We've also made strides in optimizing
MLflow interactions, enhancing our documentation, and ensuring our CI processes
are more robust.
Additionally, we've tackled several bug fixes and performance improvements,
making our platform even more reliable and user-friendly.
We'd like to give a special thanks to @christianversloot and @francoisserra for
their contributions.
What's Changed
- Bump mlflow to 2.10.2 by @christianversloot in #2444
- Improve services logging and status by @safoinme in #2436
- Add
save models to registry
setting of a model to CLI methods by @avishniakov in #2447 - Parallel pipelines can create entities in DB by @avishniakov in #2446
- Fix MlFlow TF autlogging excessive warnings by @avishniakov in #2449
- Fix and improve integration deps checker by @stefannica in #2455
- Add migration test version + use self-hosted runners for release by @strickvl in #2450
- Enable running pipeline via REST by @schustmi in #2389
- Faster mlflow
list_model_versions
by @avishniakov in #2460 - Avoid exposure of tracking uri to metadata by @avishniakov in #2458
- Some important docs updates by @htahir1 in #2463
- Fix CI by @strickvl in #2467
- Fix local Airflow install + docs instructions by @strickvl in #2459
- Update
.coderabbit.yaml
by @strickvl in #2470 - Prevent templates update from formatting the whole codebase by @avishniakov in #2469
- Telemetry guarding for CI & editable installs by @strickvl in #2468
- Add Vertex Step Operator network parameter by @francoisserra in #2398
- Allow integration export to overwrite a pre-existing file by @strickvl in #2466
- Fix
log_model_metadata
with explicit name and version by @avishniakov in #2465 - Triggers, actions, event sources - base abstractions and github and pipeline run implementations by @AlexejPenner in #2312
- Mount zenml config path as empty dir by @stefannica in #2472
- Fix broken docs links by @strickvl in #2473
- Use
uv pip compile
for environment setup in CI by @strickvl in #2474 - MLflow fix for tests on Mac Python 3.9 and 3.10 by @strickvl in #2462
- Improve custom data types docs by @avishniakov in #2476
- Reflect env variables on global configuration by @safoinme in #2371
- Fix zenml deploy secret stores by @safoinme in #2454
- Don't fail when workload manager source fails to load by @schustmi in #2478
- Add analytics events for cloud onboarding by @schustmi in #2456
- Race condition on creating new users allows duplicate usernames by @avishniakov in #2479
Full Changelog: 0.55.3...0.55.4
0.55.3
This patch comes with a variety of bug fixes and documentation updates.
With this release you can now download files directly from artifact versions
that you get back from the client without the need to materialize them. If you
would like to bypass materialization entirely and just download the data or
files associated with a particular artifact version, you can use the
download_files
method:
from zenml.client import Client
client = Client()
artifact = client.get_artifact_version(name_id_or_prefix="iris_dataset")
artifact.download_files("path/to/save.zip")
What's Changed
- Backport: Add HyperAI to TOC (#2406) by @strickvl in #2407
- Fix conditional statements in GitHub workflows by @strickvl in #2404
- Ensure proper spacing in error messages by @christianversloot in #2399
- Fix hyperai markdown table by @strickvl in #2426
- Upgrade Vertex integration
google-cloud-aiplatform
minimum required version to 1.34.0 by @francoisserra in #2428 - Close code block left open in the docs by @jlopezpena in #2432
- Simplify HF example and notify when cache is down by @safoinme in #2300
- Adding the latest version id and name to the artifact response by @bcdurak in #2430
- Adding the ID of the producer pipeline run to artifact versions by @bcdurak in #2431
- Add vulnerability notice to README by @strickvl in #2437
- REVERTED: Allow more recent
adlfs
ands3fs
versions by @strickvl in #2402 - Add new property for filtering service account events by @strickvl in #2405
- Add
download_files
method forArtifactVersion
by @strickvl in #2434 - Fixing
update_model
s and revert #2402 by @bcdurak in #2440
Full Changelog: 0.55.2...0.55.3
0.55.2
This patch comes with a variety of new features, bug-fixes, and documentation updates.
Some of the most important changes include:
- The ability to add tags to outputs through the step context
- Allowing the secret stores to utilize the implicit authentication method of AWS/GCP/Azure Service Connectors
- Lazy loading client methods in a pipeline context
- Updates on the Vertex orchestrator to switch to the native VertexAI scheduler
- The new HyperAI integration featuring a new orchestrator and service connector
- Bumping the mlflow version to 2.10.0
We'd like to give a special thanks to @christianversloot and @francoisserra for their contributions.
What's Changed
0.55.1
in migration testing by @avishniakov in #2368- Credential-less AWS/GCP/Azure Secrets Store support by @stefannica in #2365
- Small docs updates by @strickvl in #2359
- generic
Client()
getters lazy loading by @avishniakov in #2323 - Added slack settings OSSK-382 by @htahir1 in #2378
- Label triggered slow ci by @avishniakov in #2379
- Remove unused
is-slow-ci
input from fast and slow integration testing by @strickvl in #2382 - Add deprecation warning for
ExternalArtifact
non-value features by @avishniakov in #2375 - Add telemetry pipeline run ends by @htahir1 in #2377
- Updating the
update_model
decorator by @bcdurak in #2136 - Mocked API docs building by @avishniakov in #2360
- Add outputs tags function by @avishniakov in #2383
- Bump mlflow to v2.10.0 by @christianversloot in #2374
- Fix sharing of model versions by @schustmi in #2380
- Fix GCP service connector login to overwrite existing valid credentials by @stefannica in #2392
- Update
has_custom_name
for legacy artifacts by @avishniakov in #2384 - Use native VertexAI scheduler capability instead of old GCP official workaround by @francoisserra in #2310
- HyperAI integration: orchestrator and service connector by @christianversloot in #2372
Full Changelog: 0.55.1...0.55.2
0.55.1
If you are actively using the Model Control Plane features, we suggest that you directly upgrade to 0.55.1, bypassing 0.55.0.
This is a patch release bringing backward compatibility for breaking changes introduced in 0.55.0, so that appropriate migration actions can be performed at the desired pace. Please refer to the 0.55.0 release notes for specific information on breaking changes and how to update your code to align with the new way of doing things. We also have updated our documentation to serve you better and introduced PipelineNamespace
models in our API.
Also, this release is packed with Database recovery in case the upgrade failed to migrate the Database to a newer version of ZenML.
What's Changed
- Update skypilot docs by @safoinme in #2344
- Fast CI / Slow CI by @strickvl in #2268
- Add repeating tests and instafail error logging to testing in CI by @strickvl in #2334
- Added more info about metadata by @htahir1 in #2346
- Use GitHub as trusted publisher for PyPI publication by @strickvl in #2343
- Fix code in docs/questions about MCP by @wjayesh in #2340
- Update release notes for 0.55.0 by @avishniakov in #2351
- Fixed metadata docs by @htahir1 in #2350
- Add generate test duration file cron by @safoinme in #2347
- CI comments for slow CI and more conditional membership checking by @strickvl in #2356
- Backward compatible
ModelVersion
by @avishniakov in #2357 - Add model version created to analytics by @avishniakov in #2352
- Make CI run on the appropriate branch by @strickvl in #2358
- Add MVP pipeline namespace support by @schustmi in #2353
- Apply docker run args to skypilot orchestrator VM by @schustmi in #2342
- 📝 Minor docs improvements (basic step example) by @plattenschieber in #2348
- Add DB backup and recovery during DB schema migrations by @wjayesh in #2158
- Fix CI issues by @strickvl in #2363
New Contributors
- @plattenschieber made their first contribution in #2348
Full Changelog: 0.55.0...0.55.1
0.55.0
This release comes with a range of new features, bug fixes and documentation updates. The most notable changes are the ability to do lazy loading of Artifacts and their Metadata and Model and its Metadata inside the pipeline code using pipeline context object, and the ability to link Artifacts to Model Versions implicitly via the save_artifact
function.
Additionally, we've updated the documentation to include a new starter guide on how to manage artifacts, and a new production guide that walks you through how to configure your pipelines to run in production.
Breaking Change
The ModelVersion
concept was renamed to Model
going forward, which affects code bases using the Model Control Plane feature. This change is not backward compatible.
Pipeline decorator
@pipeline(model_version=ModelVersion(...))
-> @pipeline(model=Model(...))
Old syntax:
from zenml import pipeline, ModelVersion
@pipeline(model_version=ModelVersion(name="model_name",version="v42"))
def p():
...
New syntax:
from zenml import pipeline, Model
@pipeline(model=Model(name="model_name",version="v42"))
def p():
...
Step decorator
@step(model_version=ModelVersion(...))
-> @step(model=Model(...))
Old syntax:
from zenml import step, ModelVersion
@step(model_version=ModelVersion(name="model_name",version="v42"))
def s():
...
New syntax:
from zenml import step, Model
@step(model=Model(name="model_name",version="v42"))
def s():
...
Acquiring model configuration from pipeline/step context
Old syntax:
from zenml import pipeline, step, ModelVersion, get_step_context, get_pipeline_context
@pipeline(model_version=ModelVersion(name="model_name",version="v42"))
def p():
model_version = get_pipeline_context().model_version
...
@step(model_version=ModelVersion(name="model_name",version="v42"))
def s():
model_version = get_step_context().model_version
...
New syntax:
from zenml import pipeline, step, Model, get_step_context, get_pipeline_context
@pipeline(model=Model(name="model_name",version="v42"))
def p():
model = get_pipeline_context().model
...
@step(model=Model(name="model_name",version="v42"))
def s():
model = get_step_context().model
...
Usage of model configuration inside pipeline YAML config file
Old syntax:
model_version:
name: model_name
version: v42
...
New syntax:
model:
name: model_name
version: v42
...
ModelVersion.metadata
-> Model.run_metadata
Old syntax:
from zenml import ModelVersion
def s():
model_version = ModelVersion(name="model_name",version="production")
some_metadata = model_version.metadata["some_metadata"].value
...
New syntax:
from zenml import Model
def s():
model = Model(name="model_name",version="production")
some_metadata = model.run_metadata["some_metadata"].value
...
Those using the older syntax are requested to update their code accordingly.
Full set of changes are highlighted here: #2267
What's Changed
- Remove --name from service account creation in docs by @christianversloot in #2295
- Secrets store hot backup and restore by @stefannica in #2277
- Updating the README of the e2e template by @bcdurak in #2299
- Add missing docstring for Skypilot setting by @schustmi in #2305
- Update Manage artifacts starter guide docs by @JonathanLoscalzo in #2301
- Add some tiny details and move around a page by @htahir1 in #2297
- Model links lazy evaluation in pipeline code by @avishniakov in #2205
- Link artifact to MCP entity via function call or implicitly in
save_artifact
by @avishniakov in #2298 - Extend MCP/ACP listing capabilities by @avishniakov in #2285
- Add the latest
zenml
version to migration testing scripts by @strickvl in #2294 - Remove Python 3.7 check for Langchain Integration by @strickvl in #2308
- Allow spellcheck to run for docs changes by @strickvl in #2307
- Add helper message for
zenml up --blocking
login by @strickvl in #2290 - Fix secret migration from an external store in helm deployment by @stefannica in #2315
- Small docs fixes by @htahir1 in #2314
- Rename model version to a model by @avishniakov in #2267
- Updating the docs after the Skypilot tests by @bcdurak in #2311
- Remove unused Segment / Mixpanel generation workflow and script by @strickvl in #2319
- Add
log_step_metadata
utility function by @strickvl in #2322 - Add conditional checks to prevent scheduled actions running inside forked repositories by @strickvl in #2317
- RBAC resource sharing by @schustmi in #2320
- Fix typo in migration downgrade by @avishniakov in #2337
- Separate
skypilot
flavors into different folders by @safoinme in #2332 - Add warning for GCP integration when using Python >=3.11 by @strickvl in #2333
New Contributors
- @JonathanLoscalzo made their first contribution at #2301
Full Changelog: 0.54.1...0.55.0
0.43.1
Backports some important fixes that have been introduced in more recent versions
of ZenML to the 0.43.x release line.
Full Changelog: 0.43.0...0.43.1
0.42.2
Backports some important fixes that have been introduced in more recent versions
of ZenML to the 0.42.x release line.
Full Changelog: 0.42.1...0.42.2
0.53.1
Important
This release has been updated (16th January, 2024)
A bug was introduced in the helm chart starting from version 0.50.0. All releases from that version have been updated with the fix. More details: #2234
This minor release contains a hot fix for a bug that was introduced in 0.53.0
where the secrets manager flavors were not removed from the database
properly. This release fixes that issue.
What's Changed
- Remove secrets manager flavors from DB by @stefannica in #2182
Full Changelog: 0.53.0...0.53.1