Skip to content

Commit

Permalink
[SDK] Fix empty list for env variables and numpy version (#2360)
Browse files Browse the repository at this point in the history
* [SDK] Fix empty list for env variables

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

* Fix numpy version in tests

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>

---------

Signed-off-by: Andrey Velichkevich <andrey.velichkevich@gmail.com>
  • Loading branch information
andreyvelich committed Jun 18, 2024
1 parent fc7cdca commit 5c36b91
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ ENV TARGET_DIR /opt/darts-cnn-cifar10

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

WORKDIR ${TARGET_DIR}
WORKDIR ${TARGET_DIR}

# TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0
RUN pip install numpy==1.26.0
RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt

RUN chgrp -R 0 ${TARGET_DIR} \
&& chmod -R g+rwX ${TARGET_DIR}

Expand Down

This file was deleted.

3 changes: 3 additions & 0 deletions examples/v1beta1/trial-images/pytorch-mnist/Dockerfile.cpu
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ WORKDIR /opt/pytorch-mnist

# Add folder for the logs.
RUN mkdir /katib

# TODO (andreyvelich): This is required since torchvision==0.17.1 is incompatible with numpy 2.0
RUN pip install numpy==1.26.0
RUN pip install --prefer-binary --no-cache-dir torch==2.2.1 torchvision==0.17.1
RUN pip install --prefer-binary --no-cache-dir -r requirements.txt

Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
cloudml-hypertune==0.1.0.dev6
Pillow>=9.1.1
4 changes: 2 additions & 2 deletions sdk/python/v1beta1/kubeflow/katib/api/katib_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ def tune(
image=base_image,
command=["bash", "-c"],
args=[exec_script],
env=env,
env_from=env_from,
env=env if env else None,
env_from=env_from if env_from else None,
resources=resources_per_trial,
)
],
Expand Down

0 comments on commit 5c36b91

Please sign in to comment.