Skip to content

Commit a6e31a3

Browse files
committed
Merge branch 'feature/served-pipelines' of https://github.com/zenml-io/zenml into feature/served-pipelines
2 parents e4bee5a + f51cb66 commit a6e31a3

File tree

78 files changed

+924
-274
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+924
-274
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
---
2+
name: Test base package functionality
3+
on:
4+
workflow_call:
5+
inputs:
6+
os:
7+
description: OS
8+
type: string
9+
required: true
10+
python-version:
11+
description: Python version
12+
type: string
13+
required: true
14+
git-ref:
15+
description: Git branch or ref
16+
type: string
17+
required: false
18+
default: ''
19+
workflow_dispatch:
20+
inputs:
21+
os:
22+
description: OS
23+
type: choice
24+
options: [ubuntu-latest, macos-13, windows-latest]
25+
required: false
26+
default: ubuntu-latest
27+
python-version:
28+
description: Python version
29+
type: choice
30+
options: ['3.9', '3.10', '3.11', '3.12']
31+
required: false
32+
default: '3.11'
33+
git-ref:
34+
description: Git branch or ref
35+
type: string
36+
required: true
37+
jobs:
38+
test-base-package-functionality:
39+
name: test-base-package-functionality
40+
runs-on: ${{ inputs.os }}
41+
env:
42+
ZENML_DEBUG: 1
43+
ZENML_ANALYTICS_OPT_IN: false
44+
PYTHONIOENCODING: utf-8
45+
UV_HTTP_TIMEOUT: 600
46+
OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES'
47+
if: ${{ ! startsWith(github.event.head_commit.message, 'GitBook:') && ! (inputs.os == 'windows-latest' && inputs.python-version == '3.11') && ! (inputs.os == 'windows-latest' && inputs.python-version == '3.12') }}
48+
defaults:
49+
run:
50+
shell: bash
51+
steps:
52+
- name: Checkout code
53+
uses: actions/[email protected]
54+
with:
55+
repository: ${{ github.repository }}
56+
ref: ${{ inputs.git-ref || github.event.pull_request.head.sha }}
57+
- name: Set up Python
58+
uses: actions/[email protected]
59+
with:
60+
python-version: ${{ inputs.python-version }}
61+
- name: Install uv
62+
uses: astral-sh/setup-uv@v6
63+
with:
64+
version: 0.8.14
65+
- name: Build server image
66+
run: |
67+
docker build -t zenml-server-dev -f docker/zenml-server-dev.Dockerfile .
68+
- name: Install base package
69+
run: |
70+
uv pip install --system .
71+
- name: Start local server
72+
run: |
73+
docker run -d -p 8080:8080 -e ZENML_SERVER_AUTH_SCHEME=NO_AUTH -e ZENML_SERVER_AUTO_ACTIVATE=True zenml-server-dev
74+
- name: Test server connection works
75+
env:
76+
ZENML_STORE_URL: http://localhost:8080
77+
run: |-
78+
zenml stack list

.github/workflows/ci-slow.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,3 +316,16 @@ jobs:
316316
needs: run-slow-ci-label-is-set
317317
uses: ./.github/workflows/vscode-tutorial-pipelines-test.yml
318318
secrets: inherit
319+
ubuntu-base-package-functionality:
320+
needs: run-slow-ci-label-is-set
321+
if: github.event.pull_request.draft == false
322+
strategy:
323+
matrix:
324+
os: [ubuntu-latest]
325+
python-version: ['3.11']
326+
fail-fast: false
327+
uses: ./.github/workflows/base-package-functionality.yml
328+
with:
329+
python-version: ${{ matrix.python-version }}
330+
os: ${{ matrix.os }}
331+
secrets: inherit

.github/workflows/linting.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
name: Setup Python Environment, Lint and Unit Test
2+
name: Linting
33
on:
44
workflow_call:
55
inputs:
@@ -52,8 +52,8 @@ on:
5252
required: false
5353
default: ''
5454
jobs:
55-
unit-test:
56-
name: unit-test
55+
linting:
56+
name: linting
5757
runs-on: ${{ inputs.os }}
5858
env:
5959
ZENML_DEBUG: 1

.github/workflows/publish_to_pypi.yml

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ jobs:
66
publish_to_pypi:
77
name: Publish Python 🐍 package 📦 to PyPI
88
runs-on: ubuntu-latest
9+
environment: release
910
permissions:
1011
# This permission is required for trusted publishing.
1112
id-token: write
@@ -23,21 +24,19 @@ jobs:
2324
uses: actions/[email protected]
2425
with:
2526
python-version: '3.9'
26-
- name: Install Poetry
27-
uses: snok/[email protected]
27+
- name: Install uv
28+
uses: astral-sh/setup-uv@v6
2829
with:
29-
virtualenvs-create: true
30-
virtualenvs-in-project: true
30+
version: 0.8.14
3131
- name: Include latest dashboard
3232
run: bash scripts/install-dashboard.sh
33-
- name: Build package
34-
run: poetry build
35-
- name: Mint token
36-
id: mint
37-
uses: tschm/[email protected]
38-
- name: Publish the package with poetry
33+
- name: Verify version
3934
run: |-
40-
if [ "$(cat src/zenml/VERSION)" = "$(echo ${GITHUB_REF} | sed 's|refs/tags/||g')" ];
41-
then poetry publish -u __token__ -p '${{ steps.mint.outputs.api-token }}';
42-
else echo "Version mismatch between src/zenml/VERSION and branch tag" && exit 1;
35+
if [ "$(cat src/zenml/VERSION)" != "$(echo ${GITHUB_REF} | sed 's|refs/tags/||g')" ]; then
36+
echo "Version mismatch between src/zenml/VERSION and git tag"
37+
exit 1
4338
fi
39+
- name: Build package
40+
run: uv build
41+
- name: Publish package distributions to PyPI
42+
uses: pypa/gh-action-pypi-publish@release/v1

.github/workflows/update-templates-to-examples.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
python-version: ${{ inputs.python-version }}
4747
stack-name: local
4848
ref-zenml: ${{ github.ref }}
49-
ref-template: 2024.11.28 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
49+
ref-template: 2025.09.22 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
5050
- name: Clean-up
5151
run: |
5252
rm -rf ./local_checkout
@@ -261,7 +261,7 @@ jobs:
261261
with:
262262
python-version: ${{ inputs.python-version }}
263263
ref-zenml: ${{ github.ref }}
264-
ref-template: 2025.07.14 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
264+
ref-template: 2025.09.19 # Make sure it is aligned with ZENML_PROJECT_TEMPLATES from src/zenml/cli/base.py
265265
- name: Clean-up
266266
run: |
267267
rm -rf ./local_checkout

docs/book/getting-started/hello-world.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ This guide will help you build and deploy your first ZenML pipeline, starting lo
1616
Start by installing ZenML in a fresh Python environment:
1717

1818
```bash
19-
pip install zenml
19+
pip install 'zenml[server]'
2020
zenml login
2121
```
2222

@@ -82,7 +82,7 @@ The fastest way to create a cloud stack is through the **Infrastructure-as-Code*
8282

8383
You'll need:
8484

85-
* [Terraform](https://www.terraform.io/downloads.html) version 1.9+ installed locally
85+
* [Terraform](https://developer.hashicorp.com/terraform/install) version 1.9+ installed locally
8686
* Authentication configured for your preferred cloud provider (AWS, GCP, or Azure)
8787
* Appropriate permissions to create resources in your cloud account
8888

docs/book/getting-started/installation.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,51 +9,50 @@ icon: cauldron
99
{% step %}
1010
#### Install ZenML
1111

12+
ZenML currently supports **Python 3.9, 3.10, 3.11, and 3.12**. Please make sure that you are using a supported Python version.
13+
1214
{% tabs %}
13-
{% tab title="Direct (pip)" %}
14-
**ZenML** is a Python package that can be installed directly via `pip`:
15+
{% tab title="Base package" %}
16+
**ZenML** is a Python package that can be installed using `pip` or other Python package managers:
1517

1618
```shell
1719
pip install zenml
1820
```
1921

2022
{% hint style="warning" %}
21-
Note that ZenML currently supports **Python 3.9, 3.10, 3.11, and 3.12**. Please make sure that you are using a supported Python version.
23+
Installing the base package only allows you to connect to a [deployed ZenML server](./deploying-zenml/). If you want to use ZenML purely locally, install it with the `local` extra:
24+
```shell
25+
pip install 'zenml[local]'
26+
```
2227
{% endhint %}
2328
{% endtab %}
2429

25-
{% tab title="Dashboard" %}
26-
ZenML comes bundled with a web dashboard that lives inside a [sister repository](https://github.com/zenml-io/zenml-dashboard). In order to get access to the dashboard **locally**, you need to launch the [ZenML Server and Dashboard locally](deploying-zenml/). For this, you need to install the optional dependencies for the ZenML Server:
30+
{% tab title="Local Dashboard" %}
31+
If you want to use the [ZenML dashboard](https://github.com/zenml-io/zenml-dashboard) locally, you need to install ZenML with the `server` extra:
2732

2833
```shell
29-
pip install "zenml[server]"
34+
pip install 'zenml[server]'
3035
```
3136

32-
{% hint style="info" %}
33-
We highly encourage you to install ZenML in a virtual environment. At ZenML, we like to use [virtualenvwrapper](https://virtualenvwrapper.readthedocs.io/en/latest/) or [pyenv-virtualenv](https://github.com/pyenv/pyenv-virtualenv) to manage our Python virtual environments.
34-
{% endhint %}
35-
{% endtab %}
36-
37-
{% tab title="MacOS Silicon (M1, M2)" %}
38-
A change in how forking works on Macs running on Apple Silicon means that you\
39-
should set the following environment variable, which will ensure that your connections to the server remain unbroken:
40-
37+
{% hint style="warning" %}
38+
If you want to run a local server while running on a Mac with Apple Silicon (M1, M2, M3, M4), you should set the following environment variable:
4139
```bash
4240
export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
43-
44-
pip install zenml
4541
```
42+
You can read more about this [here](http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html).
43+
{% endhint %}
4644

47-
You can read more about this [here](http://sealiesoftware.com/blog/archive/2017/6/5/Objective-C_and_fork_in_macOS_1013.html). This environment variable is needed if you are working with a local server on your Mac, but if you're just using ZenML as a client / CLI and connecting to a deployed server, then you don't need to set it.
4845
{% endtab %}
4946

50-
{% tab title="Nightly Builds" %}
51-
ZenML also publishes nightly builds under the [`zenml-nightly` package name](https://pypi.org/project/zenml-nightly/). These are built from the latest [`develop` branch](https://github.com/zenml-io/zenml/tree/develop) (to which work ready for release is published) and are not guaranteed to be stable. To install the nightly build, run:
47+
{% tab title="Jupyter Notebooks" %}
48+
If you write your ZenML pipelines ins Jupyter notebooks, we recommend installing ZenML with the `jupyter` extra which includes improved CLI output and logs:
5249

5350
```shell
54-
pip install zenml-nightly
51+
pip install 'zenml[jupyter]'
5552
```
53+
5654
{% endtab %}
55+
5756
{% endtabs %}
5857
{% endstep %}
5958

@@ -96,11 +95,12 @@ If you would like to run the ZenML server with Docker:
9695
docker run -it -d -p 8080:8080 zenmldocker/zenml-server
9796
```
9897

99-
## Deploying the server
98+
## Starting the local server
10099

101-
Though ZenML can run entirely as a pip package on a local system, complete with the dashboard. You can do this easily:
100+
By default, ZenML runs without a server connected to a local database on your machine. If you want to access the dashboard locally, you need to start a local server:
102101

103102
```shell
103+
# Make sure to have the `server` extra installed
104104
pip install "zenml[server]"
105105
zenml login --local # opens the dashboard locally
106106
```
435 KB
Loading
16.2 KB
Loading
6.86 KB
Loading

0 commit comments

Comments
 (0)