Katib Configuration Overview
How to make changes in Katib configuration
This page describes information about Katib config.
Katib config is the Kubernetes Config Map that contains information about:
- Current Metrics Collectors (
key = metrics-collector-sidecar
) - Current Algorithms (Suggestions) (
key = suggestion
).
Katib Config Map must be deployed in KATIB_CORE_NAMESPACE
namespace with katib-config
name. Katib controller parses Katib config when you submit Experiment.
You can edit this Config Map even after deploying Katib.
If you deploy Katib in Kubeflow namespace, to edit Katib config run this:
kubectl edit configMap katib-config -n kubeflow
Metrics Collector Sidecar settings
These settings are related to Katib Metrics Collectors, where:
- key =
metrics-collector-sidecar
- value = corresponding settings JSON for each Metrics Collector.
Example for the File
Metrics Collector with all settings:
metrics-collector-sidecar: |-
{
"File": {
"image": "gcr.io/kubeflow-images-public/katib/v1alpha3/file-metrics-collector",
"imagePullPolicy": "Always",
"resources": {
"requests": {
"memory": "200Mi",
"cpu": "250m",
"ephemeral-storage": "200Mi"
},
"limits": {
"memory": "1Gi",
"cpu": "500m",
"ephemeral-storage": "2Gi"
}
}
},
...
}
All of these settings except image
can be omitted. If you don’t specify any other settings, default value is be set.
image
- Docker image name for theFile
Metrics Collector.Must be specified.
imagePullPolicy
-File
Metrics Collector container image pull policy.Default value is
IfNotPresent
.resources
-File
Metrics Collector container resources. In the above example you can see how to specifylimits
andrequests
. Currently, you can specify onlymemory
,cpu
andephemeral-storage
resource.Default values for the
requests
are:memory = 10Mi
.cpu = 50m
.ephemeral-storage = 500Mi
.
Default values for the
limits
are:memory = 100Mi
.cpu = 500m
.ephemeral-storage = 5Gi
.
Suggestion settings
These settings are related to Katib suggestions, where:
- key =
suggestion
- value = corresponding settings JSON for each algorithm.
If you want to use new algorithm, you must update Katib config with the new suggestion.
Example for the random
suggestion with all settings:
suggestion: |-
{
"random": {
"image": "gcr.io/kubeflow-images-public/katib/v1alpha3/suggestion-hyperopt",
"imagePullPolicy": "Always",
"resources": {
"requests": {
"memory": "100Mi",
"cpu": "100m",
"ephemeral-storage": "100Mi"
},
"limits": {
"memory": "500Mi",
"cpu": "500m",
"ephemeral-storage": "3Gi"
}
},
"serviceAccountName": "suggestion-serviceaccount"
},
...
}
All of these settings except image
can be omitted. If you don’t specify any other settings, default value is be set.
image
- Docker image name for therandom
suggestion. Must be specifiedImage name example:
gcr.io/kubeflow-images-public/katib/v1alpha3/<suggestion-name>
For each algorithm (suggestion) you can specify one of the following suggestion names in Docker image:
Suggestion name List of supported algorithms Description suggestion-hyperopt
random
,tpe
Hyperopt optimization framework suggestion-chocolate
grid
,random
,quasirandom
,bayesianoptimization
,mocmaes
Chocolate optimization framework suggestion-skopt
bayesianoptimization
Scikit-optimize optimization framework suggestion-goptuna
cmaes
,random
,tpe
Goptuna optimization framework suggestion-hyperband
hyperband
Katib Hyperband implementation suggestion-enas
enas
Katib ENAS implementation suggestion-darts
darts
Katib DARTS implementation imagePullPolicy
-Random
suggestion container image pull policy.Default value is
IfNotPresent
.resources
-Random
suggestion container resources. In the above example you can see how to specifylimits
andrequests
. Currently, you can specify onlymemory
,cpu
andephemeral-storage
resource.Default values for the
requests
are:memory = 10Mi
.cpu = 50m
.ephemeral-storage = 500Mi
.
Default values for the
limits
are:memory = 100Mi
.cpu = 500m
.ephemeral-storage = 5Gi
.
serviceAccountName
-Random
suggestion container service account. In the above example,suggestion-serviceaccount
service account is used for each Experiment withrandom
algorithm, until you change or delete this service account from the Katib config.By default suggestion pod doesn’t have specific service account. In that case, Suggestion pod uses default service account.
Last modified 11.08.2020: Remove outdated banner for Katib docs (#2088) (5f29767a)