-
Notifications
You must be signed in to change notification settings - Fork 458
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added unit and e2e tests for optuna suggestion service update
Signed-off-by: Shashank Mittal <[email protected]>
- Loading branch information
1 parent
6b18e9b
commit 2c56864
Showing
4 changed files
with
177 additions
and
13 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,75 @@ | ||
--- | ||
apiVersion: kubeflow.org/v1beta1 | ||
kind: Experiment | ||
metadata: | ||
namespace: kubeflow | ||
name: optuna-distribution | ||
spec: | ||
objective: | ||
type: minimize | ||
goal: 0.05 | ||
objectiveMetricName: loss | ||
algorithm: | ||
algorithmName: tpe | ||
parallelTrialCount: 3 | ||
maxTrialCount: 12 | ||
maxFailedTrialCount: 3 | ||
parameters: | ||
- name: lr | ||
parameterType: double | ||
feasibleSpace: | ||
min: "1" | ||
max: "5" | ||
step: "0.1" | ||
distribution: uniform | ||
- name: momentum | ||
parameterType: double | ||
feasibleSpace: | ||
min: "0.001" | ||
max: "1" | ||
step: "0.1" | ||
distribution: uniform | ||
- name: epochs | ||
parameterType: int | ||
feasibleSpace: | ||
min: "1" | ||
max: "3" | ||
distribution: uniform | ||
- name: batch_size | ||
parameterType: int | ||
feasibleSpace: | ||
min: "32" | ||
max: "64" | ||
distribution: logUniform | ||
trialTemplate: | ||
primaryContainerName: training-container | ||
trialParameters: | ||
- name: learningRate | ||
description: Learning rate for the training model | ||
reference: lr | ||
- name: momentum | ||
description: Momentum for the training model | ||
reference: momentum | ||
- name: epochs | ||
description: Epochs | ||
reference: epochs | ||
- name: batchSize | ||
description: Batch Size | ||
reference: batch_size | ||
trialSpec: | ||
apiVersion: batch/v1 | ||
kind: Job | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: training-container | ||
image: docker.io/kubeflowkatib/pytorch-mnist-cpu:latest | ||
command: | ||
- "python3" | ||
- "/opt/pytorch-mnist/mnist.py" | ||
- "--epochs=${trialParameters.epochs}" | ||
- "--batch-size=${trialParameters.batchSize}" | ||
- "--lr=${trialParameters.learningRate}" | ||
- "--momentum=${trialParameters.momentum}" | ||
restartPolicy: Never |
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