-
Notifications
You must be signed in to change notification settings - Fork 460
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
Sdk tests with papermill #2448
base: master
Are you sure you want to change the base?
Sdk tests with papermill #2448
Changes from 2 commits
f2d1e7a
683608f
c3c4faa
bd0decb
57892cc
d92fade
8ef3732
ea66c1a
56f5bd9
5d136c5
cb301fc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,28 @@ | ||||||||||||||
name: E2E Tests with Notebooks | ||||||||||||||
|
||||||||||||||
on: | ||||||||||||||
push: {} | ||||||||||||||
pull_request: {} | ||||||||||||||
workflow_dispatch: {} | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||||||||||
|
||||||||||||||
concurrency: | ||||||||||||||
group: ${{ github.workflow }}-${{ github.ref }} | ||||||||||||||
cancel-in-progress: true | ||||||||||||||
|
||||||||||||||
jobs: | ||||||||||||||
e2e: | ||||||||||||||
runs-on: ubuntu-22.04 | ||||||||||||||
timeout-minutes: 30 | ||||||||||||||
strategy: | ||||||||||||||
fail-fast: true | ||||||||||||||
matrix: | ||||||||||||||
python-version: ["3.9", "3.10", "3.11"] | ||||||||||||||
steps: | ||||||||||||||
- name: Checkout | ||||||||||||||
uses: actions/checkout@v4 | ||||||||||||||
|
||||||||||||||
- name: Test Notebook | ||||||||||||||
uses: ./.github/workflows/template-e2e-notebook-test | ||||||||||||||
with: | ||||||||||||||
python-version: ${{ matrix.python-version }} | ||||||||||||||
notebook-input: "examples/v1beta1/sdk/cmaes-and-resume-policies.ipynb,examples/v1beta1/sdk/tune-train-from-func.ipynb" |
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
@@ -0,0 +1,54 @@ | ||||||||||||||
name: Notebook test template | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You don't need template if we keep all Notebooks test jobs in the single file. |
||||||||||||||
description: A composite action to setup and run example notebooks using Papermill | ||||||||||||||
|
||||||||||||||
inputs: | ||||||||||||||
python-version: | ||||||||||||||
required: false | ||||||||||||||
description: Python version | ||||||||||||||
default: "3.9" | ||||||||||||||
notebook-input: | ||||||||||||||
description: 'List of paths to the input notebooks, separated by commas' | ||||||||||||||
required: true | ||||||||||||||
|
||||||||||||||
runs: | ||||||||||||||
using: composite | ||||||||||||||
steps: | ||||||||||||||
|
||||||||||||||
- name: Setup Python | ||||||||||||||
uses: actions/setup-python@v5 | ||||||||||||||
with: | ||||||||||||||
python-version: ${{ inputs.python-version }} | ||||||||||||||
|
||||||||||||||
- name: Install dependencies | ||||||||||||||
shell: bash | ||||||||||||||
run: | | ||||||||||||||
python -m pip install --upgrade pip | ||||||||||||||
pip install papermill kubeflow-katib jupyter ipykernel | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Hey @andreyvelich, thanks for the review! |
||||||||||||||
python -m ipykernel install --user --name python3 --display-name "Python 3" | ||||||||||||||
|
||||||||||||||
- name: Setup Minikube Cluster | ||||||||||||||
uses: medyagh/[email protected] | ||||||||||||||
with: | ||||||||||||||
network-plugin: cni | ||||||||||||||
cni: flannel | ||||||||||||||
driver: none | ||||||||||||||
kubernetes-version: v1.29.2 | ||||||||||||||
minikube-version: 1.34.0 | ||||||||||||||
start-args: --wait-timeout=120s | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You can re-use setup-e2e-test template for that, similar to this: katib/.github/workflows/e2e-test-pytorch-mnist.yaml Lines 20 to 25 in 683608f
|
||||||||||||||
|
||||||||||||||
- name: Setup Minikube | ||||||||||||||
shell: bash | ||||||||||||||
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh true true "" "" "cmaes" | ||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we re-use this template for this action, but passing the appropriate values to it: |
||||||||||||||
|
||||||||||||||
- name: Setup Katib | ||||||||||||||
shell: bash | ||||||||||||||
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-katib.sh true true postgres | ||||||||||||||
|
||||||||||||||
- name: Run Jupyter Notebook with Papermill | ||||||||||||||
shell: bash | ||||||||||||||
run: | | ||||||||||||||
IFS=',' read -r -a NOTEBOOK_ARRAY <<< "${{ inputs.notebook-input }}" | ||||||||||||||
for NOTEBOOK in "${NOTEBOOK_ARRAY[@]}"; do | ||||||||||||||
echo "Running notebook: $NOTEBOOK" | ||||||||||||||
./test/e2e/v1beta1/scripts/gh-actions/run-notebook.sh -i "$NOTEBOOK" -n kubeflow | ||||||||||||||
done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's call this file: