From 3f4ea55852961a49ca744349181791bd12251b58 Mon Sep 17 00:00:00 2001 From: Prakhar Singhal Date: Mon, 2 Sep 2024 08:45:00 +0000 Subject: [PATCH] Fixed precommit lint check and directory bug in tune e2e tests Signed-off-by: Prakhar Singhal --- .../e2e/v1beta1/scripts/gh-actions/Dockerfile.dummy-collector | 4 ++-- test/e2e/v1beta1/scripts/gh-actions/build-load.sh | 0 test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py | 3 +-- test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py | 3 +-- 4 files changed, 4 insertions(+), 6 deletions(-) mode change 100755 => 100644 test/e2e/v1beta1/scripts/gh-actions/build-load.sh diff --git a/test/e2e/v1beta1/scripts/gh-actions/Dockerfile.dummy-collector b/test/e2e/v1beta1/scripts/gh-actions/Dockerfile.dummy-collector index 00933708851..d592af3323e 100644 --- a/test/e2e/v1beta1/scripts/gh-actions/Dockerfile.dummy-collector +++ b/test/e2e/v1beta1/scripts/gh-actions/Dockerfile.dummy-collector @@ -2,8 +2,8 @@ FROM python:3.8-slim WORKDIR /app -COPY dummy-collector.py . +COPY test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py . RUN pip install kubernetes -CMD ["python", "dummy-collector.py"] +CMD ["python", "dummy-collector.py"] \ No newline at end of file diff --git a/test/e2e/v1beta1/scripts/gh-actions/build-load.sh b/test/e2e/v1beta1/scripts/gh-actions/build-load.sh old mode 100755 new mode 100644 diff --git a/test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py b/test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py index b7309644d8c..5fa2497a828 100644 --- a/test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py +++ b/test/e2e/v1beta1/scripts/gh-actions/dummy-collector.py @@ -2,8 +2,7 @@ import logging import time -from kubernetes import client -from kubernetes import config +from kubernetes import client, config # The default logging config. logging.basicConfig(level=logging.INFO) diff --git a/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py b/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py index 4afd76d8b89..745787f0077 100644 --- a/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py +++ b/test/e2e/v1beta1/scripts/gh-actions/run-e2e-tune-api.py @@ -59,7 +59,7 @@ def objective(parameters): resources_per_trial={"cpu": "2"}, metrics_collector_config={ "kind": "Custom", - "customCollector": metric_collector, + "custom_collector": metric_collector, }, ) experiment = katib_client.wait_for_experiment_condition( @@ -118,7 +118,6 @@ def objective(parameters): logging.debug(katib_client.get_experiment(exp_name, exp_namespace)) logging.debug(katib_client.get_suggestion(exp_name, exp_namespace)) - if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument(