Skip to content

Commit

Permalink
Change image registry to docker.io/kubeflowkatib (#1372)
Browse files Browse the repository at this point in the history
* Change kubeflow-images-public to kubeflowkatib

* Remove kubeflow-images-public from setup-katib script

* Add test for early stopping

* Fix early stopping settings

* Add tags to all examples

* Fix Katib config

* Fix empty var in UI

* Fix comment

* Trigger Travis
  • Loading branch information
andreyvelich authored Nov 4, 2020
1 parent e294a90 commit 1729997
Show file tree
Hide file tree
Showing 35 changed files with 102 additions and 73 deletions.
6 changes: 3 additions & 3 deletions docs/new-algorithm-service.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,10 @@ Update the [katib-config](../manifests/v1beta1/katib-controller/katib-config.yam
suggestion: |-
{
"tpe": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-hyperopt"
"image": "docker.io/kubeflowkatib/suggestion-hyperopt"
},
"random": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-hyperopt"
"image": "docker.io/kubeflowkatib/suggestion-hyperopt"
},
"<new-algorithm-name>": {
"image": "image built in the previous stage"
Expand Down Expand Up @@ -152,7 +152,7 @@ To add a e2e test for the new algorithm, in [test/scripts/v1beta1](../test/scrip
3. Update [`check-katib-ready.sh`](../test/scripts/v1beta1/check-katib-ready.sh) script to modify `katib-config.yaml` with the new test suggestion image name. We use `gcr.io/automl-ci` registry to run presubmit tests. For example (Replace `<name>` with the new suggestion name):

```
sed -i -e "s@gcr.io\/kubeflow-images-public\/katib\/v1beta1\/suggestion-<name>@${REGISTRY}\/${REPO_NAME}\/v1beta1\/suggestion-<name>@" manifests/v1beta1/katib-controller/katib-config.yaml
sed -i -e "s@docker.io\/kubeflowkatib\/suggestion-<name>@${REGISTRY}\/${REPO_NAME}\/v1beta1\/suggestion-<name>@" manifests/v1beta1/katib-controller/katib-config.yaml
```

4. Create a new script `run-suggestion-xxx.sh` to run new suggestion. Below is an example (Replace `<name>` with the new algorithm name):
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/bayesianoptimization-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/cmaes-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/custom-metricscollector-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/pytorch-mnist
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-e294a90
imagePullPolicy: Always
command:
- "python"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/early-stopping/median-stop.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/file-metricscollector-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/pytorch-mnist:latest
image: docker.io/kubeflowkatib/pytorch-mnist:v1beta1-e294a90
imagePullPolicy: Always
command:
- "python"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/grid-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/hyperband-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/metric-strategy-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/nas/darts-example-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/darts-cnn-cifar10
image: docker.io/kubeflowkatib/darts-cnn-cifar10:v1beta1-e294a90
imagePullPolicy: Always
command:
- python3
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/nas/darts-example-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/darts-cnn-cifar10
image: docker.io/kubeflowkatib/darts-cnn-cifar10:v1beta1-e294a90
imagePullPolicy: Always
command:
- python3
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/nas/enas-example-cpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v1beta1-e294a90
command:
- python3
- -u
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/nas/enas-example-gpu.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/enas-cnn-cifar10-gpu
image: docker.io/kubeflowkatib/enas-cnn-cifar10-gpu:v1beta1-e294a90
command:
- python3
- -u
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/random-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/resume-experiment/from-volume-resume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/resume-experiment/never-resume.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
6 changes: 3 additions & 3 deletions examples/v1beta1/tekton/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ To avoid this problem, set `nop` image to metrics collector sidecar image.

For example, if you are using
[StdOut](https://www.kubeflow.org/docs/components/hyperparameter-tuning/experiment/#metrics-collector) metrics collector,
`nop` image must be equal to `gcr.io/kubeflow-images-public/katib/v1beta1/file-metrics-collector`.
`nop` image must be equal to `docker.io/kubeflowkatib/file-metrics-collector`.

After deploying Tekton on your cluster, run bellow command to modify `nop` image:

```bash
kubectl patch deploy tekton-pipelines-controller -n tekton-pipelines --type='json' \
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args/9", "value": "gcr.io/kubeflow-images-public/katib/v1beta1/file-metrics-collector"}]'
-p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args/9", "value": "docker.io/kubeflowkatib/file-metrics-collector"}]'
```

Check that Tekton controller's pod was restarted:
Expand All @@ -36,5 +36,5 @@ Check that `nop` image was modified:
```bash
$ kubectl get pod <tekton-controller-pod-name> -n tekton-pipelines -o yaml | grep katib/v1beta1/file-metrics-collector

- gcr.io/kubeflow-images-public/katib/v1beta1/file-metrics-collector
- docker.io/kubeflowkatib/file-metrics-collector
```
2 changes: 1 addition & 1 deletion examples/v1beta1/tekton/pipeline-run.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ spec:
description: Number of training examples
steps:
- name: model-training
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/tpe-example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion examples/v1beta1/trial-metadata-substitution.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ spec:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand Down
2 changes: 1 addition & 1 deletion manifests/v1beta1/db-manager/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: katib-db-manager
image: gcr.io/kubeflow-images-public/katib/v1beta1/katib-db-manager
image: docker.io/kubeflowkatib/katib-db-manager
imagePullPolicy: IfNotPresent
env:
- name: DB_NAME
Expand Down
24 changes: 12 additions & 12 deletions manifests/v1beta1/katib-controller/katib-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@ data:
metrics-collector-sidecar: |-
{
"StdOut": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/file-metrics-collector"
"image": "docker.io/kubeflowkatib/file-metrics-collector"
},
"File": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/file-metrics-collector"
"image": "docker.io/kubeflowkatib/file-metrics-collector"
},
"TensorFlowEvent": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/tfevent-metrics-collector",
"image": "docker.io/kubeflowkatib/tfevent-metrics-collector",
"resources": {
"limits": {
"memory": "1Gi"
Expand All @@ -24,22 +24,22 @@ data:
suggestion: |-
{
"random": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-hyperopt"
"image": "docker.io/kubeflowkatib/suggestion-hyperopt"
},
"grid": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-chocolate"
"image": "docker.io/kubeflowkatib/suggestion-chocolate"
},
"hyperband": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-hyperband"
"image": "docker.io/kubeflowkatib/suggestion-hyperband"
},
"bayesianoptimization": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-skopt"
"image": "docker.io/kubeflowkatib/suggestion-skopt"
},
"tpe": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-hyperopt"
"image": "docker.io/kubeflowkatib/suggestion-hyperopt"
},
"enas": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-enas",
"image": "docker.io/kubeflowkatib/suggestion-enas",
"imagePullPolicy": "Always",
"resources": {
"limits": {
Expand All @@ -48,16 +48,16 @@ data:
}
},
"cmaes": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-goptuna"
"image": "docker.io/kubeflowkatib/suggestion-goptuna"
},
"darts": {
"image": "gcr.io/kubeflow-images-public/katib/v1beta1/suggestion-darts"
"image": "docker.io/kubeflowkatib/suggestion-darts"
}
}
early-stopping: |-
{
"medianstop": {
"image": "docker.io/andreyvelichkevich/earlystopping-median",
"image": "docker.io/kubeflowkatib/earlystopping-medianstop",
"imagePullPolicy": "Always"
}
}
2 changes: 1 addition & 1 deletion manifests/v1beta1/katib-controller/katib-controller.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ spec:
serviceAccountName: katib-controller
containers:
- name: katib-controller
image: gcr.io/kubeflow-images-public/katib/v1beta1/katib-controller
image: docker.io/kubeflowkatib/katib-controller
imagePullPolicy: IfNotPresent
command: ["./katib-controller"]
args:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ data:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/mxnet-mnist
image: docker.io/kubeflowkatib/mxnet-mnist:v1beta1-e294a90
command:
- "python3"
- "/opt/mxnet-mnist/mnist.py"
Expand All @@ -32,7 +32,7 @@ data:
spec:
containers:
- name: training-container
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu
image: docker.io/kubeflowkatib/enas-cnn-cifar10-cpu:v1beta1-e294a90
command:
- python3
- -u
Expand Down
2 changes: 1 addition & 1 deletion manifests/v1beta1/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
spec:
containers:
- name: katib-ui
image: gcr.io/kubeflow-images-public/katib/v1beta1/katib-ui
image: docker.io/kubeflowkatib/katib-ui
imagePullPolicy: IfNotPresent
command:
- "./katib-ui"
Expand Down
6 changes: 3 additions & 3 deletions pkg/earlystopping/v1beta1/medianstop/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def GetEarlyStoppingRules(self, request, context):
if self.is_first_run:
self.is_first_run = False
# Get early stopping settings.
self.getEarlyStoppingSettings(request.experiment.spec.algorithm.algorithm_settings)
self.getEarlyStoppingSettings(request.experiment.spec.early_stopping.algorithm_settings)
logger.info("Median stopping settings are: min_trials_required: {}, start_step: {}".format(
self.min_trials_required, self.start_step))

Expand Down Expand Up @@ -93,9 +93,9 @@ def GetEarlyStoppingRules(self, request, context):
def getEarlyStoppingSettings(self, early_stopping_settings):
for setting in early_stopping_settings:
if setting.name == "min_trials_required":
self.min_trials_required = setting.value
self.min_trials_required = int(setting.value)
elif setting.name == "start_step":
self.start_step = setting.value
self.start_step = int(setting.value)

def getMedianValue(self, trials):
for trial in trials:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,11 @@ const SectionInTypography = name => {
// probably get render into a function
const deCapitalizeFirstLetterAndAppend = (source, destination) => {
source.map((parameter, i) => {
let value = Number(parameter.value);
let value = NaN;
// Try to get Number from parameter value if it is not empty
if (parameter.value !== '') {
value = Number(parameter.value);
}
let name = parameter.name.charAt(0).toLowerCase() + parameter.name.slice(1);
return (destination[name] = isNaN(value) ? parameter.value : value);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ const SectionInTypography = name => {
// probably get render into a function
const deCapitalizeFirstLetterAndAppend = (source, destination) => {
source.map((parameter, i) => {
let value = Number(parameter.value);
let value = NaN;
// Try to get Number from parameter value if it is not empty
if (parameter.value !== '') {
value = Number(parameter.value);
}
let name = parameter.name.charAt(0).toLowerCase() + parameter.name.slice(1);
return (destination[name] = isNaN(value) ? parameter.value : value);
});
Expand Down
2 changes: 1 addition & 1 deletion scripts/v1beta1/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

set -e

COMMIT=$(git rev-parse --short HEAD)
COMMIT=$(git rev-parse --short=7 HEAD)
REGISTRY="docker.io/kubeflowkatib"
VERSION="v1beta1"
TAG=${VERSION}-${COMMIT}
Expand Down
Loading

0 comments on commit 1729997

Please sign in to comment.