Skip to content

Commit 5c36b91

Browse files
committed
[SDK] Fix empty list for env variables and numpy version (#2360)
* [SDK] Fix empty list for env variables Signed-off-by: Andrey Velichkevich <[email protected]> * Fix numpy version in tests Signed-off-by: Andrey Velichkevich <[email protected]> --------- Signed-off-by: Andrey Velichkevich <[email protected]>
1 parent fc7cdca commit 5c36b91

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

examples/v1beta1/trial-images/darts-cnn-cifar10/Dockerfile.cpu

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ ENV TARGET_DIR /opt/darts-cnn-cifar10
44

55
ADD examples/v1beta1/trial-images/darts-cnn-cifar10 ${TARGET_DIR}
66

7-
WORKDIR ${TARGET_DIR}
7+
WORKDIR ${TARGET_DIR}
88

9+
# TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0
10+
RUN pip install numpy==1.26.0
911
RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1
10-
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
12+
1113
RUN chgrp -R 0 ${TARGET_DIR} \
1214
&& chmod -R g+rwX ${TARGET_DIR}
1315

examples/v1beta1/trial-images/darts-cnn-cifar10/requirements.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.cpu

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ WORKDIR /opt/pytorch-mnist
66

77
# Add folder for the logs.
88
RUN mkdir /katib
9+
10+
# TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0
11+
RUN pip install numpy==1.26.0
912
RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1
1013
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt
1114

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1 @@
11
cloudml-hypertune==0.1.0.dev6
2-
Pillow>=9.1.1

sdk/python/v1beta1/kubeflow/katib/api/katib_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -386,8 +386,8 @@ def tune(
386386
image=base_image,
387387
command=["bash", "-c"],
388388
args=[exec_script],
389-
env=env,
390-
env_from=env_from,
389+
env=env if env else None,
390+
env_from=env_from if env_from else None,
391391
resources=resources_per_trial,
392392
)
393393
],

0 commit comments

Comments
 (0)