Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDK] Fix empty list for env variables and numpy version #2360

Merged
merged 2 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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