-
Notifications
You must be signed in to change notification settings - Fork 882
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend Katib GH action to also create an experiment and assert it suc…
…ceeds (#2249) * Extend Katib GH action to also create an experiment and assert it succeeds. (#2248) * Rearrange folders for KF objects in tests.
- Loading branch information
1 parent
f1c6575
commit 847faeb
Showing
2 changed files
with
84 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
--- | ||
apiVersion: kubeflow.org/v1beta1 | ||
kind: Experiment | ||
metadata: | ||
name: grid-example | ||
namespace: kubeflow-user | ||
spec: | ||
parameters: | ||
- name: lr | ||
parameterType: double | ||
feasibleSpace: | ||
max: '0.01' | ||
min: '0.001' | ||
step: '0.001' | ||
- name: num-layers | ||
parameterType: int | ||
feasibleSpace: | ||
max: '3' | ||
min: '2' | ||
- name: optimizer | ||
parameterType: categorical | ||
feasibleSpace: | ||
list: | ||
- adam | ||
objective: | ||
type: maximize | ||
goal: 0.80 | ||
objectiveMetricName: Validation-accuracy | ||
additionalMetricNames: | ||
- Train-accuracy | ||
metricStrategies: | ||
- name: Validation-accuracy | ||
value: max | ||
- name: Train-accuracy | ||
value: max | ||
algorithm: | ||
algorithmName: grid | ||
trialTemplate: | ||
trialSpec: | ||
apiVersion: batch/v1 | ||
kind: Job | ||
spec: | ||
template: | ||
metadata: | ||
labels: | ||
sidecar.istio.io/inject: 'false' | ||
spec: | ||
containers: | ||
- command: | ||
- python3 | ||
- /opt/mxnet-mnist/mnist.py | ||
- '--batch-size=64' | ||
- '--lr=${trialParameters.learningRate}' | ||
- '--num-layers=${trialParameters.numberLayers}' | ||
- '--optimizer=${trialParameters.optimizer}' | ||
image: docker.io/kubeflowkatib/mxnet-mnist:latest | ||
name: training-container | ||
restartPolicy: Never | ||
trialParameters: | ||
- name: learningRate | ||
description: Learning rate for the training model | ||
reference: lr | ||
- name: numberLayers | ||
description: Number of training model layers | ||
reference: num-layers | ||
- name: optimizer | ||
description: Training model optimizer (sdg, adam or ftrl) | ||
reference: optimizer | ||
primaryContainerName: training-container | ||
successCondition: status.conditions.#(type=="Complete")#|#(status=="True")# | ||
failureCondition: status.conditions.#(type=="Failed")#|#(status=="True")# | ||
parallelTrialCount: 1 | ||
maxTrialCount: 1 | ||
maxFailedTrialCount: 1 | ||
metricsCollectorSpec: | ||
collector: | ||
kind: StdOut | ||
resumePolicy: LongRunning |