From 235f3337ef722e7674d20e39464bedf0f4c2a473 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Can=20Durak?= <36421093+bcdurak@users.noreply.github.com> Date: Wed, 26 Jun 2024 18:25:24 +0200 Subject: [PATCH] Prepare release 0.60.0 (#2804) * prepare release * Prepare release 0.60.0 * fixing the release notes * Prepare release 0.60.0 Co-authored-by: Alex Strick van Linschoten --------- Co-authored-by: Alex Strick van Linschoten --- README.md | 2 +- RELEASE_NOTES.md | 206 ++++++++++++++++++ pyproject.toml | 2 +- src/zenml/VERSION | 2 +- src/zenml/zen_server/deploy/helm/Chart.yaml | 2 +- src/zenml/zen_server/deploy/helm/README.md | 4 +- .../migrations/versions/0.60.0_release.py | 23 ++ 7 files changed, 235 insertions(+), 6 deletions(-) create mode 100644 src/zenml/zen_stores/migrations/versions/0.60.0_release.py diff --git a/README.md b/README.md index 399ef2cf966..7dd6b997416 100644 --- a/README.md +++ b/README.md @@ -306,7 +306,7 @@ the Apache License Version 2.0. Projects Showcase

- πŸŽ‰ Version 0.58.2 is out. Check out the release notes + πŸŽ‰ Version 0.60.0 is out. Check out the release notes here.
πŸ–₯️ Download our VS Code Extension here. diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 9f6be46ab4d..8cf24a3db25 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,211 @@ +# 0.60.0 + +ZenML now uses Pydantic v2. πŸ₯³ + +This upgrade comes with a set of critical updates. While your user experience +mostly remains unaffected, you might see unexpected behavior due to the +changes in our dependencies. Moreover, since Pydantic v2 provides a slightly +stricter validation process, you might end up bumping into some validation +errors which was not caught before, but it is all for the better πŸ™‚ If +you run into any other errors, please let us know either on +[GitHub](https://github.com/zenml-io/zenml) or on +our [Slack](https://zenml.io/slack-invite). + +## Changes in some of the critical dependencies + +- SQLModel is one of the core dependencies of ZenML and prior to this upgrade, + we were utilizing version `0.0.8`. However, this version is relatively + outdated and incompatible with Pydantic v2. Within the scope of this upgrade, + we upgraded it to `0.0.18`. +- Due to the change in the SQLModel version, we also had to upgrade our + SQLAlchemy dependency from V1 to v2. While this does not affect the way + that you are using ZenML, if you are using SQLAlchemy in your environment, + you might have to migrate your code as well. For a detailed list of changes, + feel free to + check [their migration guide](https://docs.sqlalchemy.org/en/20/changelog/migration_20.html). + +## Changes in `pydantic` + +Pydantic v2 brings a lot of new and exciting changes to the table. The core +logic now uses Rust, and it is much faster and more efficient in terms of +performance. On top of it, the main concepts like model design, configuration, +validation, or serialization now include a lot of new cool features. If you are +using `pydantic` in your workflow and are interested in the new changes, you can +check [the brilliant migration guide](https://docs.pydantic.dev/2.7/migration/) +provided by the `pydantic` team to see the full list of changes. + +## Changes in our integrations changes + +Much like ZenML, `pydantic` is an important dependency in many other Python +packages. That’s why conducting this upgrade helped us unlock a new version for +several ZenML integration dependencies. Additionally, in some instances, we had +to adapt the functionality of the integration to keep it compatible +with `pydantic`. So, if you are using any of these integrations, please go +through the changes. + +### Airflow + +As mentioned above upgrading our `pydantic` dependency meant we had to upgrade +our `sqlmodel` dependency. Upgrading our `sqlmodel` dependency meant we had to +upgrade our `sqlalchemy` dependency as well. Unfortunately, `apache-airflow` +is still using `sqlalchemy` v1 and is incompatible with pydantic v2. As a +solution, we have removed the dependencies of the `airflow` integration. Now, +you can use ZenML to create your Airflow pipelines and use a separate +environment to run them with Airflow. You can check the updated docs +[right here](https://docs.zenml.io/stack-components/orchestrators/airflow). + +### AWS + +Some of our integrations now require `protobuf` 4. Since our +previous `sagemaker` version (`2.117.0`) did not support `protobof` 4, we could +not pair it with these new integrations. Thankfully `sagemaker` started +supporting `protobuf` 4 with version `2.172.0` and relaxing its dependency +solved the compatibility issue. + +### Evidently + +The old version of our `evidently` integration was not compatible with Pydantic +v2. They started supporting it starting from version `0.4.16`. As their latest +version is `0.4.22`, the new dependency of the integration is limited between +these two versions. + +### Feast + +Our previous implementation of the `feast` integration was not compatible with +Pydantic v2 due to the extra `redis` dependency we were using. This extra +dependency is now removed and the `feast` integration is working as intended. + +### GCP + +The previous version of the Kubeflow dependency (`kfp==1.8.22`) in our GCP +integration required Pydantic V1 to be installed. While we were upgrading our +Pydantic dependency, we saw this as an opportunity and wanted to use this chance +to upgrade the `kfp` dependency to v2 (which has no dependencies on the Pydantic +library). This is why you may see some functional changes in the vertex step +operator and orchestrator. If you would like to go through the changes in +the `kfp` library, you can +find [the migration guide here](https://www.kubeflow.org/docs/components/pipelines/v2/migration/). + +### Great Expectations + +Great Expectations started supporting Pydantic v2 starting from +version `0.17.15` and they are closing in on their `1.0` release. Since this +release might include a lot of big changes, we adjusted the dependency in our +integration to `great-expectations>=0.17.15,<1.0`. We will try to keep it +updated in the future once they release the `1.0` version + +### Kubeflow + +Similar to the GCP integration, the previous version of the kubeflow +dependency (`kfp==1.8.22`) in our `kubeflow` integration required Pydantic V1 to +be installed. While we were upgrading our Pydantic dependency, we saw this as an +opportunity and wanted to use this chance to upgrade the `kfp` dependency to +v2 (which has no dependencies on the Pydantic library). If you would like to go +through the changes in the `kfp` library, you can +find [the migration guide here](https://www.kubeflow.org/docs/components/pipelines/v2/migration/). ( +We also are considering adding an alternative version of this integration so our +users can keep using `kfp` V1 in their environment. Stay tuned for any updates.) + +### MLflow + +`mlflow` is compatible with both Pydantic V1 and v2. However, due to a known +issue, if you install `zenml` first and then +do `zenml integration install mlflow -y`, it downgrades `pydantic` to V1. This +is why we manually added the same duplicated `pydantic` requirement in the +integration definition as well. Keep in mind that the `mlflow` library is still +using some features of `pydantic` V1 which are deprecated. So, if the +integration is installed in your environment, you might run into some +deprecation warnings. + +### Label Studio + +While we were working on updating our `pydantic` dependency, +the `label-studio-sdk` has released its 1.0 version. In this new +version, `pydantic` v2 is also supported. The implementation and documentation +of our Label Studio integration have been updated accordingly. + +### Skypilot + +With the switch to `pydantic` v2, the implementation of our `skypilot` +integration mostly remained untouched. However, due to an incompatibility +between the new version `pydantic` and the `azurecli`, the `skypilot[azure]` +flavor can not be installed at the same time, thus our `skypilot_azure` +integration is currently deactivated. We are working on fixing this issue and if +you are using this integration in your workflows, we recommend staying on the +previous version of ZenML until we can solve this issue. + +### Tensorflow + +The new version of `pydantic` creates a drift between `tensorflow` +and `typing_extensions` packages and relaxing the dependencies here resolves +the issue. At the same time, the upgrade to `kfp` v2 (in integrations +like `kubeflow`, `tekton`, or `gcp`) bumps our `protobuf` dependency from `3.X` +to `4.X`. To stay compatible with this requirement, the installed version +of `tensorflow` needs to be `>=2.12.0`. While this change solves the dependency +issues in most settings, we have bumped into some errors while +using `tensorflow` 2.12.0 on Python 3.8 on Ubuntu. If you would like to use this +integration, please consider using a higher Python version. + +### Tekton + +Similar to the `gcp` and `kubeflow` integrations, the old version of +our `tekton` integration was not compatible with `pydantic` V1 due to its `kfp` +dependency. With the switch from `kfp` V1 to v2, we have adapted our +implementation to use the new version of `kfp` library and updated our +documentation accordingly. + +## Additional Changes + +* We have also released a new version of `mlstacks` with Pydantic v2 support. +If you are using it in your development environment, you have to upgrade your +`mlstacks` package as well. +* Added `zenml.integrations.huggingface.steps.run_with_accelerate` to enable running any step using [`accelerate`](https://huggingface.co/docs/accelerate/en/index). This function is supported by a utility that wraps any step function into a CLI script (which is required by most distributed training tools). +* Fixed a memory leak that was observed while using the ZenML dashboard to view pipeline logs or artifact visualizations logged through an S3 Artifact Store linked to an AWS Service Connector. +* Previously, we had an option called `build_options` that allowed users to pass arguments to the docker build command. However, these options were only applied when building the parent image. On macOS with ARM architecture, one needs to specify `platform=linux/amd64` to the build command to leverage local caching of Docker image layers. We have added a way to specify these build options for the "main" ZenML build as well, not just the parent image build. Additionally, users can now specify a `.dockerignore` file for the parent image build, which was previously not possible. + +## What's Changed + +* Extend migration testing by @avishniakov in https://github.com/zenml-io/zenml/pull/2768 +* Add retry docs by @htahir1 in https://github.com/zenml-io/zenml/pull/2770 +* Fix nightly Docker build by @strickvl in https://github.com/zenml-io/zenml/pull/2769 +* Start CTA and Cloud -> Pro renaming by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2773 +* Add star CTA to `README` by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2777 +* Use build python version if available by @schustmi in https://github.com/zenml-io/zenml/pull/2775 +* Introduced Legacy env var in docs by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2783 +* Fixing the nlp template for the upcoming pydantic upgrade by @bcdurak in https://github.com/zenml-io/zenml/pull/2778 +* Full renaming away from cloud to pro by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2782 +* Adjust docs url for flavors by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2772 +* Fixed broken unit test on develop and fixed duplicate / by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2785 +* Added timeout by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2786 +* Bump NLP template by @avishniakov in https://github.com/zenml-io/zenml/pull/2787 +* Raise error if Dockerfile does not exist by @schustmi in https://github.com/zenml-io/zenml/pull/2776 +* Pin `numpy<2.0.0` by @avishniakov in https://github.com/zenml-io/zenml/pull/2789 +* Fix partial logs loss in step operators with immutable FS in the backend by @avishniakov in https://github.com/zenml-io/zenml/pull/2788 +* Upgrading to `pydantic` v2 by @bcdurak in https://github.com/zenml-io/zenml/pull/2543 +* New CI/CD docs by @AlexejPenner in https://github.com/zenml-io/zenml/pull/2784 +* Improvements for running pipelines from the dashboard by @schustmi in https://github.com/zenml-io/zenml/pull/2781 +* Accelerate runner helper method by @avishniakov in https://github.com/zenml-io/zenml/pull/2746 +* Add `--ignore-errors` flag for `zenml artifact prune` by @strickvl in https://github.com/zenml-io/zenml/pull/2780 +* Enable running a pipeline through the client by @schustmi in https://github.com/zenml-io/zenml/pull/2736 +* Accelerated template LLMs by @avishniakov in https://github.com/zenml-io/zenml/pull/2797 +* Separate actions from triggers by @schustmi in https://github.com/zenml-io/zenml/pull/2700 +* Fix hook type definition and improve code completion for pipeline decorator by @schustmi in https://github.com/zenml-io/zenml/pull/2793 +* Allow specifying build options for main image build by @schustmi in https://github.com/zenml-io/zenml/pull/2749 +* Small improvements for yaml config files by @schustmi in https://github.com/zenml-io/zenml/pull/2796 +* Docs for the `pydantic` migration guide by @bcdurak in https://github.com/zenml-io/zenml/pull/2801 +* Bump mlflow to v2.14.1 by @christianversloot in https://github.com/zenml-io/zenml/pull/2779 +* Bugfix fixing the installation script to use the right mlstacks branch by @bcdurak in https://github.com/zenml-io/zenml/pull/2803 +* Fix S3 artifact store memory leak and other improvements by @stefannica in https://github.com/zenml-io/zenml/pull/2802 + +## πŸ₯³ Community Contributions πŸ₯³ + +We'd like to give a special thanks to @christianversloot who contributed to +this release by bumping the `mlflow` version to 2.14.1 + +**Full Changelog**: https://github.com/zenml-io/zenml/compare/0.58.2...0.60.0 + # 0.58.2 The 0.58.2 minor release is packed with a set of improvements to the ZenML logging and ZenML Server. diff --git a/pyproject.toml b/pyproject.toml index 3f7131d1bb7..442323023e1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "zenml" -version = "0.58.2" +version = "0.60.0" packages = [{ include = "zenml", from = "src" }] description = "ZenML: Write production-ready ML code." authors = ["ZenML GmbH "] diff --git a/src/zenml/VERSION b/src/zenml/VERSION index e94e3ad815a..12193b84d55 100644 --- a/src/zenml/VERSION +++ b/src/zenml/VERSION @@ -1 +1 @@ -0.58.2 \ No newline at end of file +0.60.0 \ No newline at end of file diff --git a/src/zenml/zen_server/deploy/helm/Chart.yaml b/src/zenml/zen_server/deploy/helm/Chart.yaml index 1667a9cf2cb..c53713e68eb 100644 --- a/src/zenml/zen_server/deploy/helm/Chart.yaml +++ b/src/zenml/zen_server/deploy/helm/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: zenml -version: "0.58.2" +version: "0.60.0" description: Open source MLOps framework for portable production ready ML pipelines keywords: - mlops diff --git a/src/zenml/zen_server/deploy/helm/README.md b/src/zenml/zen_server/deploy/helm/README.md index c7e78426dfd..344ba6265c0 100644 --- a/src/zenml/zen_server/deploy/helm/README.md +++ b/src/zenml/zen_server/deploy/helm/README.md @@ -20,8 +20,8 @@ ZenML is an open-source MLOps framework designed to help you create robust, main To install the ZenML chart directly from Amazon ECR, use the following command: ```bash -# example command for version 0.58.2 -helm install my-zenml oci://public.ecr.aws/zenml/zenml --version 0.58.2 +# example command for version 0.60.0 +helm install my-zenml oci://public.ecr.aws/zenml/zenml --version 0.60.0 ``` Note: Ensure you have OCI support enabled in your Helm client and that you are authenticated with Amazon ECR. diff --git a/src/zenml/zen_stores/migrations/versions/0.60.0_release.py b/src/zenml/zen_stores/migrations/versions/0.60.0_release.py new file mode 100644 index 00000000000..540e9d6771b --- /dev/null +++ b/src/zenml/zen_stores/migrations/versions/0.60.0_release.py @@ -0,0 +1,23 @@ +"""Release [0.60.0]. + +Revision ID: 0.60.0 +Revises: 25155145c545 +Create Date: 2024-06-25 14:26:48.867005 + +""" + +# revision identifiers, used by Alembic. +revision = "0.60.0" +down_revision = "25155145c545" +branch_labels = None +depends_on = None + + +def upgrade() -> None: + """Upgrade database schema and/or data, creating a new revision.""" + pass + + +def downgrade() -> None: + """Downgrade database schema and/or data back to the previous revision.""" + pass