-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(components): Add v1beta1 Katib launcher and samples (#4798)
* Add Katib v1beta1 launcher and 2 examples * Generate Notebook output * Modify README * Fix links * Fix comments in mpi-job example * Change Experiment spec structure to JsonObject * Remove generated file * Use component.yaml in MPI example * Use built-in Katib API client serialization * Update notebook example * Assign current status to None * Fix Copyright
- Loading branch information
1 parent
9acc440
commit 89e4210
Showing
13 changed files
with
1,021 additions
and
398 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,23 @@ | ||
# Copyright 2019 The Kubeflow Authors | ||
# Copyright 2020 The Kubeflow Authors. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
FROM ubuntu:16.04 | ||
|
||
RUN apt-get update -y && \ | ||
apt-get install --no-install-recommends -y -q ca-certificates python-dev python-setuptools wget && \ | ||
easy_install pip && \ | ||
pip install pyyaml==3.12 kubernetes | ||
FROM python:3.6 | ||
|
||
ADD build /ml | ||
ENV APP_HOME /app | ||
WORKDIR ${APP_HOME} | ||
|
||
ENTRYPOINT ["python", "/ml/launch_experiment.py"] | ||
ADD . ${APP_HOME} | ||
RUN pip install --no-cache-dir -r requirements.txt | ||
|
||
ENTRYPOINT ["python", "src/launch_experiment.py"] |
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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
approvers: | ||
- andreyvelich | ||
- gaocegege | ||
- hougangliu | ||
reviewers: | ||
- hougangliu | ||
- johnugeorge |
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 |
---|---|---|
@@ -1,38 +1,22 @@ | ||
name: Kubeflow - Launch Experiment | ||
description: Kubeflow Experiment launcher | ||
name: Katib - Launch Experiment | ||
description: Katib Experiment launcher | ||
inputs: | ||
- {name: Experiment Name, type: String, description: 'Experiment name.'} | ||
- {name: Experiment Namespace, type: String, default: kubeflow, description: 'Experiment namespace.'} | ||
- {name: Experiment Version, type: String, default: v1alpha3, description: 'Experiment version.'} | ||
- {name: Max Trial Count, type: Integer, description: 'How many trials can be executed at most.'} | ||
- {name: Max Failed Trial Count, type: Integer, default: 3, description: 'How many trials can fail at most.'} | ||
- {name: Parallel Trial Count, type: Integer, default: 3, description: 'How many trials can be running in parallel at most.'} | ||
- {name: Objective, type: JSON, description: 'Experiment objective.'} | ||
- {name: Algorithm, type: JSON, description: 'Experiment algorithm.'} | ||
- {name: Trial Template, type: JSON, description: 'Experiment trialTemplate.'} | ||
- {name: Parameters, type: JSON, description: 'Experiment Parameter configuration.'} | ||
- {name: Metrics Collector, type: JSON, default: '{}', description: 'Experiment metricsCollector.'} | ||
- {name: Experiment Timeout Minutes, type: Integer, default: 1440, description: 'Time in minutes to wait for the Experiment to complete.'} | ||
- {name: Delete Finished Experiment, type: Bool, default: 'True', description: 'Whether to delete the experiment after it is finished.'} | ||
- {name: Experiment Name, type: String, default: '', description: 'Experiment name'} | ||
- {name: Experiment Namespace, type: String, default: anonymous, description: 'Experiment namespace'} | ||
- {name: Experiment Spec, type: JsonObject, default: '{}', description: 'Experiment specification in dict format'} | ||
- {name: Experiment Timeout Minutes, type: Integer, default: 1440, description: 'Time in minutes to wait for the Experiment to complete'} | ||
- {name: Delete Finished Experiment, type: Bool, default: 'True', description: 'Whether to delete the Experiment after it is finished'} | ||
outputs: | ||
- {name: Best Parameter Set, type: JSON, description: 'The parameter set of the best Experiment trial.'} | ||
- {name: Best Parameter Set, type: JSON, description: 'The hyperparameter set of the best Experiment Trial'} | ||
implementation: | ||
container: | ||
image: liuhougangxa/katib-experiment-launcher:latest | ||
command: [python, /ml/launch_experiment.py] | ||
image: docker.io/kubeflowkatib/kubeflow-pipelines-launcher | ||
command: [python, src/launch_experiment.py] | ||
args: [ | ||
--name, {inputValue: Experiment Name}, | ||
--namespace, {inputValue: Experiment Namespace}, | ||
--version, {inputValue: Experiment Version}, | ||
--maxTrialCount, {inputValue: Max Trial Count}, | ||
--maxFailedTrialCount, {inputValue: Max Failed Trial Count}, | ||
--parallelTrialCount, {inputValue: Parallel Trial Count}, | ||
--objectiveConfig, {inputValue: Objective}, | ||
--algorithmConfig, {inputValue: Algorithm}, | ||
--trialTemplate, {inputValue: Trial Template}, | ||
--parameters, {inputValue: Parameters}, | ||
--metricsCollector, {inputValue: Metrics Collector}, | ||
--experimentTimeoutMinutes, {inputValue: Experiment Timeout Minutes}, | ||
--deleteAfterDone, {inputValue: Delete Finished Experiment}, | ||
--outputFile, {outputPath: Best Parameter Set}, | ||
--experiment-name, {inputValue: Experiment Name}, | ||
--experiment-namespace, {inputValue: Experiment Namespace}, | ||
--experiment-spec, {inputValue: Experiment Spec}, | ||
--experiment-timeout-minutes, {inputValue: Experiment Timeout Minutes}, | ||
--delete-after-done, {inputValue: Delete Finished Experiment}, | ||
--output-file, {outputPath: Best Parameter Set}, | ||
] |
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,2 @@ | ||
kubernetes==10.0.1 | ||
kubeflow-katib==0.10.1 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.