Skip to content

Update notebook and fix pyyaml-include dependency issue #16

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Apr 5, 2024
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
112 changes: 56 additions & 56 deletions .github/actions/starter_template_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 "[email protected]"
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 "[email protected]"
"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 "[email protected]"
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 "[email protected]"
"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
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace uv with python -m before pip commands to ensure correct syntax and standard practice.

-      pip install wheel uv
+      python -m pip install wheel

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
pip install wheel uv
python -m pip install wheel


- 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 }}"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the use of uv before pip commands and remove the redundant --system flag.

-      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 }}"
+      python -m 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 }}"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
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 }}"
python -m 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: |
uv pip install --system zenml "zenml[server]"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the use of uv before pip commands and remove the redundant --system flag.

-      uv pip install --system zenml "zenml[server]"
+      python -m pip install zenml "zenml[server]"

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
uv pip install --system zenml "zenml[server]"
python -m 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: Install requirements
shell: bash
run: |
uv pip install --system -r ./local_checkout/all-requirements.txt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct the use of uv before pip commands and remove the redundant --system flag.

-      uv pip install --system -r ./local_checkout/all-requirements.txt
+      python -m pip install -r ./local_checkout/all-requirements.txt

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
uv pip install --system -r ./local_checkout/all-requirements.txt
python -m pip install -r ./local_checkout/all-requirements.txt


- name: Run pytests
shell: bash
env:
ZENML_STACK_NAME: ${{ inputs.stack-name }}
run: |
pytest ./local_checkout/tests
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ copier
jinja2-time
zenml[server]>=0.52.0
notebook
pyyaml-include<2.0
20 changes: 14 additions & 6 deletions template/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