-
Notifications
You must be signed in to change notification settings - Fork 456
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
Draft
yehudit1987
wants to merge
27
commits into
kubeflow:master
Choose a base branch
from
yehudit1987:sdk-tests-with-papermill
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Sdk tests with papermill #2448
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
79a27bd
Running 2 experiments
0b44b8f
Using action.yaml
6237428
Using action.yaml - fix relative paths
113d8dd
Using action.yaml - fix relative paths2
cc17690
Final test
e074c65
Add other build step to flow
4fb0f37
Revert setup-minikube script and add debug step for mnist workflow to…
ffa1c59
Revert setup-minikube script and add debug step for mnist workflow to…
fedcf05
Add condition for mnist to run.
b7fa3ca
Fix ci issues
9560840
Fix ci issues
d69a29f
Fix ci issues
abadb73
Fix CI issues
885ba39
Fix CI issues
6633aa5
Fix CI issues
dc0221e
Fixing issues after review
d32d4a1
Fix review comments
a548c67
Fix review comments
45ffbad
Fix review comments
6360029
Fix review comments
4d332cc
Fixing issues
5076f8b
Fix review comments
71ed401
Fix review comments
ea44cdf
Test sending ns as paparmill params
dd45944
Add wait for experiment success condition and parameterized ns
7d4bff3
Add wait for experiment success condition and parameterized ns
2c0ce60
Add wait for experiment success condition and parameterized ns
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: E2E Tests with Notebooks | ||
|
||
on: | ||
push: {} | ||
pull_request: {} | ||
workflow_dispatch: {} | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
e2e: | ||
runs-on: ubuntu-latest | ||
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" | ||
papermill-args-yaml: "namespace: kubeflow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Notebook test template | ||
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 | ||
papermill-args-yaml: | ||
description: 'Additional arguments to pass to Papermill in yaml format' | ||
required: false | ||
default: "" | ||
|
||
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 | ||
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.27.3 | ||
minikube-version: 1.31.1 | ||
start-args: --wait-timeout=120s | ||
|
||
- name: Setup Minikube | ||
shell: bash | ||
run: ./test/e2e/v1beta1/scripts/gh-actions/setup-minikube.sh true true "" "" "cmaes" | ||
|
||
- 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 }}" | ||
# Loop through each notebook path | ||
for NOTEBOOK in "${NOTEBOOK_ARRAY[@]}"; do | ||
OUTPUT_FILE="${NOTEBOOK%.ipynb}_output.ipynb" | ||
echo "Running notebook: $NOTEBOOK" | ||
papermill "$NOTEBOOK" "$OUTPUT_FILE" --parameters_yaml "${{ inputs.papermill-args-yaml }}" --log-output --kernel python3 || { | ||
echo "Papermill failed for notebook: $NOTEBOOK" | ||
exit 1 | ||
} | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||||
---|---|---|---|---|---|---|---|---|
|
@@ -671,4 +671,4 @@ | |||||||
}, | ||||||||
"nbformat": 4, | ||||||||
"nbformat_minor": 4 | ||||||||
} | ||||||||
} | ||||||||
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
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
It seems that we didn't pass parameters to these two notebook examples. Not sure if it meets our requirements
cc👀 @andreyvelich @tenzen-y @yehudit1987