Skip to content

Commit c3c4faa

Browse files
author
Yehudit Kerido
committed
sdk tests with papermill
Signed-off-by: Yehudit Kerido <[email protected]>
1 parent 683608f commit c3c4faa

File tree

9 files changed

+2033
-147
lines changed

9 files changed

+2033
-147
lines changed
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
name: E2E Tests with Notebooks
2-
32
on:
43
push: {}
54
pull_request: {}
65
workflow_dispatch: {}
7-
86
concurrency:
97
group: ${{ github.workflow }}-${{ github.ref }}
108
cancel-in-progress: true
11-
129
jobs:
1310
e2e:
1411
runs-on: ubuntu-22.04
1512
timeout-minutes: 30
1613
strategy:
1714
fail-fast: true
1815
matrix:
19-
python-version: ["3.9", "3.10", "3.11"]
16+
kubernetes-version: [ "v1.29.2", "v1.30.7", "v1.31.3" ]
2017
steps:
2118
- name: Checkout
2219
uses: actions/checkout@v4
2320

24-
- name: Test Notebook
25-
uses: ./.github/workflows/template-e2e-notebook-test
21+
- name: Setup Test Env
22+
uses: ./.github/workflows/template-setup-e2e-test
23+
with:
24+
kubernetes-version: ${{ matrix.kubernetes-version }}
25+
26+
- name: Run e2e test for notebooks with papermill
27+
uses: ./.github/workflows/template-e2e-test
2628
with:
27-
python-version: ${{ matrix.python-version }}
28-
notebook-input: "examples/v1beta1/sdk/cmaes-and-resume-policies.ipynb,examples/v1beta1/sdk/tune-train-from-func.ipynb"
29+
notebook-input: "examples/v1beta1/sdk/cmaes-and-resume-policies.ipynb,examples/v1beta1/sdk/tune-train-from-func.ipynb"
30+
tune-api: true
31+
katib-ui: true
32+
training-operator: true
33+
algorithms: cmaes
34+
trial-images: '""'
35+
experiments: '""'
36+
database-type: postgres

.github/workflows/template-e2e-notebook-test/action.yaml

-54
This file was deleted.

.github/workflows/template-e2e-test/action.yaml

+24-3
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,44 @@ inputs:
2727
required: true
2828
description: whether to execute tune-api test or not
2929
default: false
30+
notebook-input:
31+
description: List of paths to the input notebooks, separated by commas
32+
required: false
33+
default: ""
34+
algorithms:
35+
description: algorythm for image suggestion
36+
required: false
37+
default: ""
3038

3139
runs:
3240
using: composite
3341
steps:
3442
- name: Setup Minikube Cluster
3543
shell: bash
36-
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh ${{ inputs.katib-ui }} ${{ inputs.tune-api }} ${{ inputs.trial-images }} ${{ inputs.experiments }}
44+
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh ${{ inputs.katib-ui }} ${{ inputs.tune-api }} ${{ inputs.trial-images }} ${{ inputs.experiments }} ${{ inputs.algorithms }}
3745

3846
- name: Setup Katib
3947
shell: bash
4048
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh ${{ inputs.katib-ui }} ${{ inputs.training-operator }} ${{ inputs.database-type }}
4149

50+
- name: Install dependencies
51+
shell: bash
52+
run: |
53+
python -m pip install --upgrade pip
54+
pip install papermill jupyter ipykernel
55+
python -m ipykernel install --user --name python3 --display-name "Python 3"
56+
4257
- name: Run E2E Experiment
4358
shell: bash
4459
run: |
45-
if "${{ inputs.tune-api }}"; then
60+
if [[ -n "${{ inputs.notebook-input }}" ]]; then
61+
IFS=',' read -r -a NOTEBOOK_ARRAY <<< "${{ inputs.notebook-input }}"
62+
for NOTEBOOK in "${NOTEBOOK_ARRAY[@]}"; do
63+
echo "Running notebook: $NOTEBOOK"
64+
./test/e2e/v1beta1/scripts/gh-actions/run-notebook.sh -i "$NOTEBOOK" -n kubeflow
65+
done
66+
elif "${{ inputs.tune-api }}"; then
4667
./test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.sh
4768
else
4869
./test/e2e/v1beta1/scripts/gh-actions/run-e2e-experiment.sh ${{ inputs.experiments }}
49-
fi
70+
fi

0 commit comments

Comments
 (0)