Skip to content

Commit df4a808

Browse files
authored
RHAIENG-287: fix(tests/llmcompressor): create missing kustomization.yaml (#2602)
``` # Deploying notebook from runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base directory... arg=ghcr.io/opendatahub-io/notebooks/workbench-images bin/yq e -i '.images[].newName = strenv(arg)' runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base/kustomization.yaml arg=runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12-_8adf444fa4f489cd5b34d7fce14f94795812393b bin/yq e -i '.images[].newTag = strenv(arg)' runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base/kustomization.yaml bin/kubectl apply -k runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base + arg=ghcr.io/opendatahub-io/notebooks/workbench-images + bin/yq e -i '.images[].newName = strenv(arg)' runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base/kustomization.yaml Error: stat runtimes/pytorch/llmcompressor/ubi9-python-3.12/kustomize/base/kustomization.yaml: no such file or directory ```
1 parent 8adf444 commit df4a808

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

ci/cached-builds/make_test.py

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,19 @@ def run_tests(target: str) -> None:
3737
pod = prefix + "-notebook-0" # `$(kubectl get statefulset -o name | head -n 1)` would work too
3838
namespace = "ns-" + prefix
3939

40-
if target.startswith("runtime-"):
40+
if target == "runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12":
41+
deploy = "deploy9"
42+
deploy_target = "runtimes-cuda-pytorch+llmcompressor-ubi9-python-3.12"
43+
elif target.startswith("runtime-"):
4144
deploy = "deploy9"
4245
deploy_target = target.replace("runtime-", "runtimes-")
4346
elif target.startswith("rocm-runtime-"):
4447
deploy = "deploy9"
4548
deploy_target = target.replace("rocm-runtime-", "runtimes-rocm-")
49+
50+
elif target == "cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12":
51+
deploy = "deploy9"
52+
deploy_target = "cuda-jupyter-pytorch+llmcompressor-ubi9-python-3.12"
4653
elif target.startswith("rocm-jupyter-"):
4754
deploy = "deploy9"
4855
deploy_target = target.replace("rocm-jupyter-", "jupyter-rocm-")
@@ -248,6 +255,24 @@ def test_make_commands_rocm_runtime(self, mock_execute: unittest.mock.Mock) -> N
248255
assert "make validate-runtime-image image=runtime-rocm-pytorch-ubi9-python-3.11" in commands
249256
assert "make undeploy9-runtimes-rocm-pytorch-ubi9-python-3.11" in commands
250257

258+
@unittest.mock.patch(target)
259+
def test_make_commands_llmcompressor(self, mock_execute: unittest.mock.Mock) -> None:
260+
"""Compares the commands with what we had in the openshift/release yaml"""
261+
run_tests("cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12")
262+
commands: list[str] = [c[0][1][0] for c in mock_execute.call_args_list]
263+
assert "make deploy9-cuda-jupyter-pytorch+llmcompressor-ubi9-python-3.12" in commands
264+
assert "make test-cuda-jupyter-pytorch-llmcompressor-ubi9-python-3.12" in commands
265+
assert "make undeploy9-cuda-jupyter-pytorch+llmcompressor-ubi9-python-3.12" in commands
266+
267+
@unittest.mock.patch(target)
268+
def test_make_commands_llmcompressor_runtime(self, mock_execute: unittest.mock.Mock) -> None:
269+
"""Compares the commands with what we had in the openshift/release yaml"""
270+
run_tests("runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12")
271+
commands: list[str] = [c[0][1][0] for c in mock_execute.call_args_list]
272+
assert "make deploy9-runtimes-cuda-pytorch+llmcompressor-ubi9-python-3.12" in commands
273+
assert "make validate-runtime-image image=runtime-cuda-pytorch-llmcompressor-ubi9-python-3.12" in commands
274+
assert "make undeploy9-runtimes-cuda-pytorch+llmcompressor-ubi9-python-3.12" in commands
275+
251276

252277
if __name__ == "__main__":
253278
main()

0 commit comments

Comments
 (0)