Skip to content

Commit

Permalink
bring back v1alpha3
Browse files Browse the repository at this point in the history
  • Loading branch information
sperlingxx committed Jul 28, 2020
1 parent 793f30e commit 6eeab98
Show file tree
Hide file tree
Showing 115 changed files with 9,414 additions and 5 deletions.
16 changes: 11 additions & 5 deletions hack/gen-python-sdk/gen_sdk.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,17 +21,23 @@ set -o pipefail
SWAGGER_JAR_URL="http://search.maven.org/maven2/io/swagger/swagger-codegen-cli/2.4.6/swagger-codegen-cli-2.4.6.jar"
SWAGGER_CODEGEN_JAR="hack/gen-python-sdk/swagger-codegen-cli.jar"
SWAGGER_CODEGEN_CONF="hack/gen-python-sdk/swagger_config.json"
SWAGGER_CODEGEN_FILE="pkg/apis/v1beta1/swagger.json"
TMP_CODEGEN_PATH="sdk/tmp"
SWAGGER_CODEGEN_FILE="pkg/apis/KATIB_VERSION/swagger.json"
TMP_CODEGEN_PATH="sdk/tmp/KATIB_VERSION"
SDK_OUTPUT_PATH="sdk/python"
POST_GEN_PYTHON_HANDLER="hack/gen-python-sdk/post_gen.py"
KATIB_VERSIONS=(v1alpha3 v1beta1)

echo "Downloading the swagger-codegen JAR package ..."
wget -O ${SWAGGER_CODEGEN_JAR} ${SWAGGER_JAR_URL}

echo "Generating Python SDK for Kubeflow Katib ..."
java -jar ${SWAGGER_CODEGEN_JAR} generate -i ${SWAGGER_CODEGEN_FILE} -l python -o ${TMP_CODEGEN_PATH} -c ${SWAGGER_CODEGEN_CONF} -v

python ${POST_GEN_PYTHON_HANDLER} ${TMP_CODEGEN_PATH} ${SDK_OUTPUT_PATH}
for VERSION in ${KATIB_VERSIONS[@]}; do
echo "Generating Python SDK for Kubeflow Katib ${VERSION} ..."
SWAGGER_FILE=${SWAGGER_CODEGEN_FILE/KATIB_VERSION/$VERSION}
TMP_PATH=${TMP_CODEGEN_PATH/KATIB_VERSION/$VERSION}
java -jar ${SWAGGER_CODEGEN_JAR} generate -i ${SWAGGER_FILE} -l python -o ${TMP_PATH} -c ${SWAGGER_CODEGEN_CONF} -v

python ${POST_GEN_PYTHON_HANDLER} ${TMP_PATH} ${SDK_OUTPUT_PATH}
done

rm ${SWAGGER_CODEGEN_JAR}
11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3AlgorithmSetting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3AlgorithmSetting

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**value** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions sdk/python/docs/V1alpha3AlgorithmSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# V1alpha3AlgorithmSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**algorithm_name** | **str** | | [optional]
**algorithm_settings** | [**list[V1alpha3AlgorithmSetting]**](V1alpha3AlgorithmSetting.md) | Key-value pairs representing settings for suggestion algorithms. | [optional]
**early_stopping** | [**V1alpha3EarlyStoppingSpec**](V1alpha3EarlyStoppingSpec.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3CollectorSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3CollectorSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**custom_collector** | [**V1Container**](V1Container.md) | When kind is \"customCollector\", this field will be used | [optional]
**kind** | **str** | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3EarlyStoppingSetting.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3EarlyStoppingSetting

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**value** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3EarlyStoppingSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3EarlyStoppingSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**early_stopping_algorithm_name** | **str** | | [optional]
**early_stopping_settings** | [**list[V1alpha3EarlyStoppingSetting]**](V1alpha3EarlyStoppingSetting.md) | |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions sdk/python/docs/V1alpha3Experiment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# V1alpha3Experiment

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional]
**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional]
**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional]
**spec** | [**V1alpha3ExperimentSpec**](V1alpha3ExperimentSpec.md) | | [optional]
**status** | [**V1alpha3ExperimentStatus**](V1alpha3ExperimentStatus.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


15 changes: 15 additions & 0 deletions sdk/python/docs/V1alpha3ExperimentCondition.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# V1alpha3ExperimentCondition

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**last_transition_time** | [**V1Time**](V1Time.md) | Last time the condition transitioned from one status to another. | [optional]
**last_update_time** | [**V1Time**](V1Time.md) | The last time this condition was updated. | [optional]
**message** | **str** | A human readable message indicating details about the transition. | [optional]
**reason** | **str** | The reason for the condition's last transition. | [optional]
**status** | **str** | Status of the condition, one of True, False, Unknown. |
**type** | **str** | Type of experiment condition. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions sdk/python/docs/V1alpha3ExperimentList.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# V1alpha3ExperimentList

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional]
**items** | [**list[V1alpha3Experiment]**](V1alpha3Experiment.md) | |
**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional]
**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


19 changes: 19 additions & 0 deletions sdk/python/docs/V1alpha3ExperimentSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# V1alpha3ExperimentSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**algorithm** | [**V1alpha3AlgorithmSpec**](V1alpha3AlgorithmSpec.md) | Describes the suggestion algorithm. | [optional]
**max_failed_trial_count** | **int** | Max failed trials to mark experiment as failed. | [optional]
**max_trial_count** | **int** | Max completed trials to mark experiment as succeeded | [optional]
**metrics_collector_spec** | [**V1alpha3MetricsCollectorSpec**](V1alpha3MetricsCollectorSpec.md) | For v1alpha3 we will keep the metrics collector implementation same as v1alpha1. | [optional]
**nas_config** | [**V1alpha3NasConfig**](V1alpha3NasConfig.md) | | [optional]
**objective** | [**V1alpha3ObjectiveSpec**](V1alpha3ObjectiveSpec.md) | Describes the objective of the experiment. | [optional]
**parallel_trial_count** | **int** | How many trials can be processed in parallel. Defaults to 3 | [optional]
**parameters** | [**list[V1alpha3ParameterSpec]**](V1alpha3ParameterSpec.md) | List of hyperparameter configurations. | [optional]
**resume_policy** | **str** | Describes resuming policy which usually take effect after experiment terminated. | [optional]
**trial_template** | [**V1alpha3TrialTemplate**](V1alpha3TrialTemplate.md) | Template for each run of the trial. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


25 changes: 25 additions & 0 deletions sdk/python/docs/V1alpha3ExperimentStatus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# V1alpha3ExperimentStatus

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**completion_time** | [**V1Time**](V1Time.md) | Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional]
**conditions** | [**list[V1alpha3ExperimentCondition]**](V1alpha3ExperimentCondition.md) | List of observed runtime conditions for this Experiment. | [optional]
**current_optimal_trial** | [**V1alpha3OptimalTrial**](V1alpha3OptimalTrial.md) | Current optimal trial parameters and observations. | [optional]
**failed_trial_list** | **list[str]** | List of trial names which have already failed. | [optional]
**killed_trial_list** | **list[str]** | List of trial names which have been killed. | [optional]
**last_reconcile_time** | [**V1Time**](V1Time.md) | Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional]
**pending_trial_list** | **list[str]** | List of trial names which are pending. | [optional]
**running_trial_list** | **list[str]** | List of trial names which are running. | [optional]
**start_time** | [**V1Time**](V1Time.md) | Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional]
**succeeded_trial_list** | **list[str]** | List of trial names which have already succeeded. | [optional]
**trials** | **int** | Trials is the total number of trials owned by the experiment. | [optional]
**trials_failed** | **int** | How many trials have failed. | [optional]
**trials_killed** | **int** | How many trials have been killed. | [optional]
**trials_pending** | **int** | How many trials are currently pending. | [optional]
**trials_running** | **int** | How many trials are currently running. | [optional]
**trials_succeeded** | **int** | How many trials have succeeded. | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions sdk/python/docs/V1alpha3FeasibleSpace.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# V1alpha3FeasibleSpace

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**list** | **list[str]** | | [optional]
**max** | **str** | | [optional]
**min** | **str** | | [optional]
**step** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3FileSystemPath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3FileSystemPath

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**kind** | **str** | | [optional]
**path** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions sdk/python/docs/V1alpha3FilterSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# V1alpha3FilterSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metrics_format** | **list[str]** | When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \"<metric_name>: <float>\" or else | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3GoTemplate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3GoTemplate

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**raw_template** | **str** | | [optional]
**template_spec** | [**V1alpha3TemplateSpec**](V1alpha3TemplateSpec.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions sdk/python/docs/V1alpha3GraphConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# V1alpha3GraphConfig

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**input_sizes** | **list[int]** | | [optional]
**num_layers** | **int** | | [optional]
**output_sizes** | **list[int]** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3Metric.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3Metric

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**value** | **float** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3MetricsCollectorSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3MetricsCollectorSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**collector** | [**V1alpha3CollectorSpec**](V1alpha3CollectorSpec.md) | | [optional]
**source** | [**V1alpha3SourceSpec**](V1alpha3SourceSpec.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3NasConfig.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3NasConfig

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**graph_config** | [**V1alpha3GraphConfig**](V1alpha3GraphConfig.md) | | [optional]
**operations** | [**list[V1alpha3Operation]**](V1alpha3Operation.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


13 changes: 13 additions & 0 deletions sdk/python/docs/V1alpha3ObjectiveSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# V1alpha3ObjectiveSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**additional_metric_names** | **list[str]** | This can be empty if we only care about the objective metric. Note: If we adopt a push instead of pull mechanism, this can be omitted completely. | [optional]
**goal** | **float** | | [optional]
**objective_metric_name** | **str** | | [optional]
**type** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


10 changes: 10 additions & 0 deletions sdk/python/docs/V1alpha3Observation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# V1alpha3Observation

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**metrics** | [**list[V1alpha3Metric]**](V1alpha3Metric.md) | Key-value pairs for metric names and values |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3Operation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3Operation

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**operation_type** | **str** | | [optional]
**parameters** | [**list[V1alpha3ParameterSpec]**](V1alpha3ParameterSpec.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions sdk/python/docs/V1alpha3OptimalTrial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# V1alpha3OptimalTrial

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**best_trial_name** | **str** | BestTrialName is the name of the best trial. |
**observation** | [**V1alpha3Observation**](V1alpha3Observation.md) | Observation for this trial | [optional]
**parameter_assignments** | [**list[V1alpha3ParameterAssignment]**](V1alpha3ParameterAssignment.md) | Key-value pairs for hyperparameters and assignment values. |

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


11 changes: 11 additions & 0 deletions sdk/python/docs/V1alpha3ParameterAssignment.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# V1alpha3ParameterAssignment

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
**value** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions sdk/python/docs/V1alpha3ParameterSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# V1alpha3ParameterSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**feasible_space** | [**V1alpha3FeasibleSpace**](V1alpha3FeasibleSpace.md) | | [optional]
**name** | **str** | | [optional]
**parameter_type** | **str** | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


12 changes: 12 additions & 0 deletions sdk/python/docs/V1alpha3SourceSpec.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# V1alpha3SourceSpec

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file_system_path** | [**V1alpha3FileSystemPath**](V1alpha3FileSystemPath.md) | During training model, metrics may be persisted into local file in source code, such as tfEvent use case | [optional]
**filter** | [**V1alpha3FilterSpec**](V1alpha3FilterSpec.md) | Default metric output format is {\"metric\": \"<metric_name>\", \"value\": <int_or_float>, \"epoch\": <int>, \"step\": <int>}, but if the output doesn't follow default format, please extend it here | [optional]
**http_get** | [**V1HTTPGetAction**](V1HTTPGetAction.md) | Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


14 changes: 14 additions & 0 deletions sdk/python/docs/V1alpha3Suggestion.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# V1alpha3Suggestion

## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional]
**kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional]
**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional]
**spec** | [**V1alpha3SuggestionSpec**](V1alpha3SuggestionSpec.md) | | [optional]
**status** | [**V1alpha3SuggestionStatus**](V1alpha3SuggestionStatus.md) | | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)


Loading

0 comments on commit 6eeab98

Please sign in to comment.