Skip to content

Commit 6bd4f51

Browse files
committed
RHAIENG-287: chore(manifests): undo the changes from #1518 since we don't have additional/ manifests any more (#2499)
1 parent 5ae02b2 commit 6bd4f51

File tree

2 files changed

+28
-37
lines changed

2 files changed

+28
-37
lines changed

scripts/test_jupyter_with_papermill.sh

Lines changed: 17 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -185,38 +185,25 @@ function _get_source_of_truth_filepath()
185185
local notebook_id="${1##*/}"
186186

187187
local manifest_directory="${root_repo_directory}/manifests"
188-
local imagestream_directory=
189-
local file_suffix=
190-
local filename=
191-
case "${python_flavor}" in
192-
python-3.12)
193-
imagestream_directory="${manifest_directory}/overlays/additional"
194-
file_suffix='imagestream.yaml'
188+
local imagestream_directory="${manifest_directory}/base"
195189

196-
local imagestream_accelerator_flavor="${accelerator_flavor:-cpu}"
197-
filename="jupyter-${notebook_id}-${imagestream_accelerator_flavor}-py312-${os_flavor}-${file_suffix}"
190+
local file_suffix='notebook-imagestream.yaml'
191+
local filename=
192+
case "${notebook_id}" in
193+
*$jupyter_minimal_notebook_id*)
194+
filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}"
195+
if [ "${accelerator_flavor}" = 'cuda' ]; then
196+
filename="jupyter-${notebook_id}-gpu-${file_suffix}"
197+
fi
198198
;;
199-
*)
200-
imagestream_directory="${manifest_directory}/base"
201-
file_suffix='notebook-imagestream.yaml'
202-
203-
case "${notebook_id}" in
204-
*$jupyter_minimal_notebook_id*)
205-
filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}"
206-
if [ "${accelerator_flavor}" = 'cuda' ]; then
207-
filename="jupyter-${notebook_id}-gpu-${file_suffix}"
208-
fi
209-
;;
210-
*$jupyter_datascience_notebook_id* | *$jupyter_trustyai_notebook_id*)
211-
filename="jupyter-${notebook_id}-${file_suffix}"
212-
;;
213-
*$jupyter_pytorch_notebook_id* | *$jupyter_tensorflow_notebook_id*)
214-
filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}"
215-
if [ "${accelerator_flavor}" = 'cuda' ]; then
216-
filename="jupyter-${notebook_id}-${file_suffix}"
217-
fi
218-
;;
219-
esac
199+
*$jupyter_datascience_notebook_id* | *$jupyter_trustyai_notebook_id*)
200+
filename="jupyter-${notebook_id}-${file_suffix}"
201+
;;
202+
*$jupyter_pytorch_notebook_id* | *$jupyter_tensorflow_notebook_id*)
203+
filename="jupyter-${accelerator_flavor:+"$accelerator_flavor"-}${notebook_id}-${file_suffix}"
204+
if [ "${accelerator_flavor}" = 'cuda' ]; then
205+
filename="jupyter-${notebook_id}-${file_suffix}"
206+
fi
220207
;;
221208
esac
222209

tests/manifests.py

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,9 @@ def get_targets() -> Generator[tuple[str, Path], None, None]:
310310
"runtime-minimal-ubi9-python-3.12": ROOT_DIR / "manifests/base/jupyter-minimal-notebook-imagestream.yaml",
311311
# no -gpu-?
312312
"cuda-jupyter-minimal-ubi9-python-3.12": ROOT_DIR
313-
/ "manifests/base/jupyter-minimal-notebook-imagestream.yaml",
313+
/ "manifests/base/jupyter-minimal-gpu-notebook-imagestream.yaml",
314314
"rocm-jupyter-minimal-ubi9-python-3.12": ROOT_DIR
315-
/ "manifests/base/jupyter-minimal-notebook-imagestream.yaml",
315+
/ "manifests/base/jupyter-rocm-minimal-notebook-imagestream.yaml",
316316
"jupyter-datascience-ubi9-python-3.12": ROOT_DIR
317317
/ "manifests/base/jupyter-datascience-notebook-imagestream.yaml",
318318
"runtime-datascience-ubi9-python-3.12": ROOT_DIR
@@ -322,9 +322,9 @@ def get_targets() -> Generator[tuple[str, Path], None, None]:
322322
"runtime-cuda-pytorch-ubi9-python-3.12": ROOT_DIR
323323
/ "manifests/base/jupyter-pytorch-notebook-imagestream.yaml",
324324
"rocm-jupyter-pytorch-ubi9-python-3.12": ROOT_DIR
325-
/ "manifests/base/jupyter-pytorch-notebook-imagestream.yaml",
325+
/ "manifests/base/jupyter-rocm-pytorch-notebook-imagestream.yaml",
326326
"rocm-runtime-pytorch-ubi9-python-3.12": ROOT_DIR
327-
/ "manifests/base/jupyter-pytorch-notebook-imagestream.yaml",
327+
/ "manifests/base/jupyter-rocm-pytorch-notebook-imagestream.yaml",
328328
"cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12": ROOT_DIR
329329
/ "manifests/base/jupyter-pytorch-notebook-imagestream.yaml",
330330
"runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12": ROOT_DIR
@@ -334,9 +334,9 @@ def get_targets() -> Generator[tuple[str, Path], None, None]:
334334
"runtime-cuda-tensorflow-ubi9-python-3.12": ROOT_DIR
335335
/ "manifests/base/jupyter-tensorflow-notebook-imagestream.yaml",
336336
"rocm-jupyter-tensorflow-ubi9-python-3.12": ROOT_DIR
337-
/ "manifests/base/jupyter-tensorflow-notebook-imagestream.yaml",
337+
/ "manifests/base/jupyter-rocm-tensorflow-notebook-imagestream.yaml",
338338
"rocm-runtime-tensorflow-ubi9-python-3.12": ROOT_DIR
339-
/ "manifests/base/jupyter-tensorflow-notebook-imagestream.yaml",
339+
/ "manifests/base/jupyter-rocm-tensorflow-notebook-imagestream.yaml",
340340
"jupyter-trustyai-ubi9-python-3.12": ROOT_DIR / "manifests/base/jupyter-trustyai-notebook-imagestream.yaml",
341341
"codeserver-ubi9-python-3.12": ROOT_DIR / "manifests/base/code-server-notebook-imagestream.yaml",
342342
"rstudio-ubi9-python-3.11": ROOT_DIR / "manifests/base/rstudio-buildconfig.yaml",
@@ -350,7 +350,11 @@ def get_targets() -> Generator[tuple[str, Path], None, None]:
350350
continue
351351
if "rstudio" in target:
352352
continue
353-
yield target, expected_manifest_paths[target]
353+
try:
354+
expected_manifest_path = expected_manifest_paths[target]
355+
except KeyError as e:
356+
raise ValueError(f"Missing expected manifest path for target '{target}'") from e
357+
yield target, expected_manifest_path
354358

355359
@pytest.mark.parametrize("target,expected_manifest_path", get_targets())
356360
def test_compare_with_shell_implementation(self, target: str, expected_manifest_path: Path):

0 commit comments

Comments
 (0)