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:**
python
from zenml import pipeline, ModelVersion
pipeline(model_version=ModelVersion(name="model_name",version="v42"))
def p():
...
**New syntax:**
python
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:**
python
from zenml import step, ModelVersion
step(model_version=ModelVersion(name="model_name",version="v42"))
def s():
...
**New syntax:**
python
from zenml import step, Model
step(model=Model(name="model_name",version="v42"))
def s():
...
Acquiring model configuration from pipeline/step context
**Old syntax:**
python
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:**
python
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:**
yaml
model_version:
name: model_name
version: v42
...
**New syntax:**
yaml
model:
name: model_name
version: v42
...
`ModelVersion.metadata` -> `Model.run_metadata`
**Old syntax:**
python
from zenml import ModelVersion
def s():
model_version = ModelVersion(name="model_name",version="production")
some_metadata = model_version.metadata["some_metadata"].value
...
**New syntax:**
python
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: https://github.com/zenml-io/zenml/pull/2267
What's Changed
* Remove --name from service account creation in docs by christianversloot in https://github.com/zenml-io/zenml/pull/2295
* Secrets store hot backup and restore by stefannica in https://github.com/zenml-io/zenml/pull/2277
* Updating the README of the e2e template by bcdurak in https://github.com/zenml-io/zenml/pull/2299
* Add missing docstring for Skypilot setting by schustmi in https://github.com/zenml-io/zenml/pull/2305
* Update Manage artifacts starter guide docs by JonathanLoscalzo in https://github.com/zenml-io/zenml/pull/2301
* Add some tiny details and move around a page by htahir1 in https://github.com/zenml-io/zenml/pull/2297
* Model links lazy evaluation in pipeline code by avishniakov in https://github.com/zenml-io/zenml/pull/2205
* Link artifact to MCP entity via function call or implicitly in `save_artifact` by avishniakov in https://github.com/zenml-io/zenml/pull/2298
* Extend MCP/ACP listing capabilities by avishniakov in https://github.com/zenml-io/zenml/pull/2285
* Add the latest `zenml` version to migration testing scripts by strickvl in https://github.com/zenml-io/zenml/pull/2294
* Remove Python 3.7 check for Langchain Integration by strickvl in https://github.com/zenml-io/zenml/pull/2308
* Allow spellcheck to run for docs changes by strickvl in https://github.com/zenml-io/zenml/pull/2307
* Add helper message for `zenml up --blocking` login by strickvl in https://github.com/zenml-io/zenml/pull/2290
* Fix secret migration from an external store in helm deployment by stefannica in https://github.com/zenml-io/zenml/pull/2315
* Small docs fixes by htahir1 in https://github.com/zenml-io/zenml/pull/2314
* Rename model version to a model by avishniakov in https://github.com/zenml-io/zenml/pull/2267
* Updating the docs after the Skypilot tests by bcdurak in https://github.com/zenml-io/zenml/pull/2311
* Remove unused Segment / Mixpanel generation workflow and script by strickvl in https://github.com/zenml-io/zenml/pull/2319
* Add `log_step_metadata` utility function by strickvl in https://github.com/zenml-io/zenml/pull/2322
* Add conditional checks to prevent scheduled actions running inside forked repositories by strickvl in https://github.com/zenml-io/zenml/pull/2317
* RBAC resource sharing by schustmi in https://github.com/zenml-io/zenml/pull/2320
* Fix typo in migration downgrade by avishniakov in https://github.com/zenml-io/zenml/pull/2337
* Separate `skypilot` flavors into different folders by safoinme in https://github.com/zenml-io/zenml/pull/2332
* Add warning for GCP integration when using Python >=3.11 by strickvl in https://github.com/zenml-io/zenml/pull/2333
New Contributors
* JonathanLoscalzo made their first contribution at https://github.com/zenml-io/zenml/pull/2301
**Full Changelog**: https://github.com/zenml-io/zenml/compare/0.54.1...0.55.0