From 06b5e691bcb468a4343b35255e5119cbe2670cc3 Mon Sep 17 00:00:00 2001 From: Hannah Tosi Date: Fri, 25 Jul 2025 12:13:13 -0600 Subject: [PATCH 1/2] Update test_jupyter_with_papermill.sh with Andys help --- scripts/test_jupyter_with_papermill.sh | 50 ++++++++++++++++---------- 1 file changed, 32 insertions(+), 18 deletions(-) diff --git a/scripts/test_jupyter_with_papermill.sh b/scripts/test_jupyter_with_papermill.sh index 53348f4ff8..d31d412ef5 100755 --- a/scripts/test_jupyter_with_papermill.sh +++ b/scripts/test_jupyter_with_papermill.sh @@ -185,28 +185,42 @@ function _get_source_of_truth_filepath() local notebook_id="${1##*/}" local manifest_directory="${root_repo_directory}/manifests" - local imagestream_directory="${manifest_directory}/base" - - local file_suffix='notebook-imagestream.yaml' + local imagestream_directory= + local file_suffix= local filename= - case "${notebook_id}" in - *$jupyter_minimal_notebook_id*) - filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}" - if [ "${accelerator_flavor}" = 'cuda' ]; then - filename="jupyter-${notebook_id}-gpu-${file_suffix}" - fi - ;; - *$jupyter_datascience_notebook_id* | *$jupyter_trustyai_notebook_id*) - filename="jupyter-${notebook_id}-${file_suffix}" + case "${python_flavor}" in + python-3.12) + imagestream_directory="${manifest_directory}/overlays/additional" + file_suffix='-imagestream.yaml' + + local imagestream_accelerator_flavor="${accelerator_flavor:-cpu}" + filename="jupyter-${notebook_id}-${imagestream_accelerator_flavor}-py312-${os_flavor}-${file_suffix}" ;; - *$jupyter_pytorch_notebook_id* | *$jupyter_tensorflow_notebook_id*) - filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}" - if [ "${accelerator_flavor}" = 'cuda' ]; then - filename="jupyter-${notebook_id}-${file_suffix}" - fi + *) + imagestream_directory="${manifest_directory}/base" + file_suffix='notebook-imagestream.yaml' + + case "${notebook_id}" in + *$jupyter_minimal_notebook_id*) + filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}" + if [ "${accelerator_flavor}" = 'cuda' ]; then + filename="jupyter-${notebook_id}-gpu-${file_suffix}" + fi + ;; + *$jupyter_datascience_notebook_id* | *$jupyter_trustyai_notebook_id*) + filename="jupyter-${notebook_id}-${file_suffix}" + ;; + *$jupyter_pytorch_notebook_id* | *$jupyter_tensorflow_notebook_id*) + filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}" + if [ "${accelerator_flavor}" = 'cuda' ]; then + filename="jupyter-${notebook_id}-${file_suffix}" + fi + ;; + esac ;; esac + local filepath="${imagestream_directory}/${filename}" if ! [ -e "${filepath}" ]; then @@ -381,7 +395,7 @@ jupyter_pytorch_notebook_id='pytorch' jupyter_tensorflow_notebook_id='tensorflow' notebook_name=$( _get_notebook_name "${test_target}" ) -python_flavor="python-${test_target//*-python-/}" +python_flavor="python-${test_target//*-python-/}" # <-- python-3.11 os_flavor=$(_get_os_flavor "${test_target}") accelerator_flavor=$(_get_accelerator_flavor "${test_target}") From c9dda5cbcfa33654a3722efa069fb3a0ce16921d Mon Sep 17 00:00:00 2001 From: Hannah Tosi Date: Fri, 25 Jul 2025 12:52:24 -0600 Subject: [PATCH 2/2] remove extra dash from filename string --- scripts/test_jupyter_with_papermill.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test_jupyter_with_papermill.sh b/scripts/test_jupyter_with_papermill.sh index d31d412ef5..e76b87082e 100755 --- a/scripts/test_jupyter_with_papermill.sh +++ b/scripts/test_jupyter_with_papermill.sh @@ -191,7 +191,7 @@ function _get_source_of_truth_filepath() case "${python_flavor}" in python-3.12) imagestream_directory="${manifest_directory}/overlays/additional" - file_suffix='-imagestream.yaml' + file_suffix='imagestream.yaml' local imagestream_accelerator_flavor="${accelerator_flavor:-cpu}" filename="jupyter-${notebook_id}-${imagestream_accelerator_flavor}-py312-${os_flavor}-${file_suffix}"