Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into feature/add-generi…
Browse files Browse the repository at this point in the history
…c-api-token
  • Loading branch information
stefannica committed Nov 13, 2024
2 parents 77a591c + 496a0d5 commit 86c4b09
Show file tree
Hide file tree
Showing 36 changed files with 826 additions and 85 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ the Apache License Version 2.0.
<a href="https://github.com/zenml-io/zenml-projects">Projects Showcase</a>
<br />
<br />
🎉 Version 0.68.1 is out. Check out the release notes
🎉 Version 0.70.0 is out. Check out the release notes
<a href="https://github.com/zenml-io/zenml/releases">here</a>.
<br />
🖥️ Download our VS Code Extension <a href="https://marketplace.visualstudio.com/items?itemName=ZenML.zenml-vscode">here</a>.
Expand Down
77 changes: 77 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,82 @@
<!-- markdown-link-check-disable -->

# 0.70.0

The **ZenML 0.70.0** release includes a significant number of database schema changes and migrations, which means upgrading to this version will require extra caution. As always, please make sure to make a copy of your production database before upgrading.

## Key Changes

* **Artifact Versioning Improvements**: The handling of artifact versions has been improved, including the API improvements like the ability to batch artifact version requests to improve the execution times and more types for the step input/output artifacts, including multiple versions of the same artifact (e.g. model checkpoints), to improve the UX using ZenML UI or while working directly with the API.
* **Scalability Enhancements**: Various scalability improvements have been made, such as reducing unnecessary server requests and incrementing artifact versions server-side. These enhancements are expected to provide significant speed and scale improvements for ZenML users.
* **Metadata management**: Now, all the metadata-creating functions are gathered under one method called `log_metadata`. It is possible to call this method with different inputs to log run metadata for artifact versions, model versions, steps, and runs.
* **The oneof filtering**: This allows to filter entities using a new operator called `oneof`. You can use this with IDs (UUID type) or tags (or other string-typed attributes) like this `PipelineRunFilter(tag='oneof:["cats", "dogs"]')`.
* **Documentation Improvements**: The ZenML documentation has been restructured and expanded, including the addition of new sections on [finetuning](https://docs.zenml.io/user-guide/llmops-guide/finetuning-llms) and [LLM/ML engineering](https://docs.zenml.io/user-guide/llmops-guide/evaluation) resources.
* **Bug Fixes**: This release includes several bug fixes, including issues with in-process main module source loading, and more.

## Caution: Make sure to back up your data before upgrading!
While this release brings many valuable improvements, the database schema changes and migrations pose a potential risk to users. It is strongly recommended that users:

* **Test the upgrade on a non-production environment**: Before upgrading a production system, test the upgrade process in a non-production environment to identify and address any issues.
* **Back up your data**: Ensure that you have a reliable backup of your ZenML data before attempting the upgrade.

## What's Changed
* Optimizing the CI workflows by @bcdurak in https://github.com/zenml-io/zenml/pull/3145
* Adding 0.68.0 to the migration tests by @bcdurak in https://github.com/zenml-io/zenml/pull/3144
* Move step durations to body by @schustmi in https://github.com/zenml-io/zenml/pull/3046
* Docs on ZenML setup by @strickvl in https://github.com/zenml-io/zenml/pull/3100
* Remove wrongly set Model.was_created_in_this_run attribute by @schustmi in https://github.com/zenml-io/zenml/pull/3129
* Allow specifying run tags in pipeline configuration by @schustmi in https://github.com/zenml-io/zenml/pull/3130
* Fix materializer type compatibility check during loading by @schustmi in https://github.com/zenml-io/zenml/pull/3105
* [docs] Add icons to headers in docs by @wjayesh in https://github.com/zenml-io/zenml/pull/3149
* fix icons and remove redundant file by @wjayesh in https://github.com/zenml-io/zenml/pull/3150
* Merge 0.68.1 release into develop by @schustmi in https://github.com/zenml-io/zenml/pull/3153
* Allow filtering pipeline runs by stack component by @schustmi in https://github.com/zenml-io/zenml/pull/3142
* Allow artifact response as step input by @schustmi in https://github.com/zenml-io/zenml/pull/3134
* Filter component by user name by @schustmi in https://github.com/zenml-io/zenml/pull/3126
* [docs] Restructure how-to section to make it more readable by @wjayesh in https://github.com/zenml-io/zenml/pull/3147
* ZenML Pro web login implementation by @stefannica in https://github.com/zenml-io/zenml/pull/3141
* Scalability improvements: Reduce misc/hydration server requests by @schustmi in https://github.com/zenml-io/zenml/pull/3093
* Fix in-process main module source loading by @schustmi in https://github.com/zenml-io/zenml/pull/3119
* Catch assertion in GH library by @schustmi in https://github.com/zenml-io/zenml/pull/3160
* Enable cache precomputation for run templates by @schustmi in https://github.com/zenml-io/zenml/pull/3156
* Add LLM and ML engineering books to README by @htahir1 in https://github.com/zenml-io/zenml/pull/3159
* Add helper method to quickly create run template from pipeline by @schustmi in https://github.com/zenml-io/zenml/pull/3155
* Add CLI command to export stack requirements by @schustmi in https://github.com/zenml-io/zenml/pull/3158
* Scalability improvements: Increment artifact version server side by @schustmi in https://github.com/zenml-io/zenml/pull/3095
* Update OpenAI integration by @safoinme in https://github.com/zenml-io/zenml/pull/3163
* Remove deprecated torch version constraint by @safoinme in https://github.com/zenml-io/zenml/pull/3166
* vLLM model deployer by @dudeperf3ct in https://github.com/zenml-io/zenml/pull/3032
* Don't initialize client during flavor sync by @schustmi in https://github.com/zenml-io/zenml/pull/3168
* Cleanup materializer temporary directories after step execution by @schustmi in https://github.com/zenml-io/zenml/pull/3162
* Fix langchain in API docs by @avishniakov in https://github.com/zenml-io/zenml/pull/3171
* Finetuning guide by @strickvl in https://github.com/zenml-io/zenml/pull/3157
* Fix mypy issue vllm evidently by @safoinme in https://github.com/zenml-io/zenml/pull/3169
* Add artifact version batch request by @schustmi in https://github.com/zenml-io/zenml/pull/3164
* Add missing section links by @strickvl in https://github.com/zenml-io/zenml/pull/3172
* Fix uvloop mypy by @avishniakov in https://github.com/zenml-io/zenml/pull/3174
* Multiple output versions for a step outputs by @avishniakov in https://github.com/zenml-io/zenml/pull/3072
* Simplify Metadata handling by @AlexejPenner in https://github.com/zenml-io/zenml/pull/3096
* assign value to component_name in preset stack registration by @hirekk in https://github.com/zenml-io/zenml/pull/3178
* Updating the template versions with `zenml login` by @bcdurak in https://github.com/zenml-io/zenml/pull/3177
* Better input artifacts typing by @avishniakov in https://github.com/zenml-io/zenml/pull/3099
* Refactor environment setup and caching by @safoinme in https://github.com/zenml-io/zenml/pull/3077
* Fix spelling errors by @safoinme in https://github.com/zenml-io/zenml/pull/3181
* Prevent some race conditions by @schustmi in https://github.com/zenml-io/zenml/pull/3167
* Update stack deployments with latest features by @stefannica in https://github.com/zenml-io/zenml/pull/3183
* Terraform best practices by @htahir1 in https://github.com/zenml-io/zenml/pull/3131
* Fix sagemaker pipeline URLs by @stefannica in https://github.com/zenml-io/zenml/pull/3176
* Fix lightning orchestrator for multi-step pipelines by @wjayesh in https://github.com/zenml-io/zenml/pull/3170
* Port bugfixes from #2497 by @avishniakov in https://github.com/zenml-io/zenml/pull/3179
* Removing the `enable_cache` from the config files by @bcdurak in https://github.com/zenml-io/zenml/pull/3184
* Don't pass tags to step config by @schustmi in https://github.com/zenml-io/zenml/pull/3186
* New `log_metadata` function, new `oneof` filtering, additional `run_metadata` filtering by @bcdurak in https://github.com/zenml-io/zenml/pull/3182

## New Contributors
* @hirekk made their first contribution in https://github.com/zenml-io/zenml/pull/3178

**Full Changelog**: https://github.com/zenml-io/zenml/compare/0.68.1...0.70.0


# 0.68.1

Fixes an issue with some partially cached pipelines running on remote orchestrators.
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/configs/training_aws.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Environment configuration
settings:
docker:
parent_image: "715803424590.dkr.ecr.eu-central-1.amazonaws.com/zenml-public-pipelines:quickstart-0.68.1-py3.11-aws"
parent_image: "715803424590.dkr.ecr.eu-central-1.amazonaws.com/zenml-public-pipelines:quickstart-0.70.0-py3.11-aws"
skip_build: True # If you switch this to False remove the parent_image
requirements: requirements.txt
orchestrator.sagemaker:
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/configs/training_azure.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Environment configuration
settings:
docker:
parent_image: "zenmldocker/zenml-public-pipelines:quickstart-0.68.1-py3.11-azure"
parent_image: "zenmldocker/zenml-public-pipelines:quickstart-0.70.0-py3.11-azure"
skip_build: True
requirements: requirements.txt
# Uncomment the following lines to specify the accelerator for your azureml orchestrator
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/configs/training_gcp.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Environment configuration
settings:
docker:
parent_image: "zenmldocker/zenml-public-pipelines:quickstart-0.68.1-py3.11-gcp"
parent_image: "zenmldocker/zenml-public-pipelines:quickstart-0.70.0-py3.11-gcp"
skip_build: True
requirements: requirements.txt
# Uncomment the following two lines to specify the accelerator for your vertex orchestrator
Expand Down
6 changes: 3 additions & 3 deletions examples/quickstart/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -494,7 +494,7 @@
"# Common imports and setup\n",
"if CLOUD_PROVIDER.lower() == \"gcp\":\n",
" parent_image = (\n",
" \"zenmldocker/zenml-public-pipelines:quickstart-0.68.1-py3.11-gcp\"\n",
" \"zenmldocker/zenml-public-pipelines:quickstart-0.70.0-py3.11-gcp\"\n",
" )\n",
" skip_build = True\n",
"\n",
Expand All @@ -503,7 +503,7 @@
" SagemakerOrchestratorSettings,\n",
" )\n",
"\n",
" parent_image = \"339712793861.dkr.ecr.eu-central-1.amazonaws.com/zenml-public-pipelines:quickstart-0.68.1-py3.11-aws\"\n",
" parent_image = \"339712793861.dkr.ecr.eu-central-1.amazonaws.com/zenml-public-pipelines:quickstart-0.70.0-py3.11-aws\"\n",
" skip_build = True # if you switch this to False, you need to remove the parent image\n",
"\n",
" settings[\"orchestrator.sagemaker\"] = SagemakerOrchestratorSettings(\n",
Expand All @@ -512,7 +512,7 @@
"\n",
"elif CLOUD_PROVIDER.lower() == \"azure\":\n",
" parent_image = (\n",
" \"zenmldocker/zenml-public-pipelines:quickstart-0.68.1-py3.11-azure\"\n",
" \"zenmldocker/zenml-public-pipelines:quickstart-0.70.0-py3.11-azure\"\n",
" )\n",
" skip_build = True\n",
"\n",
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zenml[server]==0.68.1
zenml[server]==0.70.0
notebook
pyarrow
datasets
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/requirements_aws.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zenml[server]==0.68.1
zenml[server]==0.70.0
notebook
pyarrow
datasets
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/requirements_azure.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zenml[server]==0.68.1
zenml[server]==0.70.0
notebook
pyarrow
datasets
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/requirements_gcp.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
zenml[server]==0.68.1
zenml[server]==0.70.0
notebook
pyarrow
datasets
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "zenml"
version = "0.68.1"
version = "0.70.0"
packages = [{ include = "zenml", from = "src" }]
description = "ZenML: Write production-ready ML code."
authors = ["ZenML GmbH <[email protected]>"]
Expand Down
2 changes: 1 addition & 1 deletion src/zenml/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.68.1
0.70.0
2 changes: 2 additions & 0 deletions src/zenml/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
from zenml.pipelines import get_pipeline_context, pipeline
from zenml.steps import step, get_step_context
from zenml.steps.utils import log_step_metadata
from zenml.utils.metadata_utils import log_metadata
from zenml.entrypoints import entrypoint

__all__ = [
Expand All @@ -56,6 +57,7 @@
"get_pipeline_context",
"get_step_context",
"load_artifact",
"log_metadata",
"log_artifact_metadata",
"log_model_metadata",
"log_step_metadata",
Expand Down
6 changes: 5 additions & 1 deletion src/zenml/artifacts/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def log_artifact_metadata(
not provided, when being called inside a step that produces an
artifact named `artifact_name`, the metadata will be associated to
the corresponding newly created artifact. Or, if not provided when
being called outside of a step, or in a step that does not produce
being called outside a step, or in a step that does not produce
any artifact named `artifact_name`, the metadata will be associated
to the latest version of that artifact.
Expand All @@ -417,6 +417,10 @@ def log_artifact_metadata(
called inside a step with a single output, or, if neither an
artifact nor an output with the given name exists.
"""
logger.warning(
"The `log_artifact_metadata` function is deprecated and will soon be "
"removed. Please use `log_metadata` instead."
)
try:
step_context = get_step_context()
in_step_outputs = (artifact_name in step_context._outputs) or (
Expand Down
7 changes: 6 additions & 1 deletion src/zenml/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -3796,6 +3796,7 @@ def list_pipeline_runs(
templatable: Optional[bool] = None,
tag: Optional[str] = None,
user: Optional[Union[UUID, str]] = None,
run_metadata: Optional[Dict[str, str]] = None,
pipeline: Optional[Union[UUID, str]] = None,
code_repository: Optional[Union[UUID, str]] = None,
model: Optional[Union[UUID, str]] = None,
Expand Down Expand Up @@ -3835,6 +3836,7 @@ def list_pipeline_runs(
templatable: If the runs should be templatable or not.
tag: Tag to filter by.
user: The name/ID of the user to filter by.
run_metadata: The run_metadata of the run to filter by.
pipeline: The name/ID of the pipeline to filter by.
code_repository: Filter by code repository name/ID.
model: Filter by model name/ID.
Expand Down Expand Up @@ -3874,6 +3876,7 @@ def list_pipeline_runs(
tag=tag,
unlisted=unlisted,
user=user,
run_metadata=run_metadata,
pipeline=pipeline,
code_repository=code_repository,
stack=stack,
Expand Down Expand Up @@ -4194,7 +4197,7 @@ def get_artifact_version(
),
)
except RuntimeError:
pass # Cannot link to step run if called outside of a step
pass # Cannot link to step run if called outside a step
return artifact

def list_artifact_versions(
Expand Down Expand Up @@ -4222,6 +4225,7 @@ def list_artifact_versions(
user: Optional[Union[UUID, str]] = None,
model: Optional[Union[UUID, str]] = None,
pipeline_run: Optional[Union[UUID, str]] = None,
run_metadata: Optional[Dict[str, str]] = None,
tag: Optional[str] = None,
hydrate: bool = False,
) -> Page[ArtifactVersionResponse]:
Expand Down Expand Up @@ -4253,6 +4257,7 @@ def list_artifact_versions(
user: Filter by user name or ID.
model: Filter by model name or ID.
pipeline_run: Filter by pipeline run name or ID.
run_metadata: Filter by run metadata.
hydrate: Flag deciding whether to hydrate the output model(s)
by including metadata fields in the response.
Expand Down
1 change: 1 addition & 0 deletions src/zenml/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ class GenericFilterOps(StrEnum):
CONTAINS = "contains"
STARTSWITH = "startswith"
ENDSWITH = "endswith"
ONEOF = "oneof"
GTE = "gte"
GT = "gt"
LTE = "lte"
Expand Down
5 changes: 5 additions & 0 deletions src/zenml/model/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ def log_model_metadata(
ValueError: If no model name/version is provided and the function is not
called inside a step with configured `model` in decorator.
"""
logger.warning(
"The `log_model_metadata` function is deprecated and will soon be "
"removed. Please use `log_metadata` instead."
)

if model_name and model_version:
from zenml import Model

Expand Down
Loading

0 comments on commit 86c4b09

Please sign in to comment.