Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/update-templates-to-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
python-version: ${{ inputs.python-version }}
stack-name: local
ref-zenml: ${{ github.ref }}
ref-template: 2024.01.22 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
ref-template: '2024-04-05' # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
- name: Clean-up
run: |
rm -rf ./local_checkout
Expand Down Expand Up @@ -122,7 +122,7 @@ jobs:
python-version: ${{ inputs.python-version }}
stack-name: local
ref-zenml: ${{ github.ref }}
ref-template: 2024.01.12 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
ref-template: '2024-04-05' # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
- name: Clean-up
run: |
rm -rf ./local_checkout
Expand Down Expand Up @@ -193,7 +193,7 @@ jobs:
python-version: ${{ inputs.python-version }}
stack-name: local
ref-zenml: ${{ github.ref }}
ref-template: 2024.01.22 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
ref-template: 2024.04.03 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
- name: Clean-up
run: |
rm -rf ./local_checkout
Expand Down Expand Up @@ -266,7 +266,7 @@ jobs:
python-version: ${{ inputs.python-version }}
stack-name: local
ref-zenml: ${{ github.ref }}
ref-template: 2024.03.18 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
ref-template: '2024-04-05' # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
- name: Clean-up
run: |
rm -rf ./local_checkout
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.01.22
_commit: 2024.01.22-3-g71dbb60
_src_path: gh:zenml-io/template-e2e-batch
data_quality_checks: true
email: ''
Expand Down
2 changes: 1 addition & 1 deletion examples/e2e_nlp/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.01.12
_commit: 2024.01.12-3-g84c410d
_src_path: gh:zenml-io/template-nlp
accelerator: cpu
cloud_of_choice: aws
Expand Down
2 changes: 1 addition & 1 deletion examples/llm_finetuning/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.03.18
_commit: 2024.03.18-4-g74fb811
_src_path: gh:zenml-io/template-llm-finetuning
cuda_version: cuda11.8
email: ''
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/.copier-answers.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Changes here will be overwritten by Copier
_commit: 2024.01.22
_commit: 2024.01.22-6-gcda64e9
_src_path: gh:zenml-io/template-starter
email: ''
full_name: ZenML GmbH
Expand Down
2 changes: 1 addition & 1 deletion examples/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To run locally, install ZenML and pull this quickstart:
pip install "zenml[server]"

# clone the ZenML repository
git clone --depth 1 git@github.com:zenml-io/zenml.git
git clone https://github.com/zenml-io/zenml.git
cd zenml/examples/quickstart
```

Expand Down
20 changes: 14 additions & 6 deletions examples/quickstart/quickstart.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,18 @@
},
{
"cell_type": "markdown",
"id": "e3955ff1",
"id": "966ce581",
"metadata": {},
"source": [
"Optional: If you are using [ZenML Cloud](https://zenml.io/cloud), execute the following cell with your tenant URL. Otherwise ignore."
"## ☁️ Step 1: Connect to ZenML Cloud\n",
"\n",
"If you are using [ZenML Cloud](https://zenml.io/cloud), execute the following\n",
"cell with your tenant URL. Otherwise ignore.\n",
"\n",
"ZenML Cloud is a managed service that provides a hosted ZenML environment. It\n",
"allows you to run your pipelines on the cloud, manage your metadata, and\n",
"collaborate with your team. Sign up at [ZenML Cloud](https://zenml.io/cloud) for\n",
"a free trial and to get started!"
]
},
{
Expand Down Expand Up @@ -172,7 +180,7 @@
"id": "35e48460",
"metadata": {},
"source": [
"## 🥇 Step 1: Load your data and execute feature engineering\n",
"## 🥇 Step 2: Load your data and execute feature engineering\n",
"\n",
"We'll start off by importing our data. In this quickstart we'll be working with\n",
"[the Breast Cancer](https://archive.ics.uci.edu/dataset/17/breast+cancer+wisconsin+diagnostic) dataset\n",
Expand Down Expand Up @@ -526,7 +534,7 @@
"id": "8c28b474",
"metadata": {},
"source": [
"# ⌚ Step 2: Training pipeline"
"# ⌚ Step 3: Training pipeline"
]
},
{
Expand Down Expand Up @@ -717,7 +725,7 @@
"id": "e256d145",
"metadata": {},
"source": [
"# 💯 Step 3: Associating a model with your pipeline"
"# 💯 Step 4: Associating a model with your pipeline"
]
},
{
Expand Down Expand Up @@ -914,7 +922,7 @@
"id": "d6306f14",
"metadata": {},
"source": [
"# 🫅 Step 4: Consuming the model in production"
"# 🫅 Step 5: Consuming the model in production"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ ipinfo = { version = ">=4.4.3", optional = true }

# Optional dependencies for project templates
copier = { version = ">=8.1.0", optional = true }
pyyaml-include = {version = "<2.0", optional = true}
jinja2-time = { version = "^0.2.0", optional = true }

# Optional terraform dependency for stack recipes and ZenServer deployments
Expand Down Expand Up @@ -181,7 +182,7 @@ server = [
"Jinja2",
"ipinfo",
]
templates = ["copier", "jinja2-time", "ruff"]
templates = ["copier", "jinja2-time", "ruff", "pyyaml-include"]
terraform = ["python-terraform"]
secrets-aws = ["boto3"]
secrets-gcp = ["google-cloud-secret-manager"]
Expand Down
6 changes: 3 additions & 3 deletions scripts/test-migrations-mysql.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ do
git checkout release/$VERSION
uv pip install -e ".[templates,server]"
# handles unpinned sqlmodel dependency in older versions
uv pip install "sqlmodel==0.0.8" "bcrypt==4.0.1"
uv pip install "sqlmodel==0.0.8" "bcrypt==4.0.1" "pyyaml-include<2.0"

# Get the major and minor version of Python
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
Expand Down Expand Up @@ -131,7 +131,7 @@ source ".venv-current-branch/bin/activate"
uv pip install setuptools wheel pip

uv pip install -e ".[templates,server]"
uv pip install importlib_metadata
uv pip install importlib_metadata "pyyaml-include<2.0"

if [ "$1" == "mysql" ]; then
zenml connect --url mysql://127.0.0.1/zenml --username root --password password
Expand Down Expand Up @@ -242,7 +242,7 @@ for i in "${!MIGRATION_VERSIONS[@]}"; do
git checkout release/${MIGRATION_VERSIONS[$i]}
uv pip install -e ".[templates,server]"
# Handles unpinned sqlmodel dependency in older versions
uv pip install "sqlmodel==0.0.8" "bcrypt==4.0.1" importlib_metadata
uv pip install "sqlmodel==0.0.8" "bcrypt==4.0.1" importlib_metadata "pyyaml-include<2.0"

# Get the major and minor version of Python
PYTHON_VERSION=$(python3 -c 'import sys; print(f"{sys.version_info.major}.{sys.version_info.minor}")')
Expand Down
8 changes: 4 additions & 4 deletions src/zenml/cli/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,19 +73,19 @@ def copier_github_url(self) -> str:
ZENML_PROJECT_TEMPLATES = dict(
e2e_batch=ZenMLProjectTemplateLocation(
github_url="zenml-io/template-e2e-batch",
github_tag="2024.01.22", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
github_tag="2024-04-05", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
),
starter=ZenMLProjectTemplateLocation(
github_url="zenml-io/template-starter",
github_tag="2024.01.22", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
github_tag="2024.04.03", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
),
nlp=ZenMLProjectTemplateLocation(
github_url="zenml-io/template-nlp",
github_tag="2024.01.12", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
github_tag="2024-04-05", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
),
llm_finetuning=ZenMLProjectTemplateLocation(
github_url="zenml-io/template-llm-finetuning",
github_tag="2024.03.18", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
github_tag="2024-04-05", # Make sure it is aligned with .github/workflows/update-templates-to-examples.yml
),
)

Expand Down
75 changes: 0 additions & 75 deletions tests/integration/functional/cli/test_hub.py

This file was deleted.

54 changes: 27 additions & 27 deletions tests/integration/functional/model/test_model_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.
import multiprocessing
from typing import Optional
from unittest import mock
from unittest.mock import patch
Expand Down Expand Up @@ -635,29 +634,30 @@ def _inner_pipeline(
"Unable to link saved artifact to step run."
)

def test_model_versions_parallel_creation_version_unspecific(
self, clean_client: "Client"
):
"""Test that model version creation can be parallelized."""
process_count = 50
args = [
MODEL_NAME,
] * process_count
with multiprocessing.Pool(5) as pool:
results = pool.map(
parallel_model_version_creation,
iterable=args,
)

assert sum(results), (
"Test was not parallel. "
"Consider increasing the number of processes or pools."
)
assert clean_client.get_model(MODEL_NAME).name == MODEL_NAME
mvs = clean_client.list_model_versions(
model_name_or_id=MODEL_NAME, size=min(1000, process_count * 10)
)
assert len(mvs) == process_count
assert {mv.number for mv in mvs} == {
i for i in range(1, process_count + 1)
}
# TODO: Fix and re-enable this test
# def test_model_versions_parallel_creation_version_unspecific(
# self, clean_client: "Client"
# ):
# """Test that model version creation can be parallelized."""
# process_count = 50
# args = [
# MODEL_NAME,
# ] * process_count
# with multiprocessing.Pool(5) as pool:
# results = pool.map(
# parallel_model_version_creation,
# iterable=args,
# )

# assert sum(results), (
# "Test was not parallel. "
# "Consider increasing the number of processes or pools."
# )
# assert clean_client.get_model(MODEL_NAME).name == MODEL_NAME
# mvs = clean_client.list_model_versions(
# model_name_or_id=MODEL_NAME, size=min(1000, process_count * 10)
# )
# assert len(mvs) == process_count
# assert {mv.number for mv in mvs} == {
# i for i in range(1, process_count + 1)
# }