From f29ef609c76bfde197b946f4732f7c08f0d63e9e Mon Sep 17 00:00:00 2001 From: Michal Hucko Date: Fri, 6 Sep 2024 15:47:40 +0200 Subject: [PATCH] Integrate v0.17.0 katib rocks (#233) * Integrate v0.17.0 katib rocks --- charms/katib-controller/metadata.yaml | 2 +- .../src/default-custom-images.json | 30 +++++++++---------- .../tests/integration/test_charm.py | 4 +-- charms/katib-db-manager/metadata.yaml | 2 +- charms/katib-ui/metadata.yaml | 2 +- 5 files changed, 20 insertions(+), 20 deletions(-) diff --git a/charms/katib-controller/metadata.yaml b/charms/katib-controller/metadata.yaml index 99914d4..6783f4c 100755 --- a/charms/katib-controller/metadata.yaml +++ b/charms/katib-controller/metadata.yaml @@ -15,7 +15,7 @@ resources: type: oci-image description: OCI image for katb-controller auto-fetch: true - upstream-source: docker.io/kubeflowkatib/katib-controller:v0.17.0 + upstream-source: docker.io/charmedkubeflow/katib-controller:v0.17.0-af31ca1 provides: metrics-endpoint: interface: prometheus_scrape diff --git a/charms/katib-controller/src/default-custom-images.json b/charms/katib-controller/src/default-custom-images.json index 8dfb3b1..e44b1eb 100644 --- a/charms/katib-controller/src/default-custom-images.json +++ b/charms/katib-controller/src/default-custom-images.json @@ -2,19 +2,19 @@ "default_trial_template": "docker.io/ubuntu:22.04", "default_trial_template_enas": "docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v0.17.0", "default_trial_template_pytorch": "docker.io/kubeflowkatib/pytorch-mnist-cpu:v0.17.0", - "early_stopping__medianstop": "docker.io/kubeflowkatib/earlystopping-medianstop:v0.17.0", - "metrics_collector_sidecar__stdout": "docker.io/kubeflowkatib/file-metrics-collector:v0.17.0", - "metrics_collector_sidecar__file": "docker.io/kubeflowkatib/file-metrics-collector:v0.17.0", - "metrics_collector_sidecar__tensorflow_event": "docker.io/kubeflowkatib/tfevent-metrics-collector:v0.17.0", - "suggestion__random": "docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0", - "suggestion__tpe": "docker.io/kubeflowkatib/suggestion-hyperopt:v0.17.0", - "suggestion__grid": "docker.io/kubeflowkatib/suggestion-optuna:v0.17.0", - "suggestion__hyperband": "docker.io/kubeflowkatib/suggestion-hyperband:v0.17.0", - "suggestion__bayesianoptimization": "docker.io/kubeflowkatib/suggestion-skopt:v0.17.0", - "suggestion__cmaes": "docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0", - "suggestion__sobol": "docker.io/kubeflowkatib/suggestion-goptuna:v0.17.0", - "suggestion__multivariate_tpe": "docker.io/kubeflowkatib/suggestion-optuna:v0.17.0", - "suggestion__enas": "docker.io/kubeflowkatib/suggestion-enas:v0.17.0", - "suggestion__darts": "docker.io/kubeflowkatib/suggestion-darts:v0.17.0", - "suggestion__pbt": "docker.io/kubeflowkatib/suggestion-pbt:v0.17.0" + "early_stopping__medianstop": "docker.io/charmedkubeflow/earlystopping-medianstop:v0.17.0-92cd6d9", + "metrics_collector_sidecar__stdout": "docker.io/charmedkubeflow/file-metrics-collector:v0.17.0-867ad83", + "metrics_collector_sidecar__file": "docker.io/charmedkubeflow/file-metrics-collector:v0.17.0-867ad83", + "metrics_collector_sidecar__tensorflow_event": "docker.io/charmedkubeflow/tfevent-metrics-collector:v0.17.0-92cd6d9", + "suggestion__random": "docker.io/charmedkubeflow/suggestion-hyperopt:v0.17.0-92cd6d9", + "suggestion__tpe": "docker.io/charmedkubeflow/suggestion-hyperopt:v0.17.0-92cd6d9", + "suggestion__grid": "docker.io/charmedkubeflow/suggestion-optuna:v0.17.0-92cd6d9", + "suggestion__hyperband": "docker.io/charmedkubeflow/suggestion-hyperband:v0.17.0-92cd6d9", + "suggestion__bayesianoptimization": "docker.io/charmedkubeflow/suggestion-skopt:v0.17.0-92cd6d9", + "suggestion__cmaes": "docker.io/charmedkubeflow/suggestion-goptuna:v0.17.0-92cd6d9", + "suggestion__sobol": "docker.io/charmedkubeflow/suggestion-goptuna:v0.17.0-92cd6d9", + "suggestion__multivariate_tpe": "docker.io/charmedkubeflow/suggestion-optuna:v0.17.0-92cd6d9", + "suggestion__enas": "docker.io/charmedkubeflow/suggestion-enas:v0.17.0-34dac59", + "suggestion__darts": "docker.io/charmedkubeflow/suggestion-nas-darts:v0.17.0-92cd6d9", + "suggestion__pbt": "docker.io/charmedkubeflow/suggestion-pbt:v0.17.0-92cd6d9" } diff --git a/charms/katib-controller/tests/integration/test_charm.py b/charms/katib-controller/tests/integration/test_charm.py index fcbc3c5..e361f3f 100644 --- a/charms/katib-controller/tests/integration/test_charm.py +++ b/charms/katib-controller/tests/integration/test_charm.py @@ -25,11 +25,11 @@ KATIB_VERSION = "v0.17.0" TRIAL_TEMPLATE = "trial-template" EXPECTED_KATIB_CONFIG = { - "katib-config.yaml": "---\napiVersion: config.kubeflow.org/v1beta1\nkind: KatibConfig\ninit:\n controller:\n webhookPort: 443\n trialResources:\n - Job.v1.batch\n - TFJob.v1.kubeflow.org\n - PyTorchJob.v1.kubeflow.org\n - MPIJob.v1.kubeflow.org\n - XGBoostJob.v1.kubeflow.org\n - MXJob.v1.kubeflow.org\nruntime:\n metricsCollectors:\n - kind: StdOut\n image: docker.io/kubeflowkatib/file-metrics-collector:%(katib_version)s\n - kind: File\n image: docker.io/kubeflowkatib/file-metrics-collector:%(katib_version)s\n - kind: TensorFlowEvent\n image: docker.io/kubeflowkatib/tfevent-metrics-collector:%(katib_version)s\n resources:\n limits:\n memory: 1Gi\n suggestions:\n - algorithmName: random\n image: docker.io/kubeflowkatib/suggestion-hyperopt:%(katib_version)s\n - algorithmName: tpe\n image: docker.io/kubeflowkatib/suggestion-hyperopt:%(katib_version)s\n - algorithmName: grid\n image: docker.io/kubeflowkatib/suggestion-optuna:%(katib_version)s\n - algorithmName: hyperband\n image: docker.io/kubeflowkatib/suggestion-hyperband:%(katib_version)s\n - algorithmName: bayesianoptimization\n image: docker.io/kubeflowkatib/suggestion-skopt:%(katib_version)s\n - algorithmName: cmaes\n image: docker.io/kubeflowkatib/suggestion-goptuna:%(katib_version)s\n - algorithmName: sobol\n image: docker.io/kubeflowkatib/suggestion-goptuna:%(katib_version)s\n - algorithmName: multivariate-tpe\n image: docker.io/kubeflowkatib/suggestion-optuna:%(katib_version)s\n - algorithmName: enas\n image: docker.io/kubeflowkatib/suggestion-enas:%(katib_version)s\n resources:\n limits:\n memory: 400Mi\n - algorithmName: darts\n image: docker.io/kubeflowkatib/suggestion-darts:%(katib_version)s\n - algorithmName: pbt\n image: docker.io/kubeflowkatib/suggestion-pbt:%(katib_version)s\n persistentVolumeClaimSpec:\n accessModes:\n - ReadWriteMany\n resources:\n requests:\n storage: 5Gi\n earlyStoppings:\n - algorithmName: medianstop\n image: docker.io/kubeflowkatib/earlystopping-medianstop:%(katib_version)s" # noqa: E501 + "katib-config.yaml": "---\napiVersion: config.kubeflow.org/v1beta1\nkind: KatibConfig\ninit:\n controller:\n webhookPort: 443\n trialResources:\n - Job.v1.batch\n - TFJob.v1.kubeflow.org\n - PyTorchJob.v1.kubeflow.org\n - MPIJob.v1.kubeflow.org\n - XGBoostJob.v1.kubeflow.org\n - MXJob.v1.kubeflow.org\nruntime:\n metricsCollectors:\n - kind: StdOut\n image: docker.io/charmedkubeflow/file-metrics-collector:%(katib_version)s-867ad83\n - kind: File\n image: docker.io/charmedkubeflow/file-metrics-collector:%(katib_version)s-867ad83\n - kind: TensorFlowEvent\n image: docker.io/charmedkubeflow/tfevent-metrics-collector:%(katib_version)s-92cd6d9\n resources:\n limits:\n memory: 1Gi\n suggestions:\n - algorithmName: random\n image: docker.io/charmedkubeflow/suggestion-hyperopt:%(katib_version)s-92cd6d9\n - algorithmName: tpe\n image: docker.io/charmedkubeflow/suggestion-hyperopt:%(katib_version)s-92cd6d9\n - algorithmName: grid\n image: docker.io/charmedkubeflow/suggestion-optuna:%(katib_version)s-92cd6d9\n - algorithmName: hyperband\n image: docker.io/charmedkubeflow/suggestion-hyperband:%(katib_version)s-92cd6d9\n - algorithmName: bayesianoptimization\n image: docker.io/charmedkubeflow/suggestion-skopt:%(katib_version)s-92cd6d9\n - algorithmName: cmaes\n image: docker.io/charmedkubeflow/suggestion-goptuna:%(katib_version)s-92cd6d9\n - algorithmName: sobol\n image: docker.io/charmedkubeflow/suggestion-goptuna:%(katib_version)s-92cd6d9\n - algorithmName: multivariate-tpe\n image: docker.io/charmedkubeflow/suggestion-optuna:%(katib_version)s-92cd6d9\n - algorithmName: enas\n image: docker.io/charmedkubeflow/suggestion-enas:%(katib_version)s-34dac59\n resources:\n limits:\n memory: 400Mi\n - algorithmName: darts\n image: docker.io/charmedkubeflow/suggestion-nas-darts:%(katib_version)s-92cd6d9\n - algorithmName: pbt\n image: docker.io/charmedkubeflow/suggestion-pbt:%(katib_version)s-92cd6d9\n persistentVolumeClaimSpec:\n accessModes:\n - ReadWriteMany\n resources:\n requests:\n storage: 5Gi\n earlyStoppings:\n - algorithmName: medianstop\n image: docker.io/charmedkubeflow/earlystopping-medianstop:%(katib_version)s-92cd6d9" # noqa: E501 % {"katib_version": KATIB_VERSION}, } EXPECTED_KATIB_CONFIG_CHANGED = { - "katib-config.yaml": "---\napiVersion: config.kubeflow.org/v1beta1\nkind: KatibConfig\ninit:\n controller:\n webhookPort: 443\n trialResources:\n - Job.v1.batch\n - TFJob.v1.kubeflow.org\n - PyTorchJob.v1.kubeflow.org\n - MPIJob.v1.kubeflow.org\n - XGBoostJob.v1.kubeflow.org\n - MXJob.v1.kubeflow.org\nruntime:\n metricsCollectors:\n - kind: StdOut\n image: docker.io/kubeflowkatib/file-metrics-collector:%(katib_version)s\n - kind: File\n image: docker.io/kubeflowkatib/file-metrics-collector:%(katib_version)s\n - kind: TensorFlowEvent\n image: docker.io/kubeflowkatib/tfevent-metrics-collector:%(katib_version)s\n resources:\n limits:\n memory: 1Gi\n suggestions:\n - algorithmName: random\n image: docker.io/kubeflowkatib/suggestion-hyperopt:%(katib_version)s\n - algorithmName: tpe\n image: docker.io/kubeflowkatib/suggestion-hyperopt:%(katib_version)s\n - algorithmName: grid\n image: docker.io/kubeflowkatib/suggestion-optuna:%(katib_version)s\n - algorithmName: hyperband\n image: docker.io/kubeflowkatib/suggestion-hyperband:%(katib_version)s\n - algorithmName: bayesianoptimization\n image: docker.io/kubeflowkatib/suggestion-skopt:%(katib_version)s\n - algorithmName: cmaes\n image: docker.io/kubeflowkatib/suggestion-goptuna:%(katib_version)s\n - algorithmName: sobol\n image: docker.io/kubeflowkatib/suggestion-goptuna:%(katib_version)s\n - algorithmName: multivariate-tpe\n image: docker.io/kubeflowkatib/suggestion-optuna:%(katib_version)s\n - algorithmName: enas\n image: docker.io/kubeflowkatib/suggestion-enas:%(katib_version)s\n resources:\n limits:\n memory: 400Mi\n - algorithmName: darts\n image: docker.io/kubeflowkatib/suggestion-darts:%(katib_version)s\n - algorithmName: pbt\n image: docker.io/kubeflowkatib/suggestion-pbt:%(katib_version)s\n persistentVolumeClaimSpec:\n accessModes:\n - ReadWriteMany\n resources:\n requests:\n storage: 5Gi\n earlyStoppings:\n - algorithmName: medianstop\n image: custom:2.1" # noqa: E501 + "katib-config.yaml": "---\napiVersion: config.kubeflow.org/v1beta1\nkind: KatibConfig\ninit:\n controller:\n webhookPort: 443\n trialResources:\n - Job.v1.batch\n - TFJob.v1.kubeflow.org\n - PyTorchJob.v1.kubeflow.org\n - MPIJob.v1.kubeflow.org\n - XGBoostJob.v1.kubeflow.org\n - MXJob.v1.kubeflow.org\nruntime:\n metricsCollectors:\n - kind: StdOut\n image: docker.io/charmedkubeflow/file-metrics-collector:%(katib_version)s-867ad83\n - kind: File\n image: docker.io/charmedkubeflow/file-metrics-collector:%(katib_version)s-867ad83\n - kind: TensorFlowEvent\n image: docker.io/charmedkubeflow/tfevent-metrics-collector:%(katib_version)s-92cd6d9\n resources:\n limits:\n memory: 1Gi\n suggestions:\n - algorithmName: random\n image: docker.io/charmedkubeflow/suggestion-hyperopt:%(katib_version)s-92cd6d9\n - algorithmName: tpe\n image: docker.io/charmedkubeflow/suggestion-hyperopt:%(katib_version)s-92cd6d9\n - algorithmName: grid\n image: docker.io/charmedkubeflow/suggestion-optuna:%(katib_version)s-92cd6d9\n - algorithmName: hyperband\n image: docker.io/charmedkubeflow/suggestion-hyperband:%(katib_version)s-92cd6d9\n - algorithmName: bayesianoptimization\n image: docker.io/charmedkubeflow/suggestion-skopt:%(katib_version)s-92cd6d9\n - algorithmName: cmaes\n image: docker.io/charmedkubeflow/suggestion-goptuna:%(katib_version)s-92cd6d9\n - algorithmName: sobol\n image: docker.io/charmedkubeflow/suggestion-goptuna:%(katib_version)s-92cd6d9\n - algorithmName: multivariate-tpe\n image: docker.io/charmedkubeflow/suggestion-optuna:%(katib_version)s-92cd6d9\n - algorithmName: enas\n image: docker.io/charmedkubeflow/suggestion-enas:%(katib_version)s-34dac59\n resources:\n limits:\n memory: 400Mi\n - algorithmName: darts\n image: docker.io/charmedkubeflow/suggestion-nas-darts:%(katib_version)s-92cd6d9\n - algorithmName: pbt\n image: docker.io/charmedkubeflow/suggestion-pbt:%(katib_version)s-92cd6d9\n persistentVolumeClaimSpec:\n accessModes:\n - ReadWriteMany\n resources:\n requests:\n storage: 5Gi\n earlyStoppings:\n - algorithmName: medianstop\n image: custom:2.1" # noqa: E501 % {"katib_version": KATIB_VERSION}, } EXPECTED_TRIAL_TEMPLATE = { diff --git a/charms/katib-db-manager/metadata.yaml b/charms/katib-db-manager/metadata.yaml index 4a02a7f..163eea2 100755 --- a/charms/katib-db-manager/metadata.yaml +++ b/charms/katib-db-manager/metadata.yaml @@ -18,7 +18,7 @@ resources: type: oci-image description: Backing OCI image auto-fetch: true - upstream-source: docker.io/kubeflowkatib/katib-db-manager:v0.17.0 + upstream-source: docker.io/charmedkubeflow/katib-db-manager:v0.17.0-92cd6d9 requires: relational-db: interface: mysql_client diff --git a/charms/katib-ui/metadata.yaml b/charms/katib-ui/metadata.yaml index 0169c53..97f818f 100755 --- a/charms/katib-ui/metadata.yaml +++ b/charms/katib-ui/metadata.yaml @@ -15,7 +15,7 @@ resources: type: oci-image description: Backing OCI image auto-fetch: true - upstream-source: docker.io/kubeflowkatib/katib-ui:v0.17.0 + upstream-source: charmedkubeflow/katib-ui:v0.17.0-158182c requires: ingress: interface: ingress