Skip to content

Commit

Permalink
Fix ci issues
Browse files Browse the repository at this point in the history
Signed-off-by: Yehudit Kerido <[email protected]>
  • Loading branch information
Yehudit Kerido committed Oct 29, 2024
1 parent 48cda9e commit 226c1be
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/sdk-e2e-tests-with-papermill.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ jobs:
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11"]
kubernetes-version: ["v1.27.11", "v1.28.7", "v1.29.2"]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -26,5 +25,4 @@ jobs:
uses: ./.github/workflows/template-notebook-test
with:
python-version: ${{ matrix.python-version }}
kubernetes-version: ${{ matrix.kubernetes-version }}
notebook-input: "examples/v1beta1/sdk/cmaes-and-resume-policies.ipynb,examples/v1beta1/sdk/tune-train-from-func.ipynb"
41 changes: 17 additions & 24 deletions test/e2e/v1beta1/scripts/gh-actions/build-load.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ SPECIFIED_DEVICE_TYPE_IMAGES=("enas-cnn-cifar10-cpu" "darts-cnn-cifar10-cpu" "py

IFS="," read -r -a TRIAL_IMAGE_ARRAY <<< "$TRIAL_IMAGES"
IFS="," read -r -a EXPERIMENT_ARRAY <<< "$EXPERIMENTS"
IFS=',' read -r -a ALGORITHM_ARRAY <<< "$ALGORITHMS"

_build_containers() {
CONTAINER_NAME=${1:-"katib-controller"}
Expand Down Expand Up @@ -75,35 +76,27 @@ run() {

suggestions=()

if [ "${EXPERIMENT_ARRAY[@]}" -ne 0 ]; then

# Search for Suggestion Images required for Trial.
for exp_name in "${EXPERIMENT_ARRAY[@]}"; do
# Search for Suggestion Images required for Trial.
for exp_name in "${EXPERIMENT_ARRAY[@]}"; do

exp_path=$(find examples/v1beta1 -name "${exp_name}.yaml")
algorithm_name="$(yq eval '.spec.algorithm.algorithmName' "$exp_path")"
exp_path=$(find examples/v1beta1 -name "${exp_name}.yaml")
algorithm_name="$(yq eval '.spec.algorithm.algorithmName' "$exp_path")"

suggestion_image_name="$(algorithm_name=$algorithm_name yq eval '.runtime.suggestions.[] | select(.algorithmName == env(algorithm_name)) | .image' \
manifests/v1beta1/installs/katib-standalone/katib-config.yaml | cut -d: -f1)"
suggestion_name="$(basename "$suggestion_image_name")"
suggestion_image_name="$(algorithm_name=$algorithm_name yq eval '.runtime.suggestions.[] | select(.algorithmName == env(algorithm_name)) | .image' \
manifests/v1beta1/installs/katib-standalone/katib-config.yaml | cut -d: -f1)"
suggestion_name="$(basename "$suggestion_image_name")"

suggestions+=("$suggestion_name")
suggestions+=("$suggestion_name")

done
fi
done

if [ "${EXPERIMENT_ARRAY[@]}" -eq 0 ] && [ -n "$ALGORITHMS" ]; then
# Split the comma-separated ALGORITHMS into an array
IFS=',' read -r -a ALGORITHM_ARRAY <<< "$ALGORITHMS"

# Loop through each algorithm in the array
for algorithm_name in "${ALGORITHM_ARRAY[@]}"; do
suggestion_image_name="$(algorithm_name=$algorithm_name yq eval '.runtime.suggestions.[] | select(.algorithmName == env(algorithm_name)) | .image' \
manifests/v1beta1/installs/katib-standalone/katib-config.yaml | cut -d: -f1)"
suggestion_name="$(basename "$suggestion_image_name")"
suggestions+=("$suggestion_name")
done
fi
# Loop through each algorithm in the array
for algorithm_name in "${ALGORITHM_ARRAY[@]}"; do
suggestion_image_name="$(algorithm_name=$algorithm_name yq eval '.runtime.suggestions.[] | select(.algorithmName == env(algorithm_name)) | .image' \
manifests/v1beta1/installs/katib-standalone/katib-config.yaml | cut -d: -f1)"
suggestion_name="$(basename "$suggestion_image_name")"
suggestions+=("$suggestion_name")
done

for s in "${suggestions[@]}"; do
if [ "$s" == "$CONTAINER_NAME" ]; then
Expand Down

0 comments on commit 226c1be

Please sign in to comment.