From c8795d4d692368e463a0cbeebc7fd831c3ede674 Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Wed, 3 Apr 2024 13:27:49 +0200 Subject: [PATCH 1/3] update notebook --- template/quickstart.ipynb | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/template/quickstart.ipynb b/template/quickstart.ipynb index ee14d95..a91efa2 100644 --- a/template/quickstart.ipynb +++ b/template/quickstart.ipynb @@ -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!" ] }, { @@ -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", @@ -526,7 +534,7 @@ "id": "8c28b474", "metadata": {}, "source": [ - "# ⌚ Step 2: Training pipeline" + "# ⌚ Step 3: Training pipeline" ] }, { @@ -717,7 +725,7 @@ "id": "e256d145", "metadata": {}, "source": [ - "# 💯 Step 3: Associating a model with your pipeline" + "# 💯 Step 4: Associating a model with your pipeline" ] }, { @@ -914,7 +922,7 @@ "id": "d6306f14", "metadata": {}, "source": [ - "# 🫅 Step 4: Consuming the model in production" + "# 🫅 Step 5: Consuming the model in production" ] }, { From f3811d671bf100176b05e7144955695f54a32d5b Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Fri, 5 Apr 2024 13:33:18 +0200 Subject: [PATCH 2/3] add pyyaml-include to starter requirements --- requirements.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/requirements.txt b/requirements.txt index 65e8c35..e12133c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -3,3 +3,4 @@ copier jinja2-time zenml[server]>=0.52.0 notebook +pyyaml-include<2.0 From cda64e9cf1ca7394435fa1633da0f2eba86162c0 Mon Sep 17 00:00:00 2001 From: Alex Strick van Linschoten Date: Fri, 5 Apr 2024 14:57:39 +0200 Subject: [PATCH 3/3] use uv --- .../actions/starter_template_test/action.yml | 112 +++++++++--------- 1 file changed, 56 insertions(+), 56 deletions(-) diff --git a/.github/actions/starter_template_test/action.yml b/.github/actions/starter_template_test/action.yml index 9940481..5e4c1eb 100644 --- a/.github/actions/starter_template_test/action.yml +++ b/.github/actions/starter_template_test/action.yml @@ -23,63 +23,63 @@ inputs: runs: using: "composite" steps: - - name: Check out repository code - uses: actions/checkout@v3 - with: - repository: zenml-io/zenml-project-templates - ref: ${{ inputs.ref-template }} - path: ./local_checkout + - name: Check out repository code + uses: actions/checkout@v3 + with: + repository: zenml-io/zenml-project-templates + ref: ${{ inputs.ref-template }} + path: ./local_checkout - - name: Set up Python - uses: actions/setup-python@v4 - with: - python-version: ${{ inputs.python-version }} - - - name: Configure git (non-Windows) - if: ${{ runner.os != 'Windows' }} - shell: bash - run: | - git config --global user.email "info@zenml.io" - git config --global user.name "ZenML GmbH" - - - name: Configure git (Windows) - if: ${{ runner.os == 'Windows' }} - shell: bash - run: | - "C:\Program Files\Git\bin\git.exe" config --global user.email "info@zenml.io" - "C:\Program Files\Git\bin\git.exe" config --global user.name "ZenML GmbH" + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: ${{ inputs.python-version }} - - name: Install wheel - shell: bash - run: | - pip install wheel - - - name: Install ZenML - if: ${{ inputs.ref-zenml != '' }} - shell: bash - run: | - pip install "git+https://github.com/zenml-io/zenml.git@${{ inputs.ref-zenml }}" "zenml[server]@git+https://github.com/zenml-io/zenml.git@${{ inputs.ref-zenml }}" - - - name: Install ZenML - if: ${{ inputs.ref-zenml == '' }} - shell: bash - run: | - pip install zenml "zenml[server]" - - - name: Concatenate requirements - shell: bash - run: | - zenml integration export-requirements -o ./local_checkout/integration-requirements.txt sklearn - cat ./local_checkout/requirements.txt ./local_checkout/test-requirements.txt ./local_checkout/integration-requirements.txt >> ./local_checkout/all-requirements.txt + - name: Configure git (non-Windows) + if: ${{ runner.os != 'Windows' }} + shell: bash + run: | + git config --global user.email "info@zenml.io" + git config --global user.name "ZenML GmbH" - - name: Install requirements - shell: bash - run: | - pip install -r ./local_checkout/all-requirements.txt + - name: Configure git (Windows) + if: ${{ runner.os == 'Windows' }} + shell: bash + run: | + "C:\Program Files\Git\bin\git.exe" config --global user.email "info@zenml.io" + "C:\Program Files\Git\bin\git.exe" config --global user.name "ZenML GmbH" - - name: Run pytests - shell: bash - env: - ZENML_STACK_NAME: ${{ inputs.stack-name }} - run: | - pytest ./local_checkout/tests + - name: Install wheel + shell: bash + run: | + pip install wheel uv + + - name: Install ZenML + if: ${{ inputs.ref-zenml != '' }} + shell: bash + run: | + uv pip install --system "git+https://github.com/zenml-io/zenml.git@${{ inputs.ref-zenml }}" "zenml[server]@git+https://github.com/zenml-io/zenml.git@${{ inputs.ref-zenml }}" + + - name: Install ZenML + if: ${{ inputs.ref-zenml == '' }} + shell: bash + run: | + uv pip install --system zenml "zenml[server]" + + - name: Concatenate requirements + shell: bash + run: | + zenml integration export-requirements -o ./local_checkout/integration-requirements.txt sklearn + cat ./local_checkout/requirements.txt ./local_checkout/test-requirements.txt ./local_checkout/integration-requirements.txt >> ./local_checkout/all-requirements.txt + + - name: Install requirements + shell: bash + run: | + uv pip install --system -r ./local_checkout/all-requirements.txt + + - name: Run pytests + shell: bash + env: + ZENML_STACK_NAME: ${{ inputs.stack-name }} + run: | + pytest ./local_checkout/tests