diff --git a/hack/gen-python-sdk/gen_sdk.sh b/hack/gen-python-sdk/gen_sdk.sh new file mode 100755 index 00000000000..a48eb34fb9d --- /dev/null +++ b/hack/gen-python-sdk/gen_sdk.sh @@ -0,0 +1,43 @@ +#!/usr/bin/env bash + +# Copyright 2019 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 +# +# 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. + +set -o errexit +set -o nounset +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/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} + + +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}/${VERSION} +done + +rm ${SWAGGER_CODEGEN_JAR} diff --git a/hack/gen-python-sdk/post_gen.py b/hack/gen-python-sdk/post_gen.py new file mode 100644 index 00000000000..9b61f8afb03 --- /dev/null +++ b/hack/gen-python-sdk/post_gen.py @@ -0,0 +1,95 @@ +import os +import shutil +import sys + + +def _rewrite_helper(input_file, output_file, rewrite_rules): + rules = rewrite_rules or [] + lines = [] + with open(input_file, 'r') as f: + while True: + line = f.readline() + if not line: + break + for rule in rules: + line = rule(line) + lines.append(line) + with open(output_file, 'w') as f: + f.writelines(lines) + + +def update_python_sdk(src, dest, versions=('v1alpha3', 'v1beta1')): + # tiny transformers to refine generated codes + rewrite_rules = [ + lambda l: l.replace('import katib', 'import kubeflow.katib'), + lambda l: l.replace('from katib', 'from kubeflow.katib'), + ] + + src_dirs = [ + os.path.join(src, 'katib'), + os.path.join(src, 'katib', 'models'), + os.path.join(src, 'test'), + os.path.join(src, 'docs') + ] + dest_dirs = [ + os.path.join(dest, 'kubeflow', 'katib'), + os.path.join(dest, 'kubeflow', 'katib', 'models'), + os.path.join(dest, 'test'), + os.path.join(dest, 'docs') + ] + + for src_dir, dest_dir in zip(src_dirs, dest_dirs): + # remove previous generated files explicitly, in case of deprecated instances + for file in os.listdir(dest_dir): + path = os.path.join(dest_dir, file) + if not os.path.isfile(path): + continue + for v in versions: + if v in file.lower(): + os.remove(path) + break + # fill latest generated files + for file in os.listdir(src_dir): + in_file = os.path.join(src_dir, file) + out_file = os.path.join(dest_dir, file) + if not os.path.isfile(in_file): + continue + _rewrite_helper(in_file, out_file, rewrite_rules) + + # update doc for API Endpoints and Models README.md + buffer = [] + update_buffer = [] + with open(os.path.join(src, 'README.md'), 'r') as src_f: + anchor = 0 + for line in src_f.readlines(): + if line.startswith('## Documentation For Models'): + if anchor == 0: + anchor = 1 + elif line.startswith('##') and anchor == 1: + anchor = 2 + if anchor == 0: + continue + if anchor == 2: + break + update_buffer.append(line) + with open(os.path.join(dest, 'README.md'), 'r') as dest_f: + anchor = 0 + for line in dest_f.readlines(): + if line.startswith('## Documentation For Models'): + if anchor == 0: + buffer.extend(update_buffer) + anchor = 1 + elif line.startswith('##') and anchor == 1: + anchor = 2 + if anchor == 1: + continue + buffer.append(line) + with open(os.path.join(dest, 'README.md'), 'w') as dest_f: + dest_f.writelines(buffer) + + # clear working dictionary + shutil.rmtree(src) + + +if __name__ == '__main__': + update_python_sdk(src=sys.argv[1], dest=sys.argv[2]) diff --git a/hack/gen-python-sdk/swagger_config.json b/hack/gen-python-sdk/swagger_config.json new file mode 100644 index 00000000000..6c77ced6eb9 --- /dev/null +++ b/hack/gen-python-sdk/swagger_config.json @@ -0,0 +1,11 @@ +{ + "packageName" : "katib", + "projectName" : "katib", + "packageVersion": "0.1", + "importMappings": { + "V1Container": "from kubernetes.client import V1Container", + "V1ListMeta": "from kubernetes.client import V1ListMeta", + "V1ObjectMeta": "from kubernetes.client import V1ObjectMeta", + "V1HTTPGetAction": "from kubernetes.client import V1HTTPGetAction" + } +} diff --git a/sdk/python/README.md b/sdk/python/v1alpha3/README.md similarity index 99% rename from sdk/python/README.md rename to sdk/python/v1alpha3/README.md index 5cb13412c4d..a81b3aa5396 100644 --- a/sdk/python/README.md +++ b/sdk/python/v1alpha3/README.md @@ -11,7 +11,7 @@ Python 2.7 and 3.4+ ### pip install ```sh -pip install kubeflow-katib +pip install kubeflow-katib==0.0.2 ``` Then import package: diff --git a/sdk/python/docs/KatibClient.md b/sdk/python/v1alpha3/docs/KatibClient.md similarity index 100% rename from sdk/python/docs/KatibClient.md rename to sdk/python/v1alpha3/docs/KatibClient.md diff --git a/sdk/python/v1alpha3/docs/V1Time.md b/sdk/python/v1alpha3/docs/V1Time.md new file mode 100644 index 00000000000..1bc6a022af6 --- /dev/null +++ b/sdk/python/v1alpha3/docs/V1Time.md @@ -0,0 +1,7 @@ +# V1Time + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1alpha3/docs/V1UnstructuredUnstructured.md b/sdk/python/v1alpha3/docs/V1UnstructuredUnstructured.md new file mode 100644 index 00000000000..f02db67f502 --- /dev/null +++ b/sdk/python/v1alpha3/docs/V1UnstructuredUnstructured.md @@ -0,0 +1,7 @@ +# V1UnstructuredUnstructured + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/docs/V1alpha3AlgorithmSetting.md b/sdk/python/v1alpha3/docs/V1alpha3AlgorithmSetting.md similarity index 100% rename from sdk/python/docs/V1alpha3AlgorithmSetting.md rename to sdk/python/v1alpha3/docs/V1alpha3AlgorithmSetting.md diff --git a/sdk/python/docs/V1alpha3AlgorithmSpec.md b/sdk/python/v1alpha3/docs/V1alpha3AlgorithmSpec.md similarity index 92% rename from sdk/python/docs/V1alpha3AlgorithmSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3AlgorithmSpec.md index 6373bc4e0a7..954b05cd4fa 100644 --- a/sdk/python/docs/V1alpha3AlgorithmSpec.md +++ b/sdk/python/v1alpha3/docs/V1alpha3AlgorithmSpec.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **algorithm_name** | **str** | | [optional] -**algorithm_settings** | [**list[V1alpha3AlgorithmSetting]**](V1alpha3AlgorithmSetting.md) | Key-value pairs representing settings for suggestion algorithms. | +**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) diff --git a/sdk/python/docs/V1alpha3CollectorSpec.md b/sdk/python/v1alpha3/docs/V1alpha3CollectorSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3CollectorSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3CollectorSpec.md diff --git a/sdk/python/docs/V1alpha3EarlyStoppingSetting.md b/sdk/python/v1alpha3/docs/V1alpha3EarlyStoppingSetting.md similarity index 100% rename from sdk/python/docs/V1alpha3EarlyStoppingSetting.md rename to sdk/python/v1alpha3/docs/V1alpha3EarlyStoppingSetting.md diff --git a/sdk/python/docs/V1alpha3EarlyStoppingSpec.md b/sdk/python/v1alpha3/docs/V1alpha3EarlyStoppingSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3EarlyStoppingSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3EarlyStoppingSpec.md diff --git a/sdk/python/docs/V1alpha3Experiment.md b/sdk/python/v1alpha3/docs/V1alpha3Experiment.md similarity index 100% rename from sdk/python/docs/V1alpha3Experiment.md rename to sdk/python/v1alpha3/docs/V1alpha3Experiment.md diff --git a/sdk/python/docs/V1alpha3ExperimentCondition.md b/sdk/python/v1alpha3/docs/V1alpha3ExperimentCondition.md similarity index 100% rename from sdk/python/docs/V1alpha3ExperimentCondition.md rename to sdk/python/v1alpha3/docs/V1alpha3ExperimentCondition.md diff --git a/sdk/python/docs/V1alpha3ExperimentList.md b/sdk/python/v1alpha3/docs/V1alpha3ExperimentList.md similarity index 100% rename from sdk/python/docs/V1alpha3ExperimentList.md rename to sdk/python/v1alpha3/docs/V1alpha3ExperimentList.md diff --git a/sdk/python/docs/V1alpha3ExperimentSpec.md b/sdk/python/v1alpha3/docs/V1alpha3ExperimentSpec.md similarity index 91% rename from sdk/python/docs/V1alpha3ExperimentSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3ExperimentSpec.md index 891033cb78c..d6f6b66f809 100644 --- a/sdk/python/docs/V1alpha3ExperimentSpec.md +++ b/sdk/python/v1alpha3/docs/V1alpha3ExperimentSpec.md @@ -11,6 +11,7 @@ Name | Type | Description | Notes **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) diff --git a/sdk/python/docs/V1alpha3ExperimentStatus.md b/sdk/python/v1alpha3/docs/V1alpha3ExperimentStatus.md similarity index 100% rename from sdk/python/docs/V1alpha3ExperimentStatus.md rename to sdk/python/v1alpha3/docs/V1alpha3ExperimentStatus.md diff --git a/sdk/python/docs/V1alpha3FeasibleSpace.md b/sdk/python/v1alpha3/docs/V1alpha3FeasibleSpace.md similarity index 100% rename from sdk/python/docs/V1alpha3FeasibleSpace.md rename to sdk/python/v1alpha3/docs/V1alpha3FeasibleSpace.md diff --git a/sdk/python/docs/V1alpha3FileSystemPath.md b/sdk/python/v1alpha3/docs/V1alpha3FileSystemPath.md similarity index 100% rename from sdk/python/docs/V1alpha3FileSystemPath.md rename to sdk/python/v1alpha3/docs/V1alpha3FileSystemPath.md diff --git a/sdk/python/docs/V1alpha3FilterSpec.md b/sdk/python/v1alpha3/docs/V1alpha3FilterSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3FilterSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3FilterSpec.md diff --git a/sdk/python/docs/V1alpha3GoTemplate.md b/sdk/python/v1alpha3/docs/V1alpha3GoTemplate.md similarity index 100% rename from sdk/python/docs/V1alpha3GoTemplate.md rename to sdk/python/v1alpha3/docs/V1alpha3GoTemplate.md diff --git a/sdk/python/docs/V1alpha3GraphConfig.md b/sdk/python/v1alpha3/docs/V1alpha3GraphConfig.md similarity index 100% rename from sdk/python/docs/V1alpha3GraphConfig.md rename to sdk/python/v1alpha3/docs/V1alpha3GraphConfig.md diff --git a/sdk/python/docs/V1alpha3Metric.md b/sdk/python/v1alpha3/docs/V1alpha3Metric.md similarity index 100% rename from sdk/python/docs/V1alpha3Metric.md rename to sdk/python/v1alpha3/docs/V1alpha3Metric.md diff --git a/sdk/python/docs/V1alpha3MetricsCollectorSpec.md b/sdk/python/v1alpha3/docs/V1alpha3MetricsCollectorSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3MetricsCollectorSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3MetricsCollectorSpec.md diff --git a/sdk/python/docs/V1alpha3NasConfig.md b/sdk/python/v1alpha3/docs/V1alpha3NasConfig.md similarity index 100% rename from sdk/python/docs/V1alpha3NasConfig.md rename to sdk/python/v1alpha3/docs/V1alpha3NasConfig.md diff --git a/sdk/python/docs/V1alpha3ObjectiveSpec.md b/sdk/python/v1alpha3/docs/V1alpha3ObjectiveSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3ObjectiveSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3ObjectiveSpec.md diff --git a/sdk/python/docs/V1alpha3Observation.md b/sdk/python/v1alpha3/docs/V1alpha3Observation.md similarity index 100% rename from sdk/python/docs/V1alpha3Observation.md rename to sdk/python/v1alpha3/docs/V1alpha3Observation.md diff --git a/sdk/python/docs/V1alpha3Operation.md b/sdk/python/v1alpha3/docs/V1alpha3Operation.md similarity index 100% rename from sdk/python/docs/V1alpha3Operation.md rename to sdk/python/v1alpha3/docs/V1alpha3Operation.md diff --git a/sdk/python/docs/V1alpha3OptimalTrial.md b/sdk/python/v1alpha3/docs/V1alpha3OptimalTrial.md similarity index 100% rename from sdk/python/docs/V1alpha3OptimalTrial.md rename to sdk/python/v1alpha3/docs/V1alpha3OptimalTrial.md diff --git a/sdk/python/docs/V1alpha3ParameterAssignment.md b/sdk/python/v1alpha3/docs/V1alpha3ParameterAssignment.md similarity index 100% rename from sdk/python/docs/V1alpha3ParameterAssignment.md rename to sdk/python/v1alpha3/docs/V1alpha3ParameterAssignment.md diff --git a/sdk/python/docs/V1alpha3ParameterSpec.md b/sdk/python/v1alpha3/docs/V1alpha3ParameterSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3ParameterSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3ParameterSpec.md diff --git a/sdk/python/docs/V1alpha3SourceSpec.md b/sdk/python/v1alpha3/docs/V1alpha3SourceSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3SourceSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3SourceSpec.md diff --git a/sdk/python/docs/V1alpha3Suggestion.md b/sdk/python/v1alpha3/docs/V1alpha3Suggestion.md similarity index 100% rename from sdk/python/docs/V1alpha3Suggestion.md rename to sdk/python/v1alpha3/docs/V1alpha3Suggestion.md diff --git a/sdk/python/docs/V1alpha3SuggestionCondition.md b/sdk/python/v1alpha3/docs/V1alpha3SuggestionCondition.md similarity index 100% rename from sdk/python/docs/V1alpha3SuggestionCondition.md rename to sdk/python/v1alpha3/docs/V1alpha3SuggestionCondition.md diff --git a/sdk/python/docs/V1alpha3SuggestionList.md b/sdk/python/v1alpha3/docs/V1alpha3SuggestionList.md similarity index 100% rename from sdk/python/docs/V1alpha3SuggestionList.md rename to sdk/python/v1alpha3/docs/V1alpha3SuggestionList.md diff --git a/sdk/python/docs/V1alpha3SuggestionSpec.md b/sdk/python/v1alpha3/docs/V1alpha3SuggestionSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3SuggestionSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3SuggestionSpec.md diff --git a/sdk/python/docs/V1alpha3SuggestionStatus.md b/sdk/python/v1alpha3/docs/V1alpha3SuggestionStatus.md similarity index 100% rename from sdk/python/docs/V1alpha3SuggestionStatus.md rename to sdk/python/v1alpha3/docs/V1alpha3SuggestionStatus.md diff --git a/sdk/python/docs/V1alpha3TemplateSpec.md b/sdk/python/v1alpha3/docs/V1alpha3TemplateSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3TemplateSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3TemplateSpec.md diff --git a/sdk/python/docs/V1alpha3Trial.md b/sdk/python/v1alpha3/docs/V1alpha3Trial.md similarity index 100% rename from sdk/python/docs/V1alpha3Trial.md rename to sdk/python/v1alpha3/docs/V1alpha3Trial.md diff --git a/sdk/python/docs/V1alpha3TrialAssignment.md b/sdk/python/v1alpha3/docs/V1alpha3TrialAssignment.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialAssignment.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialAssignment.md diff --git a/sdk/python/docs/V1alpha3TrialCondition.md b/sdk/python/v1alpha3/docs/V1alpha3TrialCondition.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialCondition.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialCondition.md diff --git a/sdk/python/docs/V1alpha3TrialList.md b/sdk/python/v1alpha3/docs/V1alpha3TrialList.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialList.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialList.md diff --git a/sdk/python/docs/V1alpha3TrialSpec.md b/sdk/python/v1alpha3/docs/V1alpha3TrialSpec.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialSpec.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialSpec.md diff --git a/sdk/python/docs/V1alpha3TrialStatus.md b/sdk/python/v1alpha3/docs/V1alpha3TrialStatus.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialStatus.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialStatus.md diff --git a/sdk/python/docs/V1alpha3TrialTemplate.md b/sdk/python/v1alpha3/docs/V1alpha3TrialTemplate.md similarity index 100% rename from sdk/python/docs/V1alpha3TrialTemplate.md rename to sdk/python/v1alpha3/docs/V1alpha3TrialTemplate.md diff --git a/sdk/python/examples/bayesianoptimization-katib-sdk.ipynb b/sdk/python/v1alpha3/examples/bayesianoptimization-katib-sdk.ipynb similarity index 100% rename from sdk/python/examples/bayesianoptimization-katib-sdk.ipynb rename to sdk/python/v1alpha3/examples/bayesianoptimization-katib-sdk.ipynb diff --git a/sdk/python/examples/tfjob-katib-sdk.ipynb b/sdk/python/v1alpha3/examples/tfjob-katib-sdk.ipynb similarity index 99% rename from sdk/python/examples/tfjob-katib-sdk.ipynb rename to sdk/python/v1alpha3/examples/tfjob-katib-sdk.ipynb index 59de461e9f2..07680200d71 100644 --- a/sdk/python/examples/tfjob-katib-sdk.ipynb +++ b/sdk/python/v1alpha3/examples/tfjob-katib-sdk.ipynb @@ -157,7 +157,7 @@ ] }, "metadata": {}, - "output_type": "display_data" + "output_type": "execute_result" }, { "data": { diff --git a/sdk/python/kubeflow/__init__.py b/sdk/python/v1alpha3/kubeflow/__init__.py similarity index 100% rename from sdk/python/kubeflow/__init__.py rename to sdk/python/v1alpha3/kubeflow/__init__.py diff --git a/sdk/python/kubeflow/katib/__init__.py b/sdk/python/v1alpha3/kubeflow/katib/__init__.py similarity index 89% rename from sdk/python/kubeflow/katib/__init__.py rename to sdk/python/v1alpha3/kubeflow/katib/__init__.py index 6dbeea329be..27a98826008 100644 --- a/sdk/python/kubeflow/katib/__init__.py +++ b/sdk/python/v1alpha3/kubeflow/katib/__init__.py @@ -3,31 +3,23 @@ # flake8: noqa """ - katib + Katib - swagger description for katib # noqa: E501 - - OpenAPI spec version: v0.1 + Swagger description for Katib # noqa: E501 + OpenAPI spec version: v1alpha3-0.1 + Generated by: https://github.com/swagger-api/swagger-codegen.git """ from __future__ import absolute_import -# import utils and constants -from kubeflow.katib.utils import utils -from kubeflow.katib.constants import constants +# import apis into sdk package # import ApiClient from kubeflow.katib.api_client import ApiClient from kubeflow.katib.configuration import Configuration -from kubeflow.katib.api.katib_client import KatibClient - -# import ApiClient -from kubeflow.katib.api_client import ApiClient -from kubeflow.katib.configuration import Configuration - # import models into sdk package from kubeflow.katib.models.v1alpha3_algorithm_setting import V1alpha3AlgorithmSetting from kubeflow.katib.models.v1alpha3_algorithm_spec import V1alpha3AlgorithmSpec @@ -67,4 +59,3 @@ from kubeflow.katib.models.v1alpha3_trial_spec import V1alpha3TrialSpec from kubeflow.katib.models.v1alpha3_trial_status import V1alpha3TrialStatus from kubeflow.katib.models.v1alpha3_trial_template import V1alpha3TrialTemplate - diff --git a/sdk/python/kubeflow/katib/api/__init__.py b/sdk/python/v1alpha3/kubeflow/katib/api/__init__.py similarity index 100% rename from sdk/python/kubeflow/katib/api/__init__.py rename to sdk/python/v1alpha3/kubeflow/katib/api/__init__.py diff --git a/sdk/python/kubeflow/katib/api/katib_client.py b/sdk/python/v1alpha3/kubeflow/katib/api/katib_client.py similarity index 100% rename from sdk/python/kubeflow/katib/api/katib_client.py rename to sdk/python/v1alpha3/kubeflow/katib/api/katib_client.py diff --git a/sdk/python/v1alpha3/kubeflow/katib/api_client.py b/sdk/python/v1alpha3/kubeflow/katib/api_client.py new file mode 100644 index 00000000000..1e7d8174872 --- /dev/null +++ b/sdk/python/v1alpha3/kubeflow/katib/api_client.py @@ -0,0 +1,638 @@ +# coding: utf-8 +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1alpha3-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + +from __future__ import absolute_import + +import datetime +import json +import mimetypes +from multiprocessing.pool import ThreadPool +import os +import re +import tempfile + +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import quote + +from kubeflow.katib.configuration import Configuration +import kubeflow.katib.models +from kubeflow.katib import rest + + +class ApiClient(object): + """Generic API client for Swagger client library builds. + + Swagger generic API client. This client handles the client- + server communication, and is invariant across implementations. Specifics of + the methods and models for each application are generated from the Swagger + templates. + + NOTE: This class is auto generated by the swagger code generator program. + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + + :param configuration: .Configuration object for this client + :param header_name: a header to pass when making calls to the API. + :param header_value: a header value to pass when making calls to + the API. + :param cookie: a cookie to include in the header when making calls + to the API + """ + + PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types + NATIVE_TYPES_MAPPING = { + 'int': int, + 'long': int if six.PY3 else long, # noqa: F821 + 'float': float, + 'str': str, + 'bool': bool, + 'date': datetime.date, + 'datetime': datetime.datetime, + 'object': object, + } + + def __init__(self, configuration=None, header_name=None, header_value=None, + cookie=None): + if configuration is None: + configuration = Configuration() + self.configuration = configuration + + # Use the pool property to lazily initialize the ThreadPool. + self._pool = None + self.rest_client = rest.RESTClientObject(configuration) + self.default_headers = {} + if header_name is not None: + self.default_headers[header_name] = header_value + self.cookie = cookie + # Set default User-Agent. + self.user_agent = 'Swagger-Codegen/0.1/python' + + def __del__(self): + if self._pool is not None: + self._pool.close() + self._pool.join() + + @property + def pool(self): + if self._pool is None: + self._pool = ThreadPool() + return self._pool + + @property + def user_agent(self): + """User agent for this API client""" + return self.default_headers['User-Agent'] + + @user_agent.setter + def user_agent(self, value): + self.default_headers['User-Agent'] = value + + def set_default_header(self, header_name, header_value): + self.default_headers[header_name] = header_value + + def __call_api( + self, resource_path, method, path_params=None, + query_params=None, header_params=None, body=None, post_params=None, + files=None, response_type=None, auth_settings=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + + config = self.configuration + + # header parameters + header_params = header_params or {} + header_params.update(self.default_headers) + if self.cookie: + header_params['Cookie'] = self.cookie + if header_params: + header_params = self.sanitize_for_serialization(header_params) + header_params = dict(self.parameters_to_tuples(header_params, + collection_formats)) + + # path parameters + if path_params: + path_params = self.sanitize_for_serialization(path_params) + path_params = self.parameters_to_tuples(path_params, + collection_formats) + for k, v in path_params: + # specified safe chars, encode everything + resource_path = resource_path.replace( + '{%s}' % k, + quote(str(v), safe=config.safe_chars_for_path_param) + ) + + # query parameters + if query_params: + query_params = self.sanitize_for_serialization(query_params) + query_params = self.parameters_to_tuples(query_params, + collection_formats) + + # post parameters + if post_params or files: + post_params = self.prepare_post_parameters(post_params, files) + post_params = self.sanitize_for_serialization(post_params) + post_params = self.parameters_to_tuples(post_params, + collection_formats) + + # auth setting + self.update_params_for_auth(header_params, query_params, auth_settings) + + # body + if body: + body = self.sanitize_for_serialization(body) + + # request url + url = self.configuration.host + resource_path + + # perform request and return response + response_data = self.request( + method, url, query_params=query_params, headers=header_params, + post_params=post_params, body=body, + _preload_content=_preload_content, + _request_timeout=_request_timeout) + + self.last_response = response_data + + return_data = response_data + if _preload_content: + # deserialize response data + if response_type: + return_data = self.deserialize(response_data, response_type) + else: + return_data = None + + if _return_http_data_only: + return (return_data) + else: + return (return_data, response_data.status, + response_data.getheaders()) + + def sanitize_for_serialization(self, obj): + """Builds a JSON POST object. + + If obj is None, return None. + If obj is str, int, long, float, bool, return directly. + If obj is datetime.datetime, datetime.date + convert to string in iso8601 format. + If obj is list, sanitize each element in the list. + If obj is dict, return the dict. + If obj is swagger model, return the properties dict. + + :param obj: The data to serialize. + :return: The serialized form of data. + """ + if obj is None: + return None + elif isinstance(obj, self.PRIMITIVE_TYPES): + return obj + elif isinstance(obj, list): + return [self.sanitize_for_serialization(sub_obj) + for sub_obj in obj] + elif isinstance(obj, tuple): + return tuple(self.sanitize_for_serialization(sub_obj) + for sub_obj in obj) + elif isinstance(obj, (datetime.datetime, datetime.date)): + return obj.isoformat() + + if isinstance(obj, dict): + obj_dict = obj + else: + # Convert model obj to dict except + # attributes `swagger_types`, `attribute_map` + # and attributes which value is not None. + # Convert attribute name to json key in + # model definition for request. + obj_dict = {obj.attribute_map[attr]: getattr(obj, attr) + for attr, _ in six.iteritems(obj.swagger_types) + if getattr(obj, attr) is not None} + + return {key: self.sanitize_for_serialization(val) + for key, val in six.iteritems(obj_dict)} + + def deserialize(self, response, response_type): + """Deserializes response into an object. + + :param response: RESTResponse object to be deserialized. + :param response_type: class literal for + deserialized object, or string of class name. + + :return: deserialized object. + """ + # handle file downloading + # save response body into a tmp file and return the instance + if response_type == "file": + return self.__deserialize_file(response) + + # fetch data from response object + try: + data = json.loads(response.data) + except ValueError: + data = response.data + + return self.__deserialize(data, response_type) + + def __deserialize(self, data, klass): + """Deserializes dict, list, str into an object. + + :param data: dict, list or str. + :param klass: class literal, or string of class name. + + :return: object. + """ + if data is None: + return None + + if type(klass) == str: + if klass.startswith('list['): + sub_kls = re.match(r'list\[(.*)\]', klass).group(1) + return [self.__deserialize(sub_data, sub_kls) + for sub_data in data] + + if klass.startswith('dict('): + sub_kls = re.match(r'dict\(([^,]*), (.*)\)', klass).group(2) + return {k: self.__deserialize(v, sub_kls) + for k, v in six.iteritems(data)} + + # convert str to class + if klass in self.NATIVE_TYPES_MAPPING: + klass = self.NATIVE_TYPES_MAPPING[klass] + else: + klass = getattr(katib.models, klass) + + if klass in self.PRIMITIVE_TYPES: + return self.__deserialize_primitive(data, klass) + elif klass == object: + return self.__deserialize_object(data) + elif klass == datetime.date: + return self.__deserialize_date(data) + elif klass == datetime.datetime: + return self.__deserialize_datatime(data) + else: + return self.__deserialize_model(data, klass) + + def call_api(self, resource_path, method, + path_params=None, query_params=None, header_params=None, + body=None, post_params=None, files=None, + response_type=None, auth_settings=None, async_req=None, + _return_http_data_only=None, collection_formats=None, + _preload_content=True, _request_timeout=None): + """Makes the HTTP request (synchronous) and returns deserialized data. + + To make an async request, set the async_req parameter. + + :param resource_path: Path to method endpoint. + :param method: Method to call. + :param path_params: Path parameters in the url. + :param query_params: Query parameters in the url. + :param header_params: Header parameters to be + placed in the request header. + :param body: Request body. + :param post_params dict: Request post form parameters, + for `application/x-www-form-urlencoded`, `multipart/form-data`. + :param auth_settings list: Auth Settings names for the request. + :param response: Response data type. + :param files dict: key -> filename, value -> filepath, + for `multipart/form-data`. + :param async_req bool: execute request asynchronously + :param _return_http_data_only: response data without head status code + and headers + :param collection_formats: dict of collection formats for path, query, + header, and post parameters. + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :return: + If async_req parameter is True, + the request will be called asynchronously. + The method will return the request thread. + If parameter async_req is False or missing, + then the method will return the response directly. + """ + if not async_req: + return self.__call_api(resource_path, method, + path_params, query_params, header_params, + body, post_params, files, + response_type, auth_settings, + _return_http_data_only, collection_formats, + _preload_content, _request_timeout) + else: + thread = self.pool.apply_async(self.__call_api, (resource_path, + method, path_params, query_params, + header_params, body, + post_params, files, + response_type, auth_settings, + _return_http_data_only, + collection_formats, + _preload_content, _request_timeout)) + return thread + + def request(self, method, url, query_params=None, headers=None, + post_params=None, body=None, _preload_content=True, + _request_timeout=None): + """Makes the HTTP request using RESTClient.""" + if method == "GET": + return self.rest_client.GET(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "HEAD": + return self.rest_client.HEAD(url, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + headers=headers) + elif method == "OPTIONS": + return self.rest_client.OPTIONS(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "POST": + return self.rest_client.POST(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PUT": + return self.rest_client.PUT(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "PATCH": + return self.rest_client.PATCH(url, + query_params=query_params, + headers=headers, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + elif method == "DELETE": + return self.rest_client.DELETE(url, + query_params=query_params, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + else: + raise ValueError( + "http method must be `GET`, `HEAD`, `OPTIONS`," + " `POST`, `PATCH`, `PUT` or `DELETE`." + ) + + def parameters_to_tuples(self, params, collection_formats): + """Get parameters as list of tuples, formatting collections. + + :param params: Parameters as dict or list of two-tuples + :param dict collection_formats: Parameter collection formats + :return: Parameters as list of tuples, collections formatted + """ + new_params = [] + if collection_formats is None: + collection_formats = {} + for k, v in six.iteritems(params) if isinstance(params, dict) else params: # noqa: E501 + if k in collection_formats: + collection_format = collection_formats[k] + if collection_format == 'multi': + new_params.extend((k, value) for value in v) + else: + if collection_format == 'ssv': + delimiter = ' ' + elif collection_format == 'tsv': + delimiter = '\t' + elif collection_format == 'pipes': + delimiter = '|' + else: # csv is the default + delimiter = ',' + new_params.append( + (k, delimiter.join(str(value) for value in v))) + else: + new_params.append((k, v)) + return new_params + + def prepare_post_parameters(self, post_params=None, files=None): + """Builds form parameters. + + :param post_params: Normal form parameters. + :param files: File parameters. + :return: Form parameters with files. + """ + params = [] + + if post_params: + params = post_params + + if files: + for k, v in six.iteritems(files): + if not v: + continue + file_names = v if type(v) is list else [v] + for n in file_names: + with open(n, 'rb') as f: + filename = os.path.basename(f.name) + filedata = f.read() + mimetype = (mimetypes.guess_type(filename)[0] or + 'application/octet-stream') + params.append( + tuple([k, tuple([filename, filedata, mimetype])])) + + return params + + def select_header_accept(self, accepts): + """Returns `Accept` based on an array of accepts provided. + + :param accepts: List of headers. + :return: Accept (e.g. application/json). + """ + if not accepts: + return + + accepts = [x.lower() for x in accepts] + + if 'application/json' in accepts: + return 'application/json' + else: + return ', '.join(accepts) + + def select_header_content_type(self, content_types): + """Returns `Content-Type` based on an array of content_types provided. + + :param content_types: List of content-types. + :return: Content-Type (e.g. application/json). + """ + if not content_types: + return 'application/json' + + content_types = [x.lower() for x in content_types] + + if 'application/json' in content_types or '*/*' in content_types: + return 'application/json' + else: + return content_types[0] + + def update_params_for_auth(self, headers, querys, auth_settings): + """Updates header and query params based on authentication setting. + + :param headers: Header parameters dict to be updated. + :param querys: Query parameters tuple list to be updated. + :param auth_settings: Authentication setting identifiers list. + """ + if not auth_settings: + return + + for auth in auth_settings: + auth_setting = self.configuration.auth_settings().get(auth) + if auth_setting: + if not auth_setting['value']: + continue + elif auth_setting['in'] == 'header': + headers[auth_setting['key']] = auth_setting['value'] + elif auth_setting['in'] == 'query': + querys.append((auth_setting['key'], auth_setting['value'])) + else: + raise ValueError( + 'Authentication token must be in `query` or `header`' + ) + + def __deserialize_file(self, response): + """Deserializes body to file + + Saves response body into a file in a temporary folder, + using the filename from the `Content-Disposition` header if provided. + + :param response: RESTResponse. + :return: file path. + """ + fd, path = tempfile.mkstemp(dir=self.configuration.temp_folder_path) + os.close(fd) + os.remove(path) + + content_disposition = response.getheader("Content-Disposition") + if content_disposition: + filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?', + content_disposition).group(1) + path = os.path.join(os.path.dirname(path), filename) + + with open(path, "wb") as f: + f.write(response.data) + + return path + + def __deserialize_primitive(self, data, klass): + """Deserializes string to primitive type. + + :param data: str. + :param klass: class literal. + + :return: int, long, float, str, bool. + """ + try: + return klass(data) + except UnicodeEncodeError: + return six.text_type(data) + except TypeError: + return data + + def __deserialize_object(self, value): + """Return a original value. + + :return: object. + """ + return value + + def __deserialize_date(self, string): + """Deserializes string to date. + + :param string: str. + :return: date. + """ + try: + from dateutil.parser import parse + return parse(string).date() + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason="Failed to parse `{0}` as date object".format(string) + ) + + def __deserialize_datatime(self, string): + """Deserializes string to datetime. + + The string should be in iso8601 datetime format. + + :param string: str. + :return: datetime. + """ + try: + from dateutil.parser import parse + return parse(string) + except ImportError: + return string + except ValueError: + raise rest.ApiException( + status=0, + reason=( + "Failed to parse `{0}` as datetime object" + .format(string) + ) + ) + + def __hasattr(self, object, name): + return name in object.__class__.__dict__ + + def __deserialize_model(self, data, klass): + """Deserializes list or dict to model. + + :param data: dict, list. + :param klass: class literal. + :return: model object. + """ + + if (not klass.swagger_types and + not self.__hasattr(klass, 'get_real_child_model')): + return data + + kwargs = {} + if klass.swagger_types is not None: + for attr, attr_type in six.iteritems(klass.swagger_types): + if (data is not None and + klass.attribute_map[attr] in data and + isinstance(data, (list, dict))): + value = data[klass.attribute_map[attr]] + kwargs[attr] = self.__deserialize(value, attr_type) + + instance = klass(**kwargs) + + if (isinstance(instance, dict) and + klass.swagger_types is not None and + isinstance(data, dict)): + for key, value in data.items(): + if key not in klass.swagger_types: + instance[key] = value + if self.__hasattr(instance, 'get_real_child_model'): + klass_name = instance.get_real_child_model(data) + if klass_name: + instance = self.__deserialize(data, klass_name) + return instance diff --git a/sdk/python/v1alpha3/kubeflow/katib/configuration.py b/sdk/python/v1alpha3/kubeflow/katib/configuration.py new file mode 100644 index 00000000000..f13219be986 --- /dev/null +++ b/sdk/python/v1alpha3/kubeflow/katib/configuration.py @@ -0,0 +1,237 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1alpha3-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import copy +import logging +import multiprocessing +import sys +import urllib3 + +import six +from six.moves import http_client as httplib + + +class Configuration(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Ref: https://github.com/swagger-api/swagger-codegen + Do not edit the class manually. + """ + + _default = None + + def __init__(self): + """Constructor""" + if self._default: + for key in self._default.__dict__.keys(): + self.__dict__[key] = copy.copy(self._default.__dict__[key]) + return + + # Default Base url + self.host = "https://localhost" + # Temp file folder for downloading files + self.temp_folder_path = None + + # Authentication Settings + # dict to store API key(s) + self.api_key = {} + # dict to store API prefix (e.g. Bearer) + self.api_key_prefix = {} + # Username for HTTP basic authentication + self.username = "" + # Password for HTTP basic authentication + self.password = "" + + # Logging Settings + self.logger = {} + self.logger["package_logger"] = logging.getLogger("katib") + self.logger["urllib3_logger"] = logging.getLogger("urllib3") + # Log format + self.logger_format = '%(asctime)s %(levelname)s %(message)s' + # Log stream handler + self.logger_stream_handler = None + # Log file handler + self.logger_file_handler = None + # Debug file location + self.logger_file = None + # Debug switch + self.debug = False + + # SSL/TLS verification + # Set this to false to skip verifying SSL certificate when calling API + # from https server. + self.verify_ssl = True + # Set this to customize the certificate file to verify the peer. + self.ssl_ca_cert = None + # client certificate file + self.cert_file = None + # client key file + self.key_file = None + # Set this to True/False to enable/disable SSL hostname verification. + self.assert_hostname = None + + # urllib3 connection pool's maximum number of connections saved + # per pool. urllib3 uses 1 connection as default value, but this is + # not the best value when you are making a lot of possibly parallel + # requests to the same host, which is often the case here. + # cpu_count * 5 is used as default value to increase performance. + self.connection_pool_maxsize = multiprocessing.cpu_count() * 5 + + # Proxy URL + self.proxy = None + # Safe chars for path_param + self.safe_chars_for_path_param = '' + + @classmethod + def set_default(cls, default): + cls._default = default + + @property + def logger_file(self): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + return self.__logger_file + + @logger_file.setter + def logger_file(self, value): + """The logger file. + + If the logger_file is None, then add stream handler and remove file + handler. Otherwise, add file handler and remove stream handler. + + :param value: The logger_file path. + :type: str + """ + self.__logger_file = value + if self.__logger_file: + # If set logging file, + # then add file handler and remove stream handler. + self.logger_file_handler = logging.FileHandler(self.__logger_file) + self.logger_file_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_file_handler) + if self.logger_stream_handler: + logger.removeHandler(self.logger_stream_handler) + else: + # If not set logging file, + # then add stream handler and remove file handler. + self.logger_stream_handler = logging.StreamHandler() + self.logger_stream_handler.setFormatter(self.logger_formatter) + for _, logger in six.iteritems(self.logger): + logger.addHandler(self.logger_stream_handler) + if self.logger_file_handler: + logger.removeHandler(self.logger_file_handler) + + @property + def debug(self): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + return self.__debug + + @debug.setter + def debug(self, value): + """Debug status + + :param value: The debug status, True or False. + :type: bool + """ + self.__debug = value + if self.__debug: + # if debug status is True, turn on debug logging + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.DEBUG) + # turn on httplib debug + httplib.HTTPConnection.debuglevel = 1 + else: + # if debug status is False, turn off debug logging, + # setting log level to default `logging.WARNING` + for _, logger in six.iteritems(self.logger): + logger.setLevel(logging.WARNING) + # turn off httplib debug + httplib.HTTPConnection.debuglevel = 0 + + @property + def logger_format(self): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + return self.__logger_format + + @logger_format.setter + def logger_format(self, value): + """The logger format. + + The logger_formatter will be updated when sets logger_format. + + :param value: The format string. + :type: str + """ + self.__logger_format = value + self.logger_formatter = logging.Formatter(self.__logger_format) + + def get_api_key_with_prefix(self, identifier): + """Gets API key (with prefix if set). + + :param identifier: The identifier of apiKey. + :return: The token for api key authentication. + """ + if (self.api_key.get(identifier) and + self.api_key_prefix.get(identifier)): + return self.api_key_prefix[identifier] + ' ' + self.api_key[identifier] # noqa: E501 + elif self.api_key.get(identifier): + return self.api_key[identifier] + + def get_basic_auth_token(self): + """Gets HTTP basic authentication header (string). + + :return: The token for basic HTTP authentication. + """ + return urllib3.util.make_headers( + basic_auth=self.username + ':' + self.password + ).get('authorization') + + def auth_settings(self): + """Gets Auth Settings dict for api client. + + :return: The Auth Settings information dict. + """ + return { + + } + + def to_debug_report(self): + """Gets the essential information for debugging. + + :return: The report for debugging. + """ + return "Python SDK Debug Report:\n"\ + "OS: {env}\n"\ + "Python Version: {pyversion}\n"\ + "Version of the API: v1alpha3-0.1\n"\ + "SDK Package Version: 0.1".\ + format(env=sys.platform, pyversion=sys.version) diff --git a/sdk/python/kubeflow/katib/constants/__init__.py b/sdk/python/v1alpha3/kubeflow/katib/constants/__init__.py similarity index 100% rename from sdk/python/kubeflow/katib/constants/__init__.py rename to sdk/python/v1alpha3/kubeflow/katib/constants/__init__.py diff --git a/sdk/python/kubeflow/katib/constants/constants.py b/sdk/python/v1alpha3/kubeflow/katib/constants/constants.py similarity index 100% rename from sdk/python/kubeflow/katib/constants/constants.py rename to sdk/python/v1alpha3/kubeflow/katib/constants/constants.py diff --git a/sdk/python/kubeflow/katib/models/__init__.py b/sdk/python/v1alpha3/kubeflow/katib/models/__init__.py similarity index 96% rename from sdk/python/kubeflow/katib/models/__init__.py rename to sdk/python/v1alpha3/kubeflow/katib/models/__init__.py index 00d90f33a90..454bc2101e2 100644 --- a/sdk/python/kubeflow/katib/models/__init__.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/__init__.py @@ -2,12 +2,12 @@ # flake8: noqa """ - katib + Katib - swagger description for katib # noqa: E501 - - OpenAPI spec version: v0.1 + Swagger description for Katib # noqa: E501 + OpenAPI spec version: v1alpha3-0.1 + Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -53,12 +53,3 @@ from kubeflow.katib.models.v1alpha3_trial_spec import V1alpha3TrialSpec from kubeflow.katib.models.v1alpha3_trial_status import V1alpha3TrialStatus from kubeflow.katib.models.v1alpha3_trial_template import V1alpha3TrialTemplate - - - - - - - - - diff --git a/sdk/python/v1alpha3/kubeflow/katib/models/v1_time.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1_time.py new file mode 100644 index 00000000000..cabbec802af --- /dev/null +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1_time.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1Time(object): + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1Time - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1Time, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Time): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1alpha3/kubeflow/katib/models/v1_unstructured_unstructured.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1_unstructured_unstructured.py new file mode 100644 index 00000000000..ae39cdc5dc8 --- /dev/null +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1_unstructured_unstructured.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1UnstructuredUnstructured(object): + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1UnstructuredUnstructured - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1UnstructuredUnstructured, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1UnstructuredUnstructured): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_algorithm_setting.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_setting.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_algorithm_setting.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_setting.py index 0e00955fea1..e578578542b 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_algorithm_setting.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_setting.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_algorithm_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_spec.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_algorithm_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_spec.py index 02ea6a8e038..36344a05f95 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_algorithm_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_algorithm_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_algorithm_setting import V1alpha3AlgorithmSetting # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_early_stopping_spec import V1alpha3EarlyStoppingSpec # noqa: F401,E501 + class V1alpha3AlgorithmSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_collector_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_collector_spec.py similarity index 96% rename from sdk/python/kubeflow/katib/models/v1alpha3_collector_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_collector_spec.py index 10f01d181e0..bc2edbfe2bc 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_collector_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_collector_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubernetes.client import V1Container # noqa: F401,E501 + class V1alpha3CollectorSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_setting.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_setting.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_setting.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_setting.py index 7ac2d176088..504ad722cbf 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_setting.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_setting.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_spec.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_spec.py index 4f9664f28a8..d602af28862 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_early_stopping_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_early_stopping_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_early_stopping_setting import V1alpha3EarlyStoppingSetting # noqa: F401,E501 + class V1alpha3EarlyStoppingSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_experiment.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_experiment.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment.py index b08ec824265..5839b27c8c2 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_experiment.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1alpha3_experiment_spec import V1alpha3ExperimentSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_experiment_status import V1alpha3ExperimentStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + class V1alpha3Experiment(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_condition.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_condition.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_experiment_condition.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_condition.py index fe626a107cb..d6edfdd2990 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_condition.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + class V1alpha3ExperimentCondition(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_list.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_list.py similarity index 96% rename from sdk/python/kubeflow/katib/models/v1alpha3_experiment_list.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_list.py index 728b9e86101..ee653920777 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_list.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_experiment import V1alpha3Experiment # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + class V1alpha3ExperimentList(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_experiment_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py index 2658f7a7e15..7918d3e51f6 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,13 @@ import six +from kubeflow.katib.models.v1alpha3_algorithm_spec import V1alpha3AlgorithmSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_metrics_collector_spec import V1alpha3MetricsCollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_nas_config import V1alpha3NasConfig # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_objective_spec import V1alpha3ObjectiveSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_parameter_spec import V1alpha3ParameterSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_trial_template import V1alpha3TrialTemplate # noqa: F401,E501 + class V1alpha3ExperimentSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_status.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_status.py similarity index 98% rename from sdk/python/kubeflow/katib/models/v1alpha3_experiment_status.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_status.py index f4fb110486a..8f6d952564a 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_experiment_status.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_experiment_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_experiment_condition import V1alpha3ExperimentCondition # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_optimal_trial import V1alpha3OptimalTrial # noqa: F401,E501 + class V1alpha3ExperimentStatus(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_feasible_space.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_feasible_space.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_feasible_space.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_feasible_space.py index 603c4b7a83d..2fbf3c7e82a 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_feasible_space.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_feasible_space.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_file_system_path.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_file_system_path.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_file_system_path.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_file_system_path.py index 7e94370468b..520eabd0e75 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_file_system_path.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_file_system_path.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_filter_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_filter_spec.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_filter_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_filter_spec.py index fff19742b11..8b99f32bc28 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_filter_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_filter_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_go_template.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_go_template.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_go_template.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_go_template.py index edf3104f5ed..dde34f4b88d 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_go_template.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_go_template.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_template_spec import V1alpha3TemplateSpec # noqa: F401,E501 + class V1alpha3GoTemplate(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_graph_config.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_graph_config.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_graph_config.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_graph_config.py index 9e0055236cf..6363f6b23be 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_graph_config.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_graph_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_metric.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metric.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_metric.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metric.py index 3397821b9a3..900d68db1cb 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_metric.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metric.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py similarity index 93% rename from sdk/python/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py index a9ba9c4298c..c41c3620da9 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_metrics_collector_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_collector_spec import V1alpha3CollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_source_spec import V1alpha3SourceSpec # noqa: F401,E501 + class V1alpha3MetricsCollectorSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_nas_config.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_nas_config.py similarity index 93% rename from sdk/python/kubeflow/katib/models/v1alpha3_nas_config.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_nas_config.py index 92994bcd3c4..2296309bd0b 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_nas_config.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_nas_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_graph_config import V1alpha3GraphConfig # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_operation import V1alpha3Operation # noqa: F401,E501 + class V1alpha3NasConfig(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_objective_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_objective_spec.py similarity index 98% rename from sdk/python/kubeflow/katib/models/v1alpha3_objective_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_objective_spec.py index 7d796092b39..b89b036f1e3 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_objective_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_objective_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_observation.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_observation.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_observation.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_observation.py index a4a4444cb6b..2b244afcb79 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_observation.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_observation.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_metric import V1alpha3Metric # noqa: F401,E501 + class V1alpha3Observation(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_operation.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_operation.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_operation.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_operation.py index cc2839aa5c9..2880f5e173f 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_operation.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_operation.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_parameter_spec import V1alpha3ParameterSpec # noqa: F401,E501 + class V1alpha3Operation(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_optimal_trial.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_optimal_trial.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_optimal_trial.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_optimal_trial.py index ade71cbef2a..d24ae509739 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_optimal_trial.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_optimal_trial.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_observation import V1alpha3Observation # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_parameter_assignment import V1alpha3ParameterAssignment # noqa: F401,E501 + class V1alpha3OptimalTrial(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_parameter_assignment.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_assignment.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_parameter_assignment.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_assignment.py index 56973ecdda2..a1d3698b4c9 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_parameter_assignment.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_parameter_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_spec.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_parameter_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_spec.py index 7558e1fd2b5..662e9da1665 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_parameter_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_parameter_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_feasible_space import V1alpha3FeasibleSpace # noqa: F401,E501 + class V1alpha3ParameterSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_source_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_source_spec.py similarity index 93% rename from sdk/python/kubeflow/katib/models/v1alpha3_source_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_source_spec.py index e572bee3fb5..f3def097852 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_source_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_source_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1alpha3_file_system_path import V1alpha3FileSystemPath # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_filter_spec import V1alpha3FilterSpec # noqa: F401,E501 +from kubernetes.client import V1HTTPGetAction # noqa: F401,E501 + class V1alpha3SourceSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_suggestion.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion.py index 98a9a7e5a0b..e0a3067f62b 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1alpha3_suggestion_spec import V1alpha3SuggestionSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_suggestion_status import V1alpha3SuggestionStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + class V1alpha3Suggestion(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_condition.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_condition.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_suggestion_condition.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_condition.py index 8166ccbe676..8f36927709f 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_condition.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + class V1alpha3SuggestionCondition(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_list.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_list.py similarity index 96% rename from sdk/python/kubeflow/katib/models/v1alpha3_suggestion_list.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_list.py index 934d154ad08..3a48a58bf4e 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_list.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_suggestion import V1alpha3Suggestion # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + class V1alpha3SuggestionList(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_spec.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_suggestion_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_spec.py index 4e726192b51..f594a5facd7 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_status.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_status.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_suggestion_status.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_status.py index 1b6428aeffa..5f19388b328 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_suggestion_status.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_suggestion_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,11 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_algorithm_setting import V1alpha3AlgorithmSetting # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_suggestion_condition import V1alpha3SuggestionCondition # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_trial_assignment import V1alpha3TrialAssignment # noqa: F401,E501 + class V1alpha3SuggestionStatus(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_template_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_template_spec.py similarity index 98% rename from sdk/python/kubeflow/katib/models/v1alpha3_template_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_template_spec.py index 1c52951563d..bee1a1a1112 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_template_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_template_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial.py index f841dce1a9d..651eaa8bd33 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1alpha3_trial_spec import V1alpha3TrialSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_trial_status import V1alpha3TrialStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + class V1alpha3Trial(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_assignment.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_assignment.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_assignment.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_assignment.py index 8f80ea639fd..f21d7ea0533 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_assignment.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_parameter_assignment import V1alpha3ParameterAssignment # noqa: F401,E501 + class V1alpha3TrialAssignment(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_condition.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_condition.py similarity index 97% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_condition.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_condition.py index 2fc92f93d6c..9a40bde4617 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_condition.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + class V1alpha3TrialCondition(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_list.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_list.py similarity index 96% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_list.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_list.py index 32d76d6df36..e3f12f934b8 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_list.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,9 @@ import six +from kubeflow.katib.models.v1alpha3_trial import V1alpha3Trial # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + class V1alpha3TrialList(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_spec.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_spec.py similarity index 94% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_spec.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_spec.py index 65298ea7b13..a84608f4e1c 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_spec.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1alpha3_metrics_collector_spec import V1alpha3MetricsCollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_objective_spec import V1alpha3ObjectiveSpec # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_parameter_assignment import V1alpha3ParameterAssignment # noqa: F401,E501 + class V1alpha3TrialSpec(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_status.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_status.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_status.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_status.py index 45f27b95291..65332c1a36f 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_status.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,10 @@ import six +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_observation import V1alpha3Observation # noqa: F401,E501 +from kubeflow.katib.models.v1alpha3_trial_condition import V1alpha3TrialCondition # noqa: F401,E501 + class V1alpha3TrialStatus(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/kubeflow/katib/models/v1alpha3_trial_template.py b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_template.py similarity index 95% rename from sdk/python/kubeflow/katib/models/v1alpha3_trial_template.py rename to sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_template.py index 43415aa0dc2..fe72090ea12 100644 --- a/sdk/python/kubeflow/katib/models/v1alpha3_trial_template.py +++ b/sdk/python/v1alpha3/kubeflow/katib/models/v1alpha3_trial_template.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -16,6 +16,8 @@ import six +from kubeflow.katib.models.v1alpha3_go_template import V1alpha3GoTemplate # noqa: F401,E501 + class V1alpha3TrialTemplate(object): """NOTE: This class is auto generated by the swagger code generator program. diff --git a/sdk/python/v1alpha3/kubeflow/katib/rest.py b/sdk/python/v1alpha3/kubeflow/katib/rest.py new file mode 100644 index 00000000000..ed8ec7bdb85 --- /dev/null +++ b/sdk/python/v1alpha3/kubeflow/katib/rest.py @@ -0,0 +1,323 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1alpha3-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import io +import json +import logging +import re +import ssl + +import certifi +# python 2 and python 3 compatibility library +import six +from six.moves.urllib.parse import urlencode + +try: + import urllib3 +except ImportError: + raise ImportError('Swagger python client requires urllib3.') + + +logger = logging.getLogger(__name__) + + +class RESTResponse(io.IOBase): + + def __init__(self, resp): + self.urllib3_response = resp + self.status = resp.status + self.reason = resp.reason + self.data = resp.data + + def getheaders(self): + """Returns a dictionary of the response headers.""" + return self.urllib3_response.getheaders() + + def getheader(self, name, default=None): + """Returns a given response header.""" + return self.urllib3_response.getheader(name, default) + + +class RESTClientObject(object): + + def __init__(self, configuration, pools_size=4, maxsize=None): + # urllib3.PoolManager will pass all kw parameters to connectionpool + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501 + # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501 + # maxsize is the number of requests to host that are allowed in parallel # noqa: E501 + # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501 + + # cert_reqs + if configuration.verify_ssl: + cert_reqs = ssl.CERT_REQUIRED + else: + cert_reqs = ssl.CERT_NONE + + # ca_certs + if configuration.ssl_ca_cert: + ca_certs = configuration.ssl_ca_cert + else: + # if not set certificate file, use Mozilla's root certificates. + ca_certs = certifi.where() + + addition_pool_args = {} + if configuration.assert_hostname is not None: + addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + + if maxsize is None: + if configuration.connection_pool_maxsize is not None: + maxsize = configuration.connection_pool_maxsize + else: + maxsize = 4 + + # https pool manager + if configuration.proxy: + self.pool_manager = urllib3.ProxyManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + proxy_url=configuration.proxy, + **addition_pool_args + ) + else: + self.pool_manager = urllib3.PoolManager( + num_pools=pools_size, + maxsize=maxsize, + cert_reqs=cert_reqs, + ca_certs=ca_certs, + cert_file=configuration.cert_file, + key_file=configuration.key_file, + **addition_pool_args + ) + + def request(self, method, url, query_params=None, headers=None, + body=None, post_params=None, _preload_content=True, + _request_timeout=None): + """Perform requests. + + :param method: http request method + :param url: http request url + :param query_params: query parameters in the url + :param headers: http request headers + :param body: request json body, for `application/json` + :param post_params: request post parameters, + `application/x-www-form-urlencoded` + and `multipart/form-data` + :param _preload_content: if False, the urllib3.HTTPResponse object will + be returned without reading/decoding response + data. Default is True. + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + """ + method = method.upper() + assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT', + 'PATCH', 'OPTIONS'] + + if post_params and body: + raise ValueError( + "body parameter cannot be used with post_params parameter." + ) + + post_params = post_params or {} + headers = headers or {} + + timeout = None + if _request_timeout: + if isinstance(_request_timeout, (int, ) if six.PY3 else (int, long)): # noqa: E501,F821 + timeout = urllib3.Timeout(total=_request_timeout) + elif (isinstance(_request_timeout, tuple) and + len(_request_timeout) == 2): + timeout = urllib3.Timeout( + connect=_request_timeout[0], read=_request_timeout[1]) + + if 'Content-Type' not in headers: + headers['Content-Type'] = 'application/json' + + try: + # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE` + if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: + if query_params: + url += '?' + urlencode(query_params) + if re.search('json', headers['Content-Type'], re.IGNORECASE): + request_body = None + if body is not None: + request_body = json.dumps(body) + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501 + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=False, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + elif headers['Content-Type'] == 'multipart/form-data': + # must del headers['Content-Type'], or the correct + # Content-Type which generated by urllib3 will be + # overwritten. + del headers['Content-Type'] + r = self.pool_manager.request( + method, url, + fields=post_params, + encode_multipart=True, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + # Pass a `string` parameter directly in the body to support + # other content types than Json when `body` argument is + # provided in serialized form + elif isinstance(body, str): + request_body = body + r = self.pool_manager.request( + method, url, + body=request_body, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + else: + # Cannot generate the request from given parameters + msg = """Cannot prepare a request message for provided + arguments. Please check that your arguments match + declared content type.""" + raise ApiException(status=0, reason=msg) + # For `GET`, `HEAD` + else: + r = self.pool_manager.request(method, url, + fields=query_params, + preload_content=_preload_content, + timeout=timeout, + headers=headers) + except urllib3.exceptions.SSLError as e: + msg = "{0}\n{1}".format(type(e).__name__, str(e)) + raise ApiException(status=0, reason=msg) + + if _preload_content: + r = RESTResponse(r) + + # In the python 3, the response.data is bytes. + # we need to decode it to string. + if six.PY3: + r.data = r.data.decode('utf8') + + # log response body + logger.debug("response body: %s", r.data) + + if not 200 <= r.status <= 299: + raise ApiException(http_resp=r) + + return r + + def GET(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("GET", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def HEAD(self, url, headers=None, query_params=None, _preload_content=True, + _request_timeout=None): + return self.request("HEAD", url, + headers=headers, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + query_params=query_params) + + def OPTIONS(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("OPTIONS", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def DELETE(self, url, headers=None, query_params=None, body=None, + _preload_content=True, _request_timeout=None): + return self.request("DELETE", url, + headers=headers, + query_params=query_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def POST(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("POST", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PUT(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PUT", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + def PATCH(self, url, headers=None, query_params=None, post_params=None, + body=None, _preload_content=True, _request_timeout=None): + return self.request("PATCH", url, + headers=headers, + query_params=query_params, + post_params=post_params, + _preload_content=_preload_content, + _request_timeout=_request_timeout, + body=body) + + +class ApiException(Exception): + + def __init__(self, status=None, reason=None, http_resp=None): + if http_resp: + self.status = http_resp.status + self.reason = http_resp.reason + self.body = http_resp.data + self.headers = http_resp.getheaders() + else: + self.status = status + self.reason = reason + self.body = None + self.headers = None + + def __str__(self): + """Custom error messages for exception""" + error_message = "({0})\n"\ + "Reason: {1}\n".format(self.status, self.reason) + if self.headers: + error_message += "HTTP response headers: {0}\n".format( + self.headers) + + if self.body: + error_message += "HTTP response body: {0}\n".format(self.body) + + return error_message diff --git a/sdk/python/kubeflow/katib/utils/__init__.py b/sdk/python/v1alpha3/kubeflow/katib/utils/__init__.py similarity index 100% rename from sdk/python/kubeflow/katib/utils/__init__.py rename to sdk/python/v1alpha3/kubeflow/katib/utils/__init__.py diff --git a/sdk/python/kubeflow/katib/utils/utils.py b/sdk/python/v1alpha3/kubeflow/katib/utils/utils.py similarity index 100% rename from sdk/python/kubeflow/katib/utils/utils.py rename to sdk/python/v1alpha3/kubeflow/katib/utils/utils.py diff --git a/sdk/python/requirements.txt b/sdk/python/v1alpha3/requirements.txt similarity index 100% rename from sdk/python/requirements.txt rename to sdk/python/v1alpha3/requirements.txt diff --git a/sdk/python/setup.py b/sdk/python/v1alpha3/setup.py similarity index 89% rename from sdk/python/setup.py rename to sdk/python/v1alpha3/setup.py index c236768b5b3..c40c2d4f906 100644 --- a/sdk/python/setup.py +++ b/sdk/python/v1alpha3/setup.py @@ -23,9 +23,9 @@ author="Kubeflow Authors", author_email='premnath.vel@gmail.com', license="Apache License Version 2.0", - url="https://github.com/kubeflow/katib/sdk/python", - description="Katib Python SDK", - long_description="Katib Python SDK", + url="https://github.com/kubeflow/katib/tree/master/sdk/python/v1alpha3", + description="Katib Python SDK for APIVersion v1alpha3", + long_description="Katib Python SDK for APIVersion v1alpha3", packages=setuptools.find_packages( include=("kubeflow*")), package_data={}, diff --git a/sdk/python/test/__init__.py b/sdk/python/v1alpha3/test/__init__.py similarity index 100% rename from sdk/python/test/__init__.py rename to sdk/python/v1alpha3/test/__init__.py diff --git a/sdk/python/test/test_v1alpha3_algorithm_setting.py b/sdk/python/v1alpha3/test/test_v1alpha3_algorithm_setting.py similarity index 71% rename from sdk/python/test/test_v1alpha3_algorithm_setting.py rename to sdk/python/v1alpha3/test/test_v1alpha3_algorithm_setting.py index 17734452c69..cdaf47e9fb3 100644 --- a/sdk/python/test/test_v1alpha3_algorithm_setting.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_algorithm_setting.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_algorithm_setting import V1alpha3AlgorithmSetting # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_algorithm_setting import V1alpha3AlgorithmSetting # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3AlgorithmSetting(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_algorithm_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_algorithm_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_algorithm_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_algorithm_spec.py index 1aedd168c94..363a7cc7faa 100644 --- a/sdk/python/test/test_v1alpha3_algorithm_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_algorithm_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_algorithm_spec import V1alpha3AlgorithmSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_algorithm_spec import V1alpha3AlgorithmSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3AlgorithmSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_collector_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_collector_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_collector_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_collector_spec.py index 1ad9b00c52e..637388a21c0 100644 --- a/sdk/python/test/test_v1alpha3_collector_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_collector_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_collector_spec import V1alpha3CollectorSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_collector_spec import V1alpha3CollectorSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3CollectorSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_early_stopping_setting.py b/sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_setting.py similarity index 71% rename from sdk/python/test/test_v1alpha3_early_stopping_setting.py rename to sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_setting.py index 424d7fbd7b8..4939075f2e7 100644 --- a/sdk/python/test/test_v1alpha3_early_stopping_setting.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_setting.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_early_stopping_setting import V1alpha3EarlyStoppingSetting # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_early_stopping_setting import V1alpha3EarlyStoppingSetting # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3EarlyStoppingSetting(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_early_stopping_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_early_stopping_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_spec.py index 46856e5a3f0..916aa77c3f2 100644 --- a/sdk/python/test/test_v1alpha3_early_stopping_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_early_stopping_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_early_stopping_spec import V1alpha3EarlyStoppingSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_early_stopping_spec import V1alpha3EarlyStoppingSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3EarlyStoppingSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_experiment.py b/sdk/python/v1alpha3/test/test_v1alpha3_experiment.py similarity index 71% rename from sdk/python/test/test_v1alpha3_experiment.py rename to sdk/python/v1alpha3/test/test_v1alpha3_experiment.py index 21678f31f2f..47d35602722 100644 --- a/sdk/python/test/test_v1alpha3_experiment.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_experiment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_experiment import V1alpha3Experiment # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_experiment import V1alpha3Experiment # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Experiment(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_experiment_condition.py b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_condition.py similarity index 71% rename from sdk/python/test/test_v1alpha3_experiment_condition.py rename to sdk/python/v1alpha3/test/test_v1alpha3_experiment_condition.py index 8ceb64b17f8..bf9ce1562a5 100644 --- a/sdk/python/test/test_v1alpha3_experiment_condition.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_experiment_condition import V1alpha3ExperimentCondition # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_experiment_condition import V1alpha3ExperimentCondition # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ExperimentCondition(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_experiment_list.py b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_list.py similarity index 71% rename from sdk/python/test/test_v1alpha3_experiment_list.py rename to sdk/python/v1alpha3/test/test_v1alpha3_experiment_list.py index f8f40553ea5..aa107a3589a 100644 --- a/sdk/python/test/test_v1alpha3_experiment_list.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_experiment_list import V1alpha3ExperimentList # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_experiment_list import V1alpha3ExperimentList # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ExperimentList(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_experiment_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_experiment_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_experiment_spec.py index bff2114c49b..3b0cb21d3ed 100644 --- a/sdk/python/test/test_v1alpha3_experiment_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_experiment_spec import V1alpha3ExperimentSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_experiment_spec import V1alpha3ExperimentSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ExperimentSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_experiment_status.py b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_status.py similarity index 71% rename from sdk/python/test/test_v1alpha3_experiment_status.py rename to sdk/python/v1alpha3/test/test_v1alpha3_experiment_status.py index ef46fa4fdfe..81c44bb6ba8 100644 --- a/sdk/python/test/test_v1alpha3_experiment_status.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_experiment_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_experiment_status import V1alpha3ExperimentStatus # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_experiment_status import V1alpha3ExperimentStatus # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ExperimentStatus(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_feasible_space.py b/sdk/python/v1alpha3/test/test_v1alpha3_feasible_space.py similarity index 71% rename from sdk/python/test/test_v1alpha3_feasible_space.py rename to sdk/python/v1alpha3/test/test_v1alpha3_feasible_space.py index bbb88496eaa..30b1e1baec1 100644 --- a/sdk/python/test/test_v1alpha3_feasible_space.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_feasible_space.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_feasible_space import V1alpha3FeasibleSpace # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_feasible_space import V1alpha3FeasibleSpace # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3FeasibleSpace(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_file_system_path.py b/sdk/python/v1alpha3/test/test_v1alpha3_file_system_path.py similarity index 71% rename from sdk/python/test/test_v1alpha3_file_system_path.py rename to sdk/python/v1alpha3/test/test_v1alpha3_file_system_path.py index 7d4d9d48330..b66c2910d72 100644 --- a/sdk/python/test/test_v1alpha3_file_system_path.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_file_system_path.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_file_system_path import V1alpha3FileSystemPath # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_file_system_path import V1alpha3FileSystemPath # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3FileSystemPath(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_filter_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_filter_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_filter_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_filter_spec.py index 2ec19b4805d..002d78d65fd 100644 --- a/sdk/python/test/test_v1alpha3_filter_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_filter_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_filter_spec import V1alpha3FilterSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_filter_spec import V1alpha3FilterSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3FilterSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_go_template.py b/sdk/python/v1alpha3/test/test_v1alpha3_go_template.py similarity index 71% rename from sdk/python/test/test_v1alpha3_go_template.py rename to sdk/python/v1alpha3/test/test_v1alpha3_go_template.py index 3c612b5ba86..313111f92fb 100644 --- a/sdk/python/test/test_v1alpha3_go_template.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_go_template.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_go_template import V1alpha3GoTemplate # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_go_template import V1alpha3GoTemplate # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3GoTemplate(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_graph_config.py b/sdk/python/v1alpha3/test/test_v1alpha3_graph_config.py similarity index 71% rename from sdk/python/test/test_v1alpha3_graph_config.py rename to sdk/python/v1alpha3/test/test_v1alpha3_graph_config.py index f454ea2b22d..cbbcec0f685 100644 --- a/sdk/python/test/test_v1alpha3_graph_config.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_graph_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_graph_config import V1alpha3GraphConfig # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_graph_config import V1alpha3GraphConfig # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3GraphConfig(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_metric.py b/sdk/python/v1alpha3/test/test_v1alpha3_metric.py similarity index 71% rename from sdk/python/test/test_v1alpha3_metric.py rename to sdk/python/v1alpha3/test/test_v1alpha3_metric.py index d599c60ea9d..925e4376d96 100644 --- a/sdk/python/test/test_v1alpha3_metric.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_metric.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_metric import V1alpha3Metric # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_metric import V1alpha3Metric # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Metric(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_metrics_collector_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_metrics_collector_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_metrics_collector_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_metrics_collector_spec.py index 1fba789d31a..144d3aa1fc1 100644 --- a/sdk/python/test/test_v1alpha3_metrics_collector_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_metrics_collector_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_metrics_collector_spec import V1alpha3MetricsCollectorSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_metrics_collector_spec import V1alpha3MetricsCollectorSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3MetricsCollectorSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_nas_config.py b/sdk/python/v1alpha3/test/test_v1alpha3_nas_config.py similarity index 71% rename from sdk/python/test/test_v1alpha3_nas_config.py rename to sdk/python/v1alpha3/test/test_v1alpha3_nas_config.py index 4675ab30707..753ef4b874e 100644 --- a/sdk/python/test/test_v1alpha3_nas_config.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_nas_config.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_nas_config import V1alpha3NasConfig # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_nas_config import V1alpha3NasConfig # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3NasConfig(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_objective_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_objective_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_objective_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_objective_spec.py index 803b5c475a5..e7cb373533f 100644 --- a/sdk/python/test/test_v1alpha3_objective_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_objective_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_objective_spec import V1alpha3ObjectiveSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_objective_spec import V1alpha3ObjectiveSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ObjectiveSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_observation.py b/sdk/python/v1alpha3/test/test_v1alpha3_observation.py similarity index 71% rename from sdk/python/test/test_v1alpha3_observation.py rename to sdk/python/v1alpha3/test/test_v1alpha3_observation.py index c706de0413d..0671722b9ef 100644 --- a/sdk/python/test/test_v1alpha3_observation.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_observation.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_observation import V1alpha3Observation # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_observation import V1alpha3Observation # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Observation(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_operation.py b/sdk/python/v1alpha3/test/test_v1alpha3_operation.py similarity index 71% rename from sdk/python/test/test_v1alpha3_operation.py rename to sdk/python/v1alpha3/test/test_v1alpha3_operation.py index 9ed4938ede6..f4f0ea3f7c0 100644 --- a/sdk/python/test/test_v1alpha3_operation.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_operation.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_operation import V1alpha3Operation # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_operation import V1alpha3Operation # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Operation(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_optimal_trial.py b/sdk/python/v1alpha3/test/test_v1alpha3_optimal_trial.py similarity index 71% rename from sdk/python/test/test_v1alpha3_optimal_trial.py rename to sdk/python/v1alpha3/test/test_v1alpha3_optimal_trial.py index 9ac455bb9c2..61dbfc2147e 100644 --- a/sdk/python/test/test_v1alpha3_optimal_trial.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_optimal_trial.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_optimal_trial import V1alpha3OptimalTrial # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_optimal_trial import V1alpha3OptimalTrial # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3OptimalTrial(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_parameter_assignment.py b/sdk/python/v1alpha3/test/test_v1alpha3_parameter_assignment.py similarity index 71% rename from sdk/python/test/test_v1alpha3_parameter_assignment.py rename to sdk/python/v1alpha3/test/test_v1alpha3_parameter_assignment.py index 9428b4d3cde..1ab978ca383 100644 --- a/sdk/python/test/test_v1alpha3_parameter_assignment.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_parameter_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_parameter_assignment import V1alpha3ParameterAssignment # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_parameter_assignment import V1alpha3ParameterAssignment # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ParameterAssignment(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_parameter_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_parameter_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_parameter_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_parameter_spec.py index e5db2e6aa4a..8e531980366 100644 --- a/sdk/python/test/test_v1alpha3_parameter_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_parameter_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_parameter_spec import V1alpha3ParameterSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_parameter_spec import V1alpha3ParameterSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3ParameterSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_source_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_source_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_source_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_source_spec.py index 6a07d36d01c..bad0c566b1e 100644 --- a/sdk/python/test/test_v1alpha3_source_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_source_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_source_spec import V1alpha3SourceSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_source_spec import V1alpha3SourceSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3SourceSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_suggestion.py b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion.py similarity index 71% rename from sdk/python/test/test_v1alpha3_suggestion.py rename to sdk/python/v1alpha3/test/test_v1alpha3_suggestion.py index 407e91878d5..5df4948bd50 100644 --- a/sdk/python/test/test_v1alpha3_suggestion.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_suggestion import V1alpha3Suggestion # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_suggestion import V1alpha3Suggestion # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Suggestion(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_suggestion_condition.py b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_condition.py similarity index 71% rename from sdk/python/test/test_v1alpha3_suggestion_condition.py rename to sdk/python/v1alpha3/test/test_v1alpha3_suggestion_condition.py index 0258701aae8..8981c27eea5 100644 --- a/sdk/python/test/test_v1alpha3_suggestion_condition.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_suggestion_condition import V1alpha3SuggestionCondition # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_suggestion_condition import V1alpha3SuggestionCondition # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3SuggestionCondition(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_suggestion_list.py b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_list.py similarity index 71% rename from sdk/python/test/test_v1alpha3_suggestion_list.py rename to sdk/python/v1alpha3/test/test_v1alpha3_suggestion_list.py index 1487c71ebe1..6057598ae0b 100644 --- a/sdk/python/test/test_v1alpha3_suggestion_list.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_suggestion_list import V1alpha3SuggestionList # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_suggestion_list import V1alpha3SuggestionList # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3SuggestionList(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_suggestion_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_suggestion_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_suggestion_spec.py index b3645db78b8..f17b7749be1 100644 --- a/sdk/python/test/test_v1alpha3_suggestion_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_suggestion_spec import V1alpha3SuggestionSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_suggestion_spec import V1alpha3SuggestionSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3SuggestionSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_suggestion_status.py b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_status.py similarity index 71% rename from sdk/python/test/test_v1alpha3_suggestion_status.py rename to sdk/python/v1alpha3/test/test_v1alpha3_suggestion_status.py index 205251953d4..90358d77a37 100644 --- a/sdk/python/test/test_v1alpha3_suggestion_status.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_suggestion_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_suggestion_status import V1alpha3SuggestionStatus # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_suggestion_status import V1alpha3SuggestionStatus # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3SuggestionStatus(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_template_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_template_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_template_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_template_spec.py index d1f17550823..918537eadc1 100644 --- a/sdk/python/test/test_v1alpha3_template_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_template_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_template_spec import V1alpha3TemplateSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_template_spec import V1alpha3TemplateSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TemplateSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial.py index 6c00c388e7b..62f7f2b4bbb 100644 --- a/sdk/python/test/test_v1alpha3_trial.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial import V1alpha3Trial # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial import V1alpha3Trial # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3Trial(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_assignment.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_assignment.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_assignment.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_assignment.py index f7d181687c1..d330d97ae31 100644 --- a/sdk/python/test/test_v1alpha3_trial_assignment.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_assignment.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_assignment import V1alpha3TrialAssignment # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_assignment import V1alpha3TrialAssignment # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialAssignment(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_condition.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_condition.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_condition.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_condition.py index 141392eac6f..4b8996d129c 100644 --- a/sdk/python/test/test_v1alpha3_trial_condition.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_condition.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_condition import V1alpha3TrialCondition # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_condition import V1alpha3TrialCondition # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialCondition(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_list.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_list.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_list.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_list.py index daae14ac8b9..f10ee76b0b9 100644 --- a/sdk/python/test/test_v1alpha3_trial_list.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_list.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_list import V1alpha3TrialList # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_list import V1alpha3TrialList # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialList(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_spec.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_spec.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_spec.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_spec.py index 7a7bd4806ee..43b556f8ae3 100644 --- a/sdk/python/test/test_v1alpha3_trial_spec.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_spec.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_spec import V1alpha3TrialSpec # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_spec import V1alpha3TrialSpec # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialSpec(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_status.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_status.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_status.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_status.py index e22a66b0c46..9e2344d0d32 100644 --- a/sdk/python/test/test_v1alpha3_trial_status.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_status.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_status import V1alpha3TrialStatus # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_status import V1alpha3TrialStatus # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialStatus(unittest.TestCase): diff --git a/sdk/python/test/test_v1alpha3_trial_template.py b/sdk/python/v1alpha3/test/test_v1alpha3_trial_template.py similarity index 71% rename from sdk/python/test/test_v1alpha3_trial_template.py rename to sdk/python/v1alpha3/test/test_v1alpha3_trial_template.py index 044b8cce7db..645ba10a0c5 100644 --- a/sdk/python/test/test_v1alpha3_trial_template.py +++ b/sdk/python/v1alpha3/test/test_v1alpha3_trial_template.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1alpha3-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -15,9 +15,9 @@ import unittest -import katib -from katib.models.v1alpha3_trial_template import V1alpha3TrialTemplate # noqa: E501 -from katib.rest import ApiException +import kubeflow.katib +from kubeflow.katib.models.v1alpha3_trial_template import V1alpha3TrialTemplate # noqa: E501 +from kubeflow.katib.rest import ApiException class TestV1alpha3TrialTemplate(unittest.TestCase): diff --git a/sdk/python/v1beta1/README.md b/sdk/python/v1beta1/README.md new file mode 100644 index 00000000000..cf42f28f3b2 --- /dev/null +++ b/sdk/python/v1beta1/README.md @@ -0,0 +1,101 @@ +# Kubeflow Katib SDK + +Python SDK for Kubeflow Katib + +## Requirements. + +Python 2.7 and 3.4+ + +## Installation & Usage + +### pip install + +```sh +pip install kubeflow-katib +``` + +Then import package: + +```python +from kubeflow import katib +``` + +### Setuptools + +Install via [Setuptools](http://pypi.python.org/pypi/setuptools). + +```sh +python setup.py install --user +``` +(or `sudo python setup.py install` to install the package for all users) + +## Getting Started + +Please follow the [samples](examples/bayesianoptimization-katib-sdk.ipynb) to create, update, delete and get hyperparamaters of Katib Experiment. + +## Documentation for API Endpoints + +Class | Method | Description +------------ | ------------- | ------------- +[KatibClient](docs/KatibClient.md) | [create_experiment](docs/KatibClient.md#create_experiment) | Create Katib Experiment| +[KatibClient](docs/KatibClient.md) | [get_experiment](docs/KatibClient.md#get_experiment) | Get or watch the specified Experiment or all Experiment in the namespace | +[KatibClient](docs/KatibClient.md) | [delete_experiment](docs/KatibClient.md#delete_experiment) | Delete specified Experiment | +[KatibClient](docs/KatibClient.md) | [list_experiments](docs/KatibClient.md#list_experiments) | List all Experiments with status | +[KatibClient](docs/KatibClient.md) | [get_experiment_status](docs/KatibClient.md#get_experiment_status) | Get Experiment status| +[KatibClient](docs/KatibClient.md) | [is_experiment_succeeded](docs/KatibClient.md#is_experiment_succeeded) | Check if Experiment status is Succeeded | +[KatibClient](docs/KatibClient.md) | [list_trials](docs/KatibClient.md#list_trials) | List all trials of specified Experiment | +[KatibClient](docs/KatibClient.md) | [get_optimal_hyperparmeters](docs/KatibClient.md#get_optimal_hyperparmeters) | Get currentOptimalTrial with paramaterAssignments of an Experiment| + + +## Documentation For Models + + - [V1beta1AlgorithmSetting](docs/V1beta1AlgorithmSetting.md) + - [V1beta1AlgorithmSpec](docs/V1beta1AlgorithmSpec.md) + - [V1beta1CollectorSpec](docs/V1beta1CollectorSpec.md) + - [V1beta1ConfigMapSource](docs/V1beta1ConfigMapSource.md) + - [V1beta1EarlyStoppingSetting](docs/V1beta1EarlyStoppingSetting.md) + - [V1beta1EarlyStoppingSpec](docs/V1beta1EarlyStoppingSpec.md) + - [V1beta1Experiment](docs/V1beta1Experiment.md) + - [V1beta1ExperimentCondition](docs/V1beta1ExperimentCondition.md) + - [V1beta1ExperimentList](docs/V1beta1ExperimentList.md) + - [V1beta1ExperimentSpec](docs/V1beta1ExperimentSpec.md) + - [V1beta1ExperimentStatus](docs/V1beta1ExperimentStatus.md) + - [V1beta1FeasibleSpace](docs/V1beta1FeasibleSpace.md) + - [V1beta1FileSystemPath](docs/V1beta1FileSystemPath.md) + - [V1beta1FilterSpec](docs/V1beta1FilterSpec.md) + - [V1beta1GraphConfig](docs/V1beta1GraphConfig.md) + - [V1beta1Metric](docs/V1beta1Metric.md) + - [V1beta1MetricStrategy](docs/V1beta1MetricStrategy.md) + - [V1beta1MetricsCollectorSpec](docs/V1beta1MetricsCollectorSpec.md) + - [V1beta1NasConfig](docs/V1beta1NasConfig.md) + - [V1beta1ObjectiveSpec](docs/V1beta1ObjectiveSpec.md) + - [V1beta1Observation](docs/V1beta1Observation.md) + - [V1beta1Operation](docs/V1beta1Operation.md) + - [V1beta1OptimalTrial](docs/V1beta1OptimalTrial.md) + - [V1beta1ParameterAssignment](docs/V1beta1ParameterAssignment.md) + - [V1beta1ParameterSpec](docs/V1beta1ParameterSpec.md) + - [V1beta1SourceSpec](docs/V1beta1SourceSpec.md) + - [V1beta1Suggestion](docs/V1beta1Suggestion.md) + - [V1beta1SuggestionCondition](docs/V1beta1SuggestionCondition.md) + - [V1beta1SuggestionList](docs/V1beta1SuggestionList.md) + - [V1beta1SuggestionSpec](docs/V1beta1SuggestionSpec.md) + - [V1beta1SuggestionStatus](docs/V1beta1SuggestionStatus.md) + - [V1beta1Trial](docs/V1beta1Trial.md) + - [V1beta1TrialAssignment](docs/V1beta1TrialAssignment.md) + - [V1beta1TrialCondition](docs/V1beta1TrialCondition.md) + - [V1beta1TrialList](docs/V1beta1TrialList.md) + - [V1beta1TrialParameterSpec](docs/V1beta1TrialParameterSpec.md) + - [V1beta1TrialSource](docs/V1beta1TrialSource.md) + - [V1beta1TrialSpec](docs/V1beta1TrialSpec.md) + - [V1beta1TrialStatus](docs/V1beta1TrialStatus.md) + - [V1beta1TrialTemplate](docs/V1beta1TrialTemplate.md) + + +## Documentation For Authorization + + All endpoints do not require authorization. + + +## Author + +prem0912 diff --git a/sdk/python/v1beta1/docs/KatibClient.md b/sdk/python/v1beta1/docs/KatibClient.md new file mode 100644 index 00000000000..e60ec667135 --- /dev/null +++ b/sdk/python/v1beta1/docs/KatibClient.md @@ -0,0 +1,135 @@ +# KatibClient + +> KatibClient(config_file=None, context=None, client_configuration=None, persist_config=True) + +User can loads authentication and cluster information from kube-config file and stores them in kubernetes.client.configuration. Parameters are as following: + +parameter | Description +------------ | ------------- +config_file | Location of kube-config file. Defaults to `~/.kube/config`. Note that the config_file is needed if user want to operate katib SDK in another remote cluster, user must set `config_file` to load kube-config file explicitly, e.g. `KatibClient(config_file="~/.kube/config")`. | +context |Set the active context. If is set to None, current_context from config file will be used.| +client_configuration | The kubernetes.client.Configuration to set configs to.| +persist_config | If True, config file will be updated when changed (e.g GCP token refresh).| + + +The APIs for KatibClient are as following: + +Class | Method | Description +------------ | ------------- | ------------- +KatibClient | [create_experiment](#create_experiment) | Create Katib Experiment| +KatibClient | [get_experiment](#get_experiment) | Get or watch the specified experiment or all experiments in the namespace | +KatibClient | [delete_experiment](#delete_experiment) | Delete specified experiment | +KatibClient | [list_experiments](#list_experiments) | List all experiments with status | +KatibClient | [get_experiment_status](#get_experiment_status) | Get experiment status| +KatibClient | [is_experiment_succeeded](#is_experiment_succeeded) | Check if experiment status is Succeeded | +KatibClient | [list_trials](#list_trials) | List all trials of specified experiment with status | +KatibClient | [get_optimal_hyperparmeters](#get_optimal_hyperparmeters) | Get currentOptimalTrial with paramaterAssignments of an experiment| + + + +## create_experiment +> create_experiment(experiment, namespace=None) + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +experiment | [V1alpha3Experiment](V1alpha3Experiment.md) | experiment definition| Required | +namespace | str | Namespace for experiment deploying to. If the `namespace` is not defined, will align with experiment definition, or use current or default namespace if namespace is not specified in experiment definition. | Optional | + +### Return type +object + +## get_experiment +> get_experiment(name=None, namespace=None) + +Get experiment in the specified namespace + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name. If the `name` is not specified, will get all experiments in the namespace.| Optional. | +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +object + +## delete_experiment +> delete_experiment(name, namespace=None) + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name.| Required | +namespace | str | Experiment's namespace. Defaults to current or default namespace. | Optional| + +### Return type +object + +## list_experiments +> list_experiments(namespace=None) + +List all experiment with status + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +List + +## get_experiment_status +> get_experiment_status(name, namespace=None) + +Returns experiment status, such as Running, Failed or Succeeded. + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name. | Required | +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +Str + +## is_experiment_succeeded +> is_experiment_succeeded(name, namespace=None) + +Returns True if Experiment succeeded; false otherwise. + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name.| Required | +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +Bool + +## list_trials +> list_trials(name, namespace=None) + +List all trials of an experiment with status + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name.| Required | +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +List + +## get_optimal_hyperparmeters +> get_optimal_hyperparmeters(name, namespace=None) + +Get currentOptimalTrial with paramaterAssignments of an experiment + +### Parameters +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +name | str | Experiment name.| Required | +namespace | str | Experiment's namespace. Defaults to current or default namespace.| Optional | + +### Return type +Dict diff --git a/sdk/python/v1beta1/docs/V1Time.md b/sdk/python/v1beta1/docs/V1Time.md new file mode 100644 index 00000000000..1bc6a022af6 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1Time.md @@ -0,0 +1,7 @@ +# V1Time + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1UnstructuredUnstructured.md b/sdk/python/v1beta1/docs/V1UnstructuredUnstructured.md new file mode 100644 index 00000000000..f02db67f502 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1UnstructuredUnstructured.md @@ -0,0 +1,7 @@ +# V1UnstructuredUnstructured + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md b/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md new file mode 100644 index 00000000000..c138f7abc0a --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md @@ -0,0 +1,11 @@ +# V1beta1AlgorithmSetting + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md b/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md new file mode 100644 index 00000000000..e9f2afd6431 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md @@ -0,0 +1,12 @@ +# V1beta1AlgorithmSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algorithm_name** | **str** | | [optional] +**algorithm_settings** | [**list[V1beta1AlgorithmSetting]**](V1beta1AlgorithmSetting.md) | Key-value pairs representing settings for suggestion algorithms. | [optional] +**early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md b/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md new file mode 100644 index 00000000000..8eb640d6606 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md @@ -0,0 +1,11 @@ +# V1beta1CollectorSpec + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md b/sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md new file mode 100644 index 00000000000..8aa1bbc4a31 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md @@ -0,0 +1,12 @@ +# V1beta1ConfigMapSource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_map_name** | **str** | Name of config map where trial template is located | [optional] +**config_map_namespace** | **str** | Namespace of config map where trial template is located | [optional] +**template_path** | **str** | Path in config map where trial template is located | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md new file mode 100644 index 00000000000..b897bc11293 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md @@ -0,0 +1,11 @@ +# V1beta1EarlyStoppingSetting + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md new file mode 100644 index 00000000000..d70f7fd967c --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md @@ -0,0 +1,11 @@ +# V1beta1EarlyStoppingSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**early_stopping_algorithm_name** | **str** | | [optional] +**early_stopping_settings** | [**list[V1beta1EarlyStoppingSetting]**](V1beta1EarlyStoppingSetting.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Experiment.md b/sdk/python/v1beta1/docs/V1beta1Experiment.md new file mode 100644 index 00000000000..1a481de0d66 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Experiment.md @@ -0,0 +1,14 @@ +# V1beta1Experiment + +## 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** | [**V1beta1ExperimentSpec**](V1beta1ExperimentSpec.md) | | [optional] +**status** | [**V1beta1ExperimentStatus**](V1beta1ExperimentStatus.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md new file mode 100644 index 00000000000..d1aae13adc8 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md @@ -0,0 +1,15 @@ +# V1beta1ExperimentCondition + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentList.md b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md new file mode 100644 index 00000000000..ba1ffb6a002 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md @@ -0,0 +1,13 @@ +# V1beta1ExperimentList + +## 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[V1beta1Experiment]**](V1beta1Experiment.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md b/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md new file mode 100644 index 00000000000..b9a1db28392 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md @@ -0,0 +1,19 @@ +# V1beta1ExperimentSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.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** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | Describes the specification of the metrics collector | [optional] +**nas_config** | [**V1beta1NasConfig**](V1beta1NasConfig.md) | | [optional] +**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.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[V1beta1ParameterSpec]**](V1beta1ParameterSpec.md) | List of hyperparameter configurations. | [optional] +**resume_policy** | **str** | Describes resuming policy which usually take effect after experiment terminated. | [optional] +**trial_template** | [**V1beta1TrialTemplate**](V1beta1TrialTemplate.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md new file mode 100644 index 00000000000..cf9ee58714d --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md @@ -0,0 +1,25 @@ +# V1beta1ExperimentStatus + +## 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[V1beta1ExperimentCondition]**](V1beta1ExperimentCondition.md) | List of observed runtime conditions for this Experiment. | [optional] +**current_optimal_trial** | [**V1beta1OptimalTrial**](V1beta1OptimalTrial.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1FeasibleSpace.md b/sdk/python/v1beta1/docs/V1beta1FeasibleSpace.md new file mode 100644 index 00000000000..e30d6292d7f --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1FeasibleSpace.md @@ -0,0 +1,13 @@ +# V1beta1FeasibleSpace + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1FileSystemPath.md b/sdk/python/v1beta1/docs/V1beta1FileSystemPath.md new file mode 100644 index 00000000000..08daa66d584 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1FileSystemPath.md @@ -0,0 +1,11 @@ +# V1beta1FileSystemPath + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1FilterSpec.md b/sdk/python/v1beta1/docs/V1beta1FilterSpec.md new file mode 100644 index 00000000000..e403bfbf55a --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1FilterSpec.md @@ -0,0 +1,10 @@ +# V1beta1FilterSpec + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1GraphConfig.md b/sdk/python/v1beta1/docs/V1beta1GraphConfig.md new file mode 100644 index 00000000000..7bfbaa074f9 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1GraphConfig.md @@ -0,0 +1,12 @@ +# V1beta1GraphConfig + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Metric.md b/sdk/python/v1beta1/docs/V1beta1Metric.md new file mode 100644 index 00000000000..850e80d0abf --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Metric.md @@ -0,0 +1,13 @@ +# V1beta1Metric + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**latest** | **str** | | [optional] +**max** | **str** | | [optional] +**min** | **str** | | [optional] +**name** | **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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1MetricStrategy.md b/sdk/python/v1beta1/docs/V1beta1MetricStrategy.md new file mode 100644 index 00000000000..a999fcbebd0 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1MetricStrategy.md @@ -0,0 +1,11 @@ +# V1beta1MetricStrategy + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1MetricsCollectorSpec.md b/sdk/python/v1beta1/docs/V1beta1MetricsCollectorSpec.md new file mode 100644 index 00000000000..5946f76f7a6 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1MetricsCollectorSpec.md @@ -0,0 +1,11 @@ +# V1beta1MetricsCollectorSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**collector** | [**V1beta1CollectorSpec**](V1beta1CollectorSpec.md) | | [optional] +**source** | [**V1beta1SourceSpec**](V1beta1SourceSpec.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1NasConfig.md b/sdk/python/v1beta1/docs/V1beta1NasConfig.md new file mode 100644 index 00000000000..c517002476b --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1NasConfig.md @@ -0,0 +1,11 @@ +# V1beta1NasConfig + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**graph_config** | [**V1beta1GraphConfig**](V1beta1GraphConfig.md) | | [optional] +**operations** | [**list[V1beta1Operation]**](V1beta1Operation.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md b/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md new file mode 100644 index 00000000000..dacca545b32 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md @@ -0,0 +1,14 @@ +# V1beta1ObjectiveSpec + +## 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] +**metric_strategies** | [**list[V1beta1MetricStrategy]**](V1beta1MetricStrategy.md) | This field is allowed to missing, experiment defaulter (webhook) will fill it. | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Observation.md b/sdk/python/v1beta1/docs/V1beta1Observation.md new file mode 100644 index 00000000000..7c6144cb335 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Observation.md @@ -0,0 +1,10 @@ +# V1beta1Observation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metrics** | [**list[V1beta1Metric]**](V1beta1Metric.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Operation.md b/sdk/python/v1beta1/docs/V1beta1Operation.md new file mode 100644 index 00000000000..7662e8cc137 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Operation.md @@ -0,0 +1,11 @@ +# V1beta1Operation + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operation_type** | **str** | | [optional] +**parameters** | [**list[V1beta1ParameterSpec]**](V1beta1ParameterSpec.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md b/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md new file mode 100644 index 00000000000..7e8fb84e7a6 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md @@ -0,0 +1,12 @@ +# V1beta1OptimalTrial + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**best_trial_name** | **str** | BestTrialName is the name of the best trial. | +**observation** | [**V1beta1Observation**](V1beta1Observation.md) | Observation for this trial | [optional] +**parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ParameterAssignment.md b/sdk/python/v1beta1/docs/V1beta1ParameterAssignment.md new file mode 100644 index 00000000000..8875b61e858 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ParameterAssignment.md @@ -0,0 +1,11 @@ +# V1beta1ParameterAssignment + +## 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1ParameterSpec.md b/sdk/python/v1beta1/docs/V1beta1ParameterSpec.md new file mode 100644 index 00000000000..9796b653218 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1ParameterSpec.md @@ -0,0 +1,12 @@ +# V1beta1ParameterSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**feasible_space** | [**V1beta1FeasibleSpace**](V1beta1FeasibleSpace.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1SourceSpec.md b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md new file mode 100644 index 00000000000..42f42acbf20 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md @@ -0,0 +1,12 @@ +# V1beta1SourceSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**file_system_path** | [**V1beta1FileSystemPath**](V1beta1FileSystemPath.md) | During training model, metrics may be persisted into local file in source code, such as tfEvent use case | [optional] +**filter** | [**V1beta1FilterSpec**](V1beta1FilterSpec.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Suggestion.md b/sdk/python/v1beta1/docs/V1beta1Suggestion.md new file mode 100644 index 00000000000..86aa2c3fb67 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Suggestion.md @@ -0,0 +1,14 @@ +# V1beta1Suggestion + +## 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** | [**V1beta1SuggestionSpec**](V1beta1SuggestionSpec.md) | | [optional] +**status** | [**V1beta1SuggestionStatus**](V1beta1SuggestionStatus.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md new file mode 100644 index 00000000000..e1505908738 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md @@ -0,0 +1,15 @@ +# V1beta1SuggestionCondition + +## 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 Suggestion 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionList.md b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md new file mode 100644 index 00000000000..34df986abb7 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md @@ -0,0 +1,13 @@ +# V1beta1SuggestionList + +## 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[V1beta1Suggestion]**](V1beta1Suggestion.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md b/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md new file mode 100644 index 00000000000..708d46f868c --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md @@ -0,0 +1,11 @@ +# V1beta1SuggestionSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algorithm_name** | **str** | | +**requests** | **int** | Number of suggestions requested | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md new file mode 100644 index 00000000000..c7bc95e7b0e --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md @@ -0,0 +1,16 @@ +# V1beta1SuggestionStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**algorithm_settings** | [**list[V1beta1AlgorithmSetting]**](V1beta1AlgorithmSetting.md) | Algorithmsettings set by the algorithm services. | [optional] +**completion_time** | [**V1Time**](V1Time.md) | Represents time when the Suggestion 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[V1beta1SuggestionCondition]**](V1beta1SuggestionCondition.md) | List of observed runtime conditions for this Suggestion. | [optional] +**last_reconcile_time** | [**V1Time**](V1Time.md) | Represents last time when the Suggestion 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] +**start_time** | [**V1Time**](V1Time.md) | Represents time when the Suggestion was acknowledged by the Suggestion 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] +**suggestion_count** | **int** | Number of suggestion results | [optional] +**suggestions** | [**list[V1beta1TrialAssignment]**](V1beta1TrialAssignment.md) | Suggestion results | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1Trial.md b/sdk/python/v1beta1/docs/V1beta1Trial.md new file mode 100644 index 00000000000..2695b930ca0 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1Trial.md @@ -0,0 +1,14 @@ +# V1beta1Trial + +## 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** | [**V1beta1TrialSpec**](V1beta1TrialSpec.md) | | [optional] +**status** | [**V1beta1TrialStatus**](V1beta1TrialStatus.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md b/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md new file mode 100644 index 00000000000..369b2024eca --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md @@ -0,0 +1,11 @@ +# V1beta1TrialAssignment + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**name** | **str** | Name of the suggestion | [optional] +**parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Suggestion results | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialCondition.md b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md new file mode 100644 index 00000000000..5bb504ca331 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md @@ -0,0 +1,15 @@ +# V1beta1TrialCondition + +## 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 trial 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialList.md b/sdk/python/v1beta1/docs/V1beta1TrialList.md new file mode 100644 index 00000000000..383008b87fe --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialList.md @@ -0,0 +1,13 @@ +# V1beta1TrialList + +## 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[V1beta1Trial]**](V1beta1Trial.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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md b/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md new file mode 100644 index 00000000000..ebd3db051bd --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md @@ -0,0 +1,12 @@ +# V1beta1TrialParameterSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**description** | **str** | Description of the parameter | [optional] +**name** | **str** | Name of the parameter that must be replaced in trial template | [optional] +**reference** | **str** | Reference to the parameter in search space | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialSource.md b/sdk/python/v1beta1/docs/V1beta1TrialSource.md new file mode 100644 index 00000000000..ea9206332c8 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialSource.md @@ -0,0 +1,11 @@ +# V1beta1TrialSource + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | ConfigMap spec represents a reference to ConfigMap | [optional] +**trial_spec** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | TrialSpec represents trial template in unstructured 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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialSpec.md b/sdk/python/v1beta1/docs/V1beta1TrialSpec.md new file mode 100644 index 00000000000..77a34a1a577 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialSpec.md @@ -0,0 +1,14 @@ +# V1beta1TrialSpec + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**metrics_collector** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | Describes how metrics will be collected | [optional] +**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | Describes the objective of the experiment. | [optional] +**parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Key-value pairs for hyperparameters and assignment values. | +**retain_run** | **bool** | Whether to retain the trial run object after completed. | [optional] +**run_spec** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. | [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) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialStatus.md b/sdk/python/v1beta1/docs/V1beta1TrialStatus.md new file mode 100644 index 00000000000..42f9f94eef2 --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialStatus.md @@ -0,0 +1,14 @@ +# V1beta1TrialStatus + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**completion_time** | [**V1Time**](V1Time.md) | Represents time when the Trial 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[V1beta1TrialCondition]**](V1beta1TrialCondition.md) | List of observed runtime conditions for this Trial. | [optional] +**last_reconcile_time** | [**V1Time**](V1Time.md) | Represents last time when the Trial 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] +**observation** | [**V1beta1Observation**](V1beta1Observation.md) | Results of the Trial - objectives and other metrics values. | [optional] +**start_time** | [**V1Time**](V1Time.md) | Represents time when the Trial was acknowledged by the Trial 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] + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md b/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md new file mode 100644 index 00000000000..18d2499b37a --- /dev/null +++ b/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md @@ -0,0 +1,13 @@ +# V1beta1TrialTemplate + +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | ConfigMap spec represents a reference to ConfigMap | [optional] +**retain** | **bool** | Retain indicates that trial resources must be not cleanup | [optional] +**trial_parameters** | [**list[V1beta1TrialParameterSpec]**](V1beta1TrialParameterSpec.md) | List of parameters that are used in trial template | [optional] +**trial_spec** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | TrialSpec represents trial template in unstructured 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) + + diff --git a/sdk/python/v1beta1/kubeflow/__init__.py b/sdk/python/v1beta1/kubeflow/__init__.py new file mode 100644 index 00000000000..69e3be50dac --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/__init__.py @@ -0,0 +1 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__) diff --git a/sdk/python/v1beta1/kubeflow/katib/__init__.py b/sdk/python/v1beta1/kubeflow/katib/__init__.py new file mode 100644 index 00000000000..95c8aabac99 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/__init__.py @@ -0,0 +1,63 @@ +# coding: utf-8 + +# flake8: noqa + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import apis into sdk package + +# import ApiClient +from kubeflow.katib.api_client import ApiClient +from kubeflow.katib.configuration import Configuration +# import models into sdk package +from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting +from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec +from kubeflow.katib.models.v1beta1_collector_spec import V1beta1CollectorSpec +from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource +from kubeflow.katib.models.v1beta1_early_stopping_setting import V1beta1EarlyStoppingSetting +from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec +from kubeflow.katib.models.v1beta1_experiment import V1beta1Experiment +from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition +from kubeflow.katib.models.v1beta1_experiment_list import V1beta1ExperimentList +from kubeflow.katib.models.v1beta1_experiment_spec import V1beta1ExperimentSpec +from kubeflow.katib.models.v1beta1_experiment_status import V1beta1ExperimentStatus +from kubeflow.katib.models.v1beta1_feasible_space import V1beta1FeasibleSpace +from kubeflow.katib.models.v1beta1_file_system_path import V1beta1FileSystemPath +from kubeflow.katib.models.v1beta1_filter_spec import V1beta1FilterSpec +from kubeflow.katib.models.v1beta1_graph_config import V1beta1GraphConfig +from kubeflow.katib.models.v1beta1_metric import V1beta1Metric +from kubeflow.katib.models.v1beta1_metric_strategy import V1beta1MetricStrategy +from kubeflow.katib.models.v1beta1_metrics_collector_spec import V1beta1MetricsCollectorSpec +from kubeflow.katib.models.v1beta1_nas_config import V1beta1NasConfig +from kubeflow.katib.models.v1beta1_objective_spec import V1beta1ObjectiveSpec +from kubeflow.katib.models.v1beta1_observation import V1beta1Observation +from kubeflow.katib.models.v1beta1_operation import V1beta1Operation +from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment +from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec +from kubeflow.katib.models.v1beta1_source_spec import V1beta1SourceSpec +from kubeflow.katib.models.v1beta1_suggestion import V1beta1Suggestion +from kubeflow.katib.models.v1beta1_suggestion_condition import V1beta1SuggestionCondition +from kubeflow.katib.models.v1beta1_suggestion_list import V1beta1SuggestionList +from kubeflow.katib.models.v1beta1_suggestion_spec import V1beta1SuggestionSpec +from kubeflow.katib.models.v1beta1_suggestion_status import V1beta1SuggestionStatus +from kubeflow.katib.models.v1beta1_trial import V1beta1Trial +from kubeflow.katib.models.v1beta1_trial_assignment import V1beta1TrialAssignment +from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition +from kubeflow.katib.models.v1beta1_trial_list import V1beta1TrialList +from kubeflow.katib.models.v1beta1_trial_parameter_spec import V1beta1TrialParameterSpec +from kubeflow.katib.models.v1beta1_trial_source import V1beta1TrialSource +from kubeflow.katib.models.v1beta1_trial_spec import V1beta1TrialSpec +from kubeflow.katib.models.v1beta1_trial_status import V1beta1TrialStatus +from kubeflow.katib.models.v1beta1_trial_template import V1beta1TrialTemplate diff --git a/sdk/python/v1beta1/kubeflow/katib/api/__init__.py b/sdk/python/v1beta1/kubeflow/katib/api/__init__.py new file mode 100644 index 00000000000..36dce7fe221 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/api/__init__.py @@ -0,0 +1,5 @@ +from __future__ import absolute_import + +# flake8: noqa + +# import apis into api package diff --git a/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py new file mode 100644 index 00000000000..3dc95bff00f --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/api/katib_client.py @@ -0,0 +1,290 @@ +# Copyright 2019 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 +# +# 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. +import multiprocessing +import time + +from kubernetes import client, config + +from kubeflow.katib.constants import constants +from kubeflow.katib.utils import utils + + +class KatibClient(object): + + def __init__(self, config_file=None, context=None, # pylint: disable=too-many-arguments + client_configuration=None, persist_config=True): + """ + katibclient constructor + :param config_file: kubeconfig file, defaults to ~/.kube/config + :param context: kubernetes context + :param client_configuration: kubernetes configuration object + :param persist_config: + """ + self.in_cluster = None + if config_file or not utils.is_running_in_k8s(): + config.load_kube_config( + config_file=config_file, + context=context, + client_configuration=client_configuration, + persist_config=persist_config) + self.in_cluster = False + else: + config.load_incluster_config() + self.in_cluster = True + + self.api_instance = client.CustomObjectsApi() + + def _is_ipython(self): + """Returns whether we are running in notebook.""" + try: + import IPython + ipy = IPython.get_ipython() + if ipy is None: + return False + except ImportError: + return False + return True + + def create_experiment(self, exp_object, namespace=None): + """ + Create the katib experiment + :param exp_object: experiment object + :param namespace: defaults to current or default namespace + :return: created experiment dict + """ + + if namespace is None: + namespace = utils.set_katib_namespace(exp_object) + try: + outputs = self.api_instance.create_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace, + constants.EXPERIMENT_PLURAL, + exp_object) + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->create_namespaced_custom_object:\ + %s\n" % e) + + if self._is_ipython(): + if self.in_cluster: + import IPython + html = \ + ('Katib Experiment link here' + % (namespace, exp_object.metadata.name)) + IPython.display.display(IPython.display.HTML(html)) + self.in_cluster = None + return outputs + + def get_experiment(self, name=None, namespace=None): + """ + Get single experiment or all experiment + :param name: existing experiment name optional + :param namespace: defaults to current or default namespace + :return: experiment dict + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + if name: + thread = self.api_instance.get_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace, + constants.EXPERIMENT_PLURAL, + name, + async_req=True) + + katibexp = None + try: + katibexp = thread.get(constants.APISERVER_TIMEOUT) + except multiprocessing.TimeoutError: + raise RuntimeError("Timeout trying to get katib experiment.") + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->get_namespaced_custom_object:\ + %s\n" % e) + except Exception as e: + raise RuntimeError( + "There was a problem to get experiment {0} in namespace {1}. Exception: \ + {2} ".format(name, namespace, e)) + + else: + thread = self.api_instance.list_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace, + constants.EXPERIMENT_PLURAL, + async_req=True) + + katibexp = None + try: + katibexp = thread.get(constants.APISERVER_TIMEOUT) + except multiprocessing.TimeoutError: + raise RuntimeError("Timeout trying to get Experiment.") + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->list_namespaced_custom_object:\ + %s\n" % e) + except Exception as e: + raise RuntimeError( + "There was a problem to get experiment in namespace {0}. \ + Exception: {1} ".format(namespace, e)) + + return katibexp + + def delete_experiment(self, name, namespace=None): + """ + Delete experiment + :param name: experiment name required + :param namespace: defaults to current or default namespace + :return: status dict + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + try: + return self.api_instance.delete_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace, + constants.EXPERIMENT_PLURAL, + name, + body=client.V1DeleteOptions()) + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->delete_namespaced_custom_object:\ + %s\n" % e) + + def list_experiments(self, namespace=None): + """ + List all experiments + :param namespace: defaults to current or default namespace + :return: list of experiment name with status as list + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + thread = self.api_instance.list_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace=namespace, + plural=constants.EXPERIMENT_PLURAL, + async_req=True) + + katibexp = None + try: + katibexp = thread.get(constants.APISERVER_TIMEOUT) + result = [] + for i in katibexp.get("items"): + output = {} + output["name"] = i.get("metadata", {}).get("name") + output["status"] = i.get("status", {}).get( + "conditions", [])[-1].get("type") + result.append(output) + except multiprocessing.TimeoutError: + raise RuntimeError("Timeout trying to get katib experiment.") + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->get_namespaced_custom_object:\ + %s\n" % e) + except Exception as e: + raise RuntimeError( + "There was a problem to get experiment {0} in namespace {1}. Exception: \ + {2} ".format(name, namespace, e)) + return result + + def get_experiment_status(self, name, namespace=None): + """Returns experiment status, such as Running, Failed or Succeeded. + Args: + :param name: An experiment name. required + :param namespace: defaults to current or default namespace. + :return: status str + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + katibexp = self.get_experiment(name, namespace=namespace) + last_condition = katibexp.get("status", {}).get("conditions", [])[-1] + return last_condition.get("type", "") + + def is_experiment_succeeded(self, name, namespace=None): + """Returns true if experiment succeeded; false otherwise. + Args: + :param name: An experiment name. required + :param namespace: defaults to current or default namespace. optional + :return: status bool + """ + experiment_status = self.get_experiment_status( + name, namespace=namespace) + return experiment_status.lower() == "succeeded" + + def list_trials(self, name=None, namespace=None): + """ + Get trials of an experiment + :param name: existing experiment name + :param namespace: defaults to current or default namespace + :return: trials name with status as list + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + thread = self.api_instance.list_namespaced_custom_object( + constants.EXPERIMENT_GROUP, + constants.EXPERIMENT_VERSION, + namespace=namespace, + plural=constants.TRIAL_PLURAL, + async_req=True) + + katibtrial = None + try: + katibtrial = thread.get(constants.APISERVER_TIMEOUT) + result = [] + for i in katibtrial.get("items"): + output = {} + if i.get("metadata", {}).get("ownerReferences")[0].get("name") == name: + output["name"] = i.get("metadata", {}).get("name") + output["status"] = i.get("status", {}).get( + "conditions", [])[-1].get("type") + result.append(output) + except multiprocessing.TimeoutError: + raise RuntimeError("Timeout trying to getkatib experiment.") + except client.rest.ApiException as e: + raise RuntimeError( + "Exception when calling CustomObjectsApi->get_namespaced_custom_object:\ + %s\n" % e) + except Exception as e: + raise RuntimeError( + "There was a problem to get experiment {0} in namespace {1}. Exception: \ + {2} ".format(name, namespace, e)) + return result + + def get_optimal_hyperparmeters(self, name=None, namespace=None): + """ + Get status, currentOptimalTrial with paramaterAssignments + :param name: existing experiment name + :param namespace: defaults to current or default namespace + :return: dict with status, currentOptimalTrial with paramaterAssignments of an experiment + """ + if namespace is None: + namespace = utils.get_default_target_namespace() + + katibexp = self.get_experiment(name, namespace=namespace) + result = {} + result["currentOptimalTrial"] = katibexp.get( + "status", {}).get("currentOptimalTrial") + + return result + diff --git a/sdk/python/kubeflow/katib/api_client.py b/sdk/python/v1beta1/kubeflow/katib/api_client.py similarity index 99% rename from sdk/python/kubeflow/katib/api_client.py rename to sdk/python/v1beta1/kubeflow/katib/api_client.py index 8c48ddbddd6..01194d8c25f 100644 --- a/sdk/python/kubeflow/katib/api_client.py +++ b/sdk/python/v1beta1/kubeflow/katib/api_client.py @@ -1,10 +1,10 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1beta1-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -74,7 +74,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'Swagger-Codegen/0.0.1/python' + self.user_agent = 'Swagger-Codegen/0.1/python' def __del__(self): if self._pool is not None: diff --git a/sdk/python/kubeflow/katib/configuration.py b/sdk/python/v1beta1/kubeflow/katib/configuration.py similarity index 97% rename from sdk/python/kubeflow/katib/configuration.py rename to sdk/python/v1beta1/kubeflow/katib/configuration.py index 6afecca91b0..81b58392a54 100644 --- a/sdk/python/kubeflow/katib/configuration.py +++ b/sdk/python/v1beta1/kubeflow/katib/configuration.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1beta1-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ @@ -232,6 +232,6 @@ def to_debug_report(self): return "Python SDK Debug Report:\n"\ "OS: {env}\n"\ "Python Version: {pyversion}\n"\ - "Version of the API: v0.1\n"\ - "SDK Package Version: 0.0.1".\ + "Version of the API: v1beta1-0.1\n"\ + "SDK Package Version: 0.1".\ format(env=sys.platform, pyversion=sys.version) diff --git a/sdk/python/v1beta1/kubeflow/katib/constants/__init__.py b/sdk/python/v1beta1/kubeflow/katib/constants/__init__.py new file mode 100644 index 00000000000..ede60a09abd --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/constants/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 kubeflow.org. +# +# 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 +# +# 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. diff --git a/sdk/python/v1beta1/kubeflow/katib/constants/constants.py b/sdk/python/v1beta1/kubeflow/katib/constants/constants.py new file mode 100644 index 00000000000..0a1095231dc --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/constants/constants.py @@ -0,0 +1,29 @@ +# Copyright 2019 kubeflow.org. +# +# 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 +# +# 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. + +import os + +# Katib K8S constants +EXPERIMENT_GROUP = 'kubeflow.org' +EXPERIMENT_KIND = 'experiment' +EXPERIMENT_PLURAL = 'experiments' +EXPERIMENT_VERSION = os.environ.get('EXPERIMENT_VERSION', 'v1beta1') +EXPERIMENT_LOGLEVEL = os.environ.get('EXPERIMENT_LOGLEVEL', 'INFO').upper() + +TRIAL_KIND = 'trial' +TRIAL_PLURAL = 'trials' +TRIAL_VERSION = os.environ.get('EXPERIMENT_VERSION', 'v1beta1') + +# How long to wait in seconds for requests to the ApiServer +APISERVER_TIMEOUT = 120 diff --git a/sdk/python/v1beta1/kubeflow/katib/models/__init__.py b/sdk/python/v1beta1/kubeflow/katib/models/__init__.py new file mode 100644 index 00000000000..56c7912bb57 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/__init__.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +# flake8: noqa +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +# import models into model package +from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting +from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec +from kubeflow.katib.models.v1beta1_collector_spec import V1beta1CollectorSpec +from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource +from kubeflow.katib.models.v1beta1_early_stopping_setting import V1beta1EarlyStoppingSetting +from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec +from kubeflow.katib.models.v1beta1_experiment import V1beta1Experiment +from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition +from kubeflow.katib.models.v1beta1_experiment_list import V1beta1ExperimentList +from kubeflow.katib.models.v1beta1_experiment_spec import V1beta1ExperimentSpec +from kubeflow.katib.models.v1beta1_experiment_status import V1beta1ExperimentStatus +from kubeflow.katib.models.v1beta1_feasible_space import V1beta1FeasibleSpace +from kubeflow.katib.models.v1beta1_file_system_path import V1beta1FileSystemPath +from kubeflow.katib.models.v1beta1_filter_spec import V1beta1FilterSpec +from kubeflow.katib.models.v1beta1_graph_config import V1beta1GraphConfig +from kubeflow.katib.models.v1beta1_metric import V1beta1Metric +from kubeflow.katib.models.v1beta1_metric_strategy import V1beta1MetricStrategy +from kubeflow.katib.models.v1beta1_metrics_collector_spec import V1beta1MetricsCollectorSpec +from kubeflow.katib.models.v1beta1_nas_config import V1beta1NasConfig +from kubeflow.katib.models.v1beta1_objective_spec import V1beta1ObjectiveSpec +from kubeflow.katib.models.v1beta1_observation import V1beta1Observation +from kubeflow.katib.models.v1beta1_operation import V1beta1Operation +from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment +from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec +from kubeflow.katib.models.v1beta1_source_spec import V1beta1SourceSpec +from kubeflow.katib.models.v1beta1_suggestion import V1beta1Suggestion +from kubeflow.katib.models.v1beta1_suggestion_condition import V1beta1SuggestionCondition +from kubeflow.katib.models.v1beta1_suggestion_list import V1beta1SuggestionList +from kubeflow.katib.models.v1beta1_suggestion_spec import V1beta1SuggestionSpec +from kubeflow.katib.models.v1beta1_suggestion_status import V1beta1SuggestionStatus +from kubeflow.katib.models.v1beta1_trial import V1beta1Trial +from kubeflow.katib.models.v1beta1_trial_assignment import V1beta1TrialAssignment +from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition +from kubeflow.katib.models.v1beta1_trial_list import V1beta1TrialList +from kubeflow.katib.models.v1beta1_trial_parameter_spec import V1beta1TrialParameterSpec +from kubeflow.katib.models.v1beta1_trial_source import V1beta1TrialSource +from kubeflow.katib.models.v1beta1_trial_spec import V1beta1TrialSpec +from kubeflow.katib.models.v1beta1_trial_status import V1beta1TrialStatus +from kubeflow.katib.models.v1beta1_trial_template import V1beta1TrialTemplate diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1_time.py b/sdk/python/v1beta1/kubeflow/katib/models/v1_time.py new file mode 100644 index 00000000000..cabbec802af --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1_time.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1Time(object): + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1Time - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1Time, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1Time): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1_unstructured_unstructured.py b/sdk/python/v1beta1/kubeflow/katib/models/v1_unstructured_unstructured.py new file mode 100644 index 00000000000..ae39cdc5dc8 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1_unstructured_unstructured.py @@ -0,0 +1,86 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1UnstructuredUnstructured(object): + """NOTE: This class is auto generated by the swagger code generator program. + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + } + + attribute_map = { + } + + def __init__(self): # noqa: E501 + """V1UnstructuredUnstructured - a model defined in Swagger""" # noqa: E501 + self.discriminator = None + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1UnstructuredUnstructured, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1UnstructuredUnstructured): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py new file mode 100644 index 00000000000..560011c4b89 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1AlgorithmSetting(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """V1beta1AlgorithmSetting - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1AlgorithmSetting. # noqa: E501 + + + :return: The name of this V1beta1AlgorithmSetting. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1AlgorithmSetting. + + + :param name: The name of this V1beta1AlgorithmSetting. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1AlgorithmSetting. # noqa: E501 + + + :return: The value of this V1beta1AlgorithmSetting. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1AlgorithmSetting. + + + :param value: The value of this V1beta1AlgorithmSetting. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1AlgorithmSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1AlgorithmSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py new file mode 100644 index 00000000000..cb7f438f698 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py @@ -0,0 +1,172 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec # noqa: F401,E501 + + +class V1beta1AlgorithmSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'algorithm_name': 'str', + 'algorithm_settings': 'list[V1beta1AlgorithmSetting]', + 'early_stopping': 'V1beta1EarlyStoppingSpec' + } + + attribute_map = { + 'algorithm_name': 'algorithmName', + 'algorithm_settings': 'algorithmSettings', + 'early_stopping': 'earlyStopping' + } + + def __init__(self, algorithm_name=None, algorithm_settings=None, early_stopping=None): # noqa: E501 + """V1beta1AlgorithmSpec - a model defined in Swagger""" # noqa: E501 + + self._algorithm_name = None + self._algorithm_settings = None + self._early_stopping = None + self.discriminator = None + + if algorithm_name is not None: + self.algorithm_name = algorithm_name + if algorithm_settings is not None: + self.algorithm_settings = algorithm_settings + if early_stopping is not None: + self.early_stopping = early_stopping + + @property + def algorithm_name(self): + """Gets the algorithm_name of this V1beta1AlgorithmSpec. # noqa: E501 + + + :return: The algorithm_name of this V1beta1AlgorithmSpec. # noqa: E501 + :rtype: str + """ + return self._algorithm_name + + @algorithm_name.setter + def algorithm_name(self, algorithm_name): + """Sets the algorithm_name of this V1beta1AlgorithmSpec. + + + :param algorithm_name: The algorithm_name of this V1beta1AlgorithmSpec. # noqa: E501 + :type: str + """ + + self._algorithm_name = algorithm_name + + @property + def algorithm_settings(self): + """Gets the algorithm_settings of this V1beta1AlgorithmSpec. # noqa: E501 + + Key-value pairs representing settings for suggestion algorithms. # noqa: E501 + + :return: The algorithm_settings of this V1beta1AlgorithmSpec. # noqa: E501 + :rtype: list[V1beta1AlgorithmSetting] + """ + return self._algorithm_settings + + @algorithm_settings.setter + def algorithm_settings(self, algorithm_settings): + """Sets the algorithm_settings of this V1beta1AlgorithmSpec. + + Key-value pairs representing settings for suggestion algorithms. # noqa: E501 + + :param algorithm_settings: The algorithm_settings of this V1beta1AlgorithmSpec. # noqa: E501 + :type: list[V1beta1AlgorithmSetting] + """ + + self._algorithm_settings = algorithm_settings + + @property + def early_stopping(self): + """Gets the early_stopping of this V1beta1AlgorithmSpec. # noqa: E501 + + + :return: The early_stopping of this V1beta1AlgorithmSpec. # noqa: E501 + :rtype: V1beta1EarlyStoppingSpec + """ + return self._early_stopping + + @early_stopping.setter + def early_stopping(self, early_stopping): + """Sets the early_stopping of this V1beta1AlgorithmSpec. + + + :param early_stopping: The early_stopping of this V1beta1AlgorithmSpec. # noqa: E501 + :type: V1beta1EarlyStoppingSpec + """ + + self._early_stopping = early_stopping + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1AlgorithmSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1AlgorithmSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py new file mode 100644 index 00000000000..399bebde1e9 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py @@ -0,0 +1,146 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubernetes.client import V1Container # noqa: F401,E501 + + +class V1beta1CollectorSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'custom_collector': 'V1Container', + 'kind': 'str' + } + + attribute_map = { + 'custom_collector': 'customCollector', + 'kind': 'kind' + } + + def __init__(self, custom_collector=None, kind=None): # noqa: E501 + """V1beta1CollectorSpec - a model defined in Swagger""" # noqa: E501 + + self._custom_collector = None + self._kind = None + self.discriminator = None + + if custom_collector is not None: + self.custom_collector = custom_collector + self.kind = kind + + @property + def custom_collector(self): + """Gets the custom_collector of this V1beta1CollectorSpec. # noqa: E501 + + When kind is \"customCollector\", this field will be used # noqa: E501 + + :return: The custom_collector of this V1beta1CollectorSpec. # noqa: E501 + :rtype: V1Container + """ + return self._custom_collector + + @custom_collector.setter + def custom_collector(self, custom_collector): + """Sets the custom_collector of this V1beta1CollectorSpec. + + When kind is \"customCollector\", this field will be used # noqa: E501 + + :param custom_collector: The custom_collector of this V1beta1CollectorSpec. # noqa: E501 + :type: V1Container + """ + + self._custom_collector = custom_collector + + @property + def kind(self): + """Gets the kind of this V1beta1CollectorSpec. # noqa: E501 + + + :return: The kind of this V1beta1CollectorSpec. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1CollectorSpec. + + + :param kind: The kind of this V1beta1CollectorSpec. # noqa: E501 + :type: str + """ + if kind is None: + raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 + + self._kind = kind + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1CollectorSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1CollectorSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_config_map_source.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_config_map_source.py new file mode 100644 index 00000000000..01fbb0857af --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_config_map_source.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1ConfigMapSource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'config_map_name': 'str', + 'config_map_namespace': 'str', + 'template_path': 'str' + } + + attribute_map = { + 'config_map_name': 'configMapName', + 'config_map_namespace': 'configMapNamespace', + 'template_path': 'templatePath' + } + + def __init__(self, config_map_name=None, config_map_namespace=None, template_path=None): # noqa: E501 + """V1beta1ConfigMapSource - a model defined in Swagger""" # noqa: E501 + + self._config_map_name = None + self._config_map_namespace = None + self._template_path = None + self.discriminator = None + + if config_map_name is not None: + self.config_map_name = config_map_name + if config_map_namespace is not None: + self.config_map_namespace = config_map_namespace + if template_path is not None: + self.template_path = template_path + + @property + def config_map_name(self): + """Gets the config_map_name of this V1beta1ConfigMapSource. # noqa: E501 + + Name of config map where trial template is located # noqa: E501 + + :return: The config_map_name of this V1beta1ConfigMapSource. # noqa: E501 + :rtype: str + """ + return self._config_map_name + + @config_map_name.setter + def config_map_name(self, config_map_name): + """Sets the config_map_name of this V1beta1ConfigMapSource. + + Name of config map where trial template is located # noqa: E501 + + :param config_map_name: The config_map_name of this V1beta1ConfigMapSource. # noqa: E501 + :type: str + """ + + self._config_map_name = config_map_name + + @property + def config_map_namespace(self): + """Gets the config_map_namespace of this V1beta1ConfigMapSource. # noqa: E501 + + Namespace of config map where trial template is located # noqa: E501 + + :return: The config_map_namespace of this V1beta1ConfigMapSource. # noqa: E501 + :rtype: str + """ + return self._config_map_namespace + + @config_map_namespace.setter + def config_map_namespace(self, config_map_namespace): + """Sets the config_map_namespace of this V1beta1ConfigMapSource. + + Namespace of config map where trial template is located # noqa: E501 + + :param config_map_namespace: The config_map_namespace of this V1beta1ConfigMapSource. # noqa: E501 + :type: str + """ + + self._config_map_namespace = config_map_namespace + + @property + def template_path(self): + """Gets the template_path of this V1beta1ConfigMapSource. # noqa: E501 + + Path in config map where trial template is located # noqa: E501 + + :return: The template_path of this V1beta1ConfigMapSource. # noqa: E501 + :rtype: str + """ + return self._template_path + + @template_path.setter + def template_path(self, template_path): + """Sets the template_path of this V1beta1ConfigMapSource. + + Path in config map where trial template is located # noqa: E501 + + :param template_path: The template_path of this V1beta1ConfigMapSource. # noqa: E501 + :type: str + """ + + self._template_path = template_path + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ConfigMapSource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ConfigMapSource): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_setting.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_setting.py new file mode 100644 index 00000000000..e6488ebe1fd --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_setting.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1EarlyStoppingSetting(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """V1beta1EarlyStoppingSetting - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1EarlyStoppingSetting. # noqa: E501 + + + :return: The name of this V1beta1EarlyStoppingSetting. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1EarlyStoppingSetting. + + + :param name: The name of this V1beta1EarlyStoppingSetting. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1EarlyStoppingSetting. # noqa: E501 + + + :return: The value of this V1beta1EarlyStoppingSetting. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1EarlyStoppingSetting. + + + :param value: The value of this V1beta1EarlyStoppingSetting. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1EarlyStoppingSetting, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1EarlyStoppingSetting): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_spec.py new file mode 100644 index 00000000000..739b4da8bae --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_spec.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_early_stopping_setting import V1beta1EarlyStoppingSetting # noqa: F401,E501 + + +class V1beta1EarlyStoppingSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'early_stopping_algorithm_name': 'str', + 'early_stopping_settings': 'list[V1beta1EarlyStoppingSetting]' + } + + attribute_map = { + 'early_stopping_algorithm_name': 'earlyStoppingAlgorithmName', + 'early_stopping_settings': 'earlyStoppingSettings' + } + + def __init__(self, early_stopping_algorithm_name=None, early_stopping_settings=None): # noqa: E501 + """V1beta1EarlyStoppingSpec - a model defined in Swagger""" # noqa: E501 + + self._early_stopping_algorithm_name = None + self._early_stopping_settings = None + self.discriminator = None + + if early_stopping_algorithm_name is not None: + self.early_stopping_algorithm_name = early_stopping_algorithm_name + self.early_stopping_settings = early_stopping_settings + + @property + def early_stopping_algorithm_name(self): + """Gets the early_stopping_algorithm_name of this V1beta1EarlyStoppingSpec. # noqa: E501 + + + :return: The early_stopping_algorithm_name of this V1beta1EarlyStoppingSpec. # noqa: E501 + :rtype: str + """ + return self._early_stopping_algorithm_name + + @early_stopping_algorithm_name.setter + def early_stopping_algorithm_name(self, early_stopping_algorithm_name): + """Sets the early_stopping_algorithm_name of this V1beta1EarlyStoppingSpec. + + + :param early_stopping_algorithm_name: The early_stopping_algorithm_name of this V1beta1EarlyStoppingSpec. # noqa: E501 + :type: str + """ + + self._early_stopping_algorithm_name = early_stopping_algorithm_name + + @property + def early_stopping_settings(self): + """Gets the early_stopping_settings of this V1beta1EarlyStoppingSpec. # noqa: E501 + + + :return: The early_stopping_settings of this V1beta1EarlyStoppingSpec. # noqa: E501 + :rtype: list[V1beta1EarlyStoppingSetting] + """ + return self._early_stopping_settings + + @early_stopping_settings.setter + def early_stopping_settings(self, early_stopping_settings): + """Sets the early_stopping_settings of this V1beta1EarlyStoppingSpec. + + + :param early_stopping_settings: The early_stopping_settings of this V1beta1EarlyStoppingSpec. # noqa: E501 + :type: list[V1beta1EarlyStoppingSetting] + """ + if early_stopping_settings is None: + raise ValueError("Invalid value for `early_stopping_settings`, must not be `None`") # noqa: E501 + + self._early_stopping_settings = early_stopping_settings + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1EarlyStoppingSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1EarlyStoppingSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py new file mode 100644 index 00000000000..8720e9f69d3 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_experiment_spec import V1beta1ExperimentSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_experiment_status import V1beta1ExperimentStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + + +class V1beta1Experiment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1ExperimentSpec', + 'status': 'V1beta1ExperimentStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None): # noqa: E501 + """V1beta1Experiment - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1Experiment. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1Experiment. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1Experiment. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1Experiment. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1Experiment. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1Experiment. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1Experiment. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1Experiment. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1Experiment. # noqa: E501 + + + :return: The metadata of this V1beta1Experiment. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1Experiment. + + + :param metadata: The metadata of this V1beta1Experiment. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1Experiment. # noqa: E501 + + + :return: The spec of this V1beta1Experiment. # noqa: E501 + :rtype: V1beta1ExperimentSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1Experiment. + + + :param spec: The spec of this V1beta1Experiment. # noqa: E501 + :type: V1beta1ExperimentSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1Experiment. # noqa: E501 + + + :return: The status of this V1beta1Experiment. # noqa: E501 + :rtype: V1beta1ExperimentStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1Experiment. + + + :param status: The status of this V1beta1Experiment. # noqa: E501 + :type: V1beta1ExperimentStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Experiment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Experiment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py new file mode 100644 index 00000000000..45416c2af60 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + + +class V1beta1ExperimentCondition(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last_transition_time': 'V1Time', + 'last_update_time': 'V1Time', + 'message': 'str', + 'reason': 'str', + 'status': 'str', + 'type': 'str' + } + + attribute_map = { + 'last_transition_time': 'lastTransitionTime', + 'last_update_time': 'lastUpdateTime', + 'message': 'message', + 'reason': 'reason', + 'status': 'status', + 'type': 'type' + } + + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status=None, type=None): # noqa: E501 + """V1beta1ExperimentCondition - a model defined in Swagger""" # noqa: E501 + + self._last_transition_time = None + self._last_update_time = None + self._message = None + self._reason = None + self._status = None + self._type = None + self.discriminator = None + + if last_transition_time is not None: + self.last_transition_time = last_transition_time + if last_update_time is not None: + self.last_update_time = last_update_time + if message is not None: + self.message = message + if reason is not None: + self.reason = reason + self.status = status + self.type = type + + @property + def last_transition_time(self): + """Gets the last_transition_time of this V1beta1ExperimentCondition. # noqa: E501 + + Last time the condition transitioned from one status to another. # noqa: E501 + + :return: The last_transition_time of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_transition_time + + @last_transition_time.setter + def last_transition_time(self, last_transition_time): + """Sets the last_transition_time of this V1beta1ExperimentCondition. + + Last time the condition transitioned from one status to another. # noqa: E501 + + :param last_transition_time: The last_transition_time of this V1beta1ExperimentCondition. # noqa: E501 + :type: V1Time + """ + + self._last_transition_time = last_transition_time + + @property + def last_update_time(self): + """Gets the last_update_time of this V1beta1ExperimentCondition. # noqa: E501 + + The last time this condition was updated. # noqa: E501 + + :return: The last_update_time of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_update_time + + @last_update_time.setter + def last_update_time(self, last_update_time): + """Sets the last_update_time of this V1beta1ExperimentCondition. + + The last time this condition was updated. # noqa: E501 + + :param last_update_time: The last_update_time of this V1beta1ExperimentCondition. # noqa: E501 + :type: V1Time + """ + + self._last_update_time = last_update_time + + @property + def message(self): + """Gets the message of this V1beta1ExperimentCondition. # noqa: E501 + + A human readable message indicating details about the transition. # noqa: E501 + + :return: The message of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this V1beta1ExperimentCondition. + + A human readable message indicating details about the transition. # noqa: E501 + + :param message: The message of this V1beta1ExperimentCondition. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def reason(self): + """Gets the reason of this V1beta1ExperimentCondition. # noqa: E501 + + The reason for the condition's last transition. # noqa: E501 + + :return: The reason of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this V1beta1ExperimentCondition. + + The reason for the condition's last transition. # noqa: E501 + + :param reason: The reason of this V1beta1ExperimentCondition. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def status(self): + """Gets the status of this V1beta1ExperimentCondition. # noqa: E501 + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :return: The status of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1ExperimentCondition. + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :param status: The status of this V1beta1ExperimentCondition. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def type(self): + """Gets the type of this V1beta1ExperimentCondition. # noqa: E501 + + Type of experiment condition. # noqa: E501 + + :return: The type of this V1beta1ExperimentCondition. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1ExperimentCondition. + + Type of experiment condition. # noqa: E501 + + :param type: The type of this V1beta1ExperimentCondition. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ExperimentCondition, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ExperimentCondition): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py new file mode 100644 index 00000000000..591f53306a4 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_experiment import V1beta1Experiment # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + + +class V1beta1ExperimentList(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'items': 'list[V1beta1Experiment]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 + """V1beta1ExperimentList - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1ExperimentList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1ExperimentList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1ExperimentList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1ExperimentList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1ExperimentList. # noqa: E501 + + + :return: The items of this V1beta1ExperimentList. # noqa: E501 + :rtype: list[V1beta1Experiment] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1ExperimentList. + + + :param items: The items of this V1beta1ExperimentList. # noqa: E501 + :type: list[V1beta1Experiment] + """ + if items is None: + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1ExperimentList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1ExperimentList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1ExperimentList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1ExperimentList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1ExperimentList. # noqa: E501 + + + :return: The metadata of this V1beta1ExperimentList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1ExperimentList. + + + :param metadata: The metadata of this V1beta1ExperimentList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ExperimentList, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ExperimentList): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py new file mode 100644 index 00000000000..450dfa98bdf --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py @@ -0,0 +1,374 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_metrics_collector_spec import V1beta1MetricsCollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_nas_config import V1beta1NasConfig # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_objective_spec import V1beta1ObjectiveSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_trial_template import V1beta1TrialTemplate # noqa: F401,E501 + + +class V1beta1ExperimentSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'algorithm': 'V1beta1AlgorithmSpec', + 'max_failed_trial_count': 'int', + 'max_trial_count': 'int', + 'metrics_collector_spec': 'V1beta1MetricsCollectorSpec', + 'nas_config': 'V1beta1NasConfig', + 'objective': 'V1beta1ObjectiveSpec', + 'parallel_trial_count': 'int', + 'parameters': 'list[V1beta1ParameterSpec]', + 'resume_policy': 'str', + 'trial_template': 'V1beta1TrialTemplate' + } + + attribute_map = { + 'algorithm': 'algorithm', + 'max_failed_trial_count': 'maxFailedTrialCount', + 'max_trial_count': 'maxTrialCount', + 'metrics_collector_spec': 'metricsCollectorSpec', + 'nas_config': 'nasConfig', + 'objective': 'objective', + 'parallel_trial_count': 'parallelTrialCount', + 'parameters': 'parameters', + 'resume_policy': 'resumePolicy', + 'trial_template': 'trialTemplate' + } + + def __init__(self, algorithm=None, max_failed_trial_count=None, max_trial_count=None, metrics_collector_spec=None, nas_config=None, objective=None, parallel_trial_count=None, parameters=None, resume_policy=None, trial_template=None): # noqa: E501 + """V1beta1ExperimentSpec - a model defined in Swagger""" # noqa: E501 + + self._algorithm = None + self._max_failed_trial_count = None + self._max_trial_count = None + self._metrics_collector_spec = None + self._nas_config = None + self._objective = None + self._parallel_trial_count = None + self._parameters = None + self._resume_policy = None + self._trial_template = None + self.discriminator = None + + if algorithm is not None: + self.algorithm = algorithm + if max_failed_trial_count is not None: + self.max_failed_trial_count = max_failed_trial_count + if max_trial_count is not None: + self.max_trial_count = max_trial_count + if metrics_collector_spec is not None: + self.metrics_collector_spec = metrics_collector_spec + if nas_config is not None: + self.nas_config = nas_config + if objective is not None: + self.objective = objective + if parallel_trial_count is not None: + self.parallel_trial_count = parallel_trial_count + if parameters is not None: + self.parameters = parameters + if resume_policy is not None: + self.resume_policy = resume_policy + if trial_template is not None: + self.trial_template = trial_template + + @property + def algorithm(self): + """Gets the algorithm of this V1beta1ExperimentSpec. # noqa: E501 + + Describes the suggestion algorithm. # noqa: E501 + + :return: The algorithm of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: V1beta1AlgorithmSpec + """ + return self._algorithm + + @algorithm.setter + def algorithm(self, algorithm): + """Sets the algorithm of this V1beta1ExperimentSpec. + + Describes the suggestion algorithm. # noqa: E501 + + :param algorithm: The algorithm of this V1beta1ExperimentSpec. # noqa: E501 + :type: V1beta1AlgorithmSpec + """ + + self._algorithm = algorithm + + @property + def max_failed_trial_count(self): + """Gets the max_failed_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + + Max failed trials to mark experiment as failed. # noqa: E501 + + :return: The max_failed_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: int + """ + return self._max_failed_trial_count + + @max_failed_trial_count.setter + def max_failed_trial_count(self, max_failed_trial_count): + """Sets the max_failed_trial_count of this V1beta1ExperimentSpec. + + Max failed trials to mark experiment as failed. # noqa: E501 + + :param max_failed_trial_count: The max_failed_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :type: int + """ + + self._max_failed_trial_count = max_failed_trial_count + + @property + def max_trial_count(self): + """Gets the max_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + + Max completed trials to mark experiment as succeeded # noqa: E501 + + :return: The max_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: int + """ + return self._max_trial_count + + @max_trial_count.setter + def max_trial_count(self, max_trial_count): + """Sets the max_trial_count of this V1beta1ExperimentSpec. + + Max completed trials to mark experiment as succeeded # noqa: E501 + + :param max_trial_count: The max_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :type: int + """ + + self._max_trial_count = max_trial_count + + @property + def metrics_collector_spec(self): + """Gets the metrics_collector_spec of this V1beta1ExperimentSpec. # noqa: E501 + + Describes the specification of the metrics collector # noqa: E501 + + :return: The metrics_collector_spec of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: V1beta1MetricsCollectorSpec + """ + return self._metrics_collector_spec + + @metrics_collector_spec.setter + def metrics_collector_spec(self, metrics_collector_spec): + """Sets the metrics_collector_spec of this V1beta1ExperimentSpec. + + Describes the specification of the metrics collector # noqa: E501 + + :param metrics_collector_spec: The metrics_collector_spec of this V1beta1ExperimentSpec. # noqa: E501 + :type: V1beta1MetricsCollectorSpec + """ + + self._metrics_collector_spec = metrics_collector_spec + + @property + def nas_config(self): + """Gets the nas_config of this V1beta1ExperimentSpec. # noqa: E501 + + + :return: The nas_config of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: V1beta1NasConfig + """ + return self._nas_config + + @nas_config.setter + def nas_config(self, nas_config): + """Sets the nas_config of this V1beta1ExperimentSpec. + + + :param nas_config: The nas_config of this V1beta1ExperimentSpec. # noqa: E501 + :type: V1beta1NasConfig + """ + + self._nas_config = nas_config + + @property + def objective(self): + """Gets the objective of this V1beta1ExperimentSpec. # noqa: E501 + + Describes the objective of the experiment. # noqa: E501 + + :return: The objective of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: V1beta1ObjectiveSpec + """ + return self._objective + + @objective.setter + def objective(self, objective): + """Sets the objective of this V1beta1ExperimentSpec. + + Describes the objective of the experiment. # noqa: E501 + + :param objective: The objective of this V1beta1ExperimentSpec. # noqa: E501 + :type: V1beta1ObjectiveSpec + """ + + self._objective = objective + + @property + def parallel_trial_count(self): + """Gets the parallel_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + + How many trials can be processed in parallel. Defaults to 3 # noqa: E501 + + :return: The parallel_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: int + """ + return self._parallel_trial_count + + @parallel_trial_count.setter + def parallel_trial_count(self, parallel_trial_count): + """Sets the parallel_trial_count of this V1beta1ExperimentSpec. + + How many trials can be processed in parallel. Defaults to 3 # noqa: E501 + + :param parallel_trial_count: The parallel_trial_count of this V1beta1ExperimentSpec. # noqa: E501 + :type: int + """ + + self._parallel_trial_count = parallel_trial_count + + @property + def parameters(self): + """Gets the parameters of this V1beta1ExperimentSpec. # noqa: E501 + + List of hyperparameter configurations. # noqa: E501 + + :return: The parameters of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: list[V1beta1ParameterSpec] + """ + return self._parameters + + @parameters.setter + def parameters(self, parameters): + """Sets the parameters of this V1beta1ExperimentSpec. + + List of hyperparameter configurations. # noqa: E501 + + :param parameters: The parameters of this V1beta1ExperimentSpec. # noqa: E501 + :type: list[V1beta1ParameterSpec] + """ + + self._parameters = parameters + + @property + def resume_policy(self): + """Gets the resume_policy of this V1beta1ExperimentSpec. # noqa: E501 + + Describes resuming policy which usually take effect after experiment terminated. # noqa: E501 + + :return: The resume_policy of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: str + """ + return self._resume_policy + + @resume_policy.setter + def resume_policy(self, resume_policy): + """Sets the resume_policy of this V1beta1ExperimentSpec. + + Describes resuming policy which usually take effect after experiment terminated. # noqa: E501 + + :param resume_policy: The resume_policy of this V1beta1ExperimentSpec. # noqa: E501 + :type: str + """ + + self._resume_policy = resume_policy + + @property + def trial_template(self): + """Gets the trial_template of this V1beta1ExperimentSpec. # noqa: E501 + + Template for each run of the trial. # noqa: E501 + + :return: The trial_template of this V1beta1ExperimentSpec. # noqa: E501 + :rtype: V1beta1TrialTemplate + """ + return self._trial_template + + @trial_template.setter + def trial_template(self, trial_template): + """Sets the trial_template of this V1beta1ExperimentSpec. + + Template for each run of the trial. # noqa: E501 + + :param trial_template: The trial_template of this V1beta1ExperimentSpec. # noqa: E501 + :type: V1beta1TrialTemplate + """ + + self._trial_template = trial_template + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ExperimentSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ExperimentSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py new file mode 100644 index 00000000000..0231fff930f --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py @@ -0,0 +1,541 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial # noqa: F401,E501 + + +class V1beta1ExperimentStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'completion_time': 'V1Time', + 'conditions': 'list[V1beta1ExperimentCondition]', + 'current_optimal_trial': 'V1beta1OptimalTrial', + 'failed_trial_list': 'list[str]', + 'killed_trial_list': 'list[str]', + 'last_reconcile_time': 'V1Time', + 'pending_trial_list': 'list[str]', + 'running_trial_list': 'list[str]', + 'start_time': 'V1Time', + 'succeeded_trial_list': 'list[str]', + 'trials': 'int', + 'trials_failed': 'int', + 'trials_killed': 'int', + 'trials_pending': 'int', + 'trials_running': 'int', + 'trials_succeeded': 'int' + } + + attribute_map = { + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'current_optimal_trial': 'currentOptimalTrial', + 'failed_trial_list': 'failedTrialList', + 'killed_trial_list': 'killedTrialList', + 'last_reconcile_time': 'lastReconcileTime', + 'pending_trial_list': 'pendingTrialList', + 'running_trial_list': 'runningTrialList', + 'start_time': 'startTime', + 'succeeded_trial_list': 'succeededTrialList', + 'trials': 'trials', + 'trials_failed': 'trialsFailed', + 'trials_killed': 'trialsKilled', + 'trials_pending': 'trialsPending', + 'trials_running': 'trialsRunning', + 'trials_succeeded': 'trialsSucceeded' + } + + def __init__(self, completion_time=None, conditions=None, current_optimal_trial=None, failed_trial_list=None, killed_trial_list=None, last_reconcile_time=None, pending_trial_list=None, running_trial_list=None, start_time=None, succeeded_trial_list=None, trials=None, trials_failed=None, trials_killed=None, trials_pending=None, trials_running=None, trials_succeeded=None): # noqa: E501 + """V1beta1ExperimentStatus - a model defined in Swagger""" # noqa: E501 + + self._completion_time = None + self._conditions = None + self._current_optimal_trial = None + self._failed_trial_list = None + self._killed_trial_list = None + self._last_reconcile_time = None + self._pending_trial_list = None + self._running_trial_list = None + self._start_time = None + self._succeeded_trial_list = None + self._trials = None + self._trials_failed = None + self._trials_killed = None + self._trials_pending = None + self._trials_running = None + self._trials_succeeded = None + self.discriminator = None + + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if current_optimal_trial is not None: + self.current_optimal_trial = current_optimal_trial + if failed_trial_list is not None: + self.failed_trial_list = failed_trial_list + if killed_trial_list is not None: + self.killed_trial_list = killed_trial_list + if last_reconcile_time is not None: + self.last_reconcile_time = last_reconcile_time + if pending_trial_list is not None: + self.pending_trial_list = pending_trial_list + if running_trial_list is not None: + self.running_trial_list = running_trial_list + if start_time is not None: + self.start_time = start_time + if succeeded_trial_list is not None: + self.succeeded_trial_list = succeeded_trial_list + if trials is not None: + self.trials = trials + if trials_failed is not None: + self.trials_failed = trials_failed + if trials_killed is not None: + self.trials_killed = trials_killed + if trials_pending is not None: + self.trials_pending = trials_pending + if trials_running is not None: + self.trials_running = trials_running + if trials_succeeded is not None: + self.trials_succeeded = trials_succeeded + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1ExperimentStatus. # noqa: E501 + + 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. # noqa: E501 + + :return: The completion_time of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1ExperimentStatus. + + 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. # noqa: E501 + + :param completion_time: The completion_time of this V1beta1ExperimentStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1ExperimentStatus. # noqa: E501 + + List of observed runtime conditions for this Experiment. # noqa: E501 + + :return: The conditions of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[V1beta1ExperimentCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1ExperimentStatus. + + List of observed runtime conditions for this Experiment. # noqa: E501 + + :param conditions: The conditions of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[V1beta1ExperimentCondition] + """ + + self._conditions = conditions + + @property + def current_optimal_trial(self): + """Gets the current_optimal_trial of this V1beta1ExperimentStatus. # noqa: E501 + + Current optimal trial parameters and observations. # noqa: E501 + + :return: The current_optimal_trial of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: V1beta1OptimalTrial + """ + return self._current_optimal_trial + + @current_optimal_trial.setter + def current_optimal_trial(self, current_optimal_trial): + """Sets the current_optimal_trial of this V1beta1ExperimentStatus. + + Current optimal trial parameters and observations. # noqa: E501 + + :param current_optimal_trial: The current_optimal_trial of this V1beta1ExperimentStatus. # noqa: E501 + :type: V1beta1OptimalTrial + """ + + self._current_optimal_trial = current_optimal_trial + + @property + def failed_trial_list(self): + """Gets the failed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + + List of trial names which have already failed. # noqa: E501 + + :return: The failed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[str] + """ + return self._failed_trial_list + + @failed_trial_list.setter + def failed_trial_list(self, failed_trial_list): + """Sets the failed_trial_list of this V1beta1ExperimentStatus. + + List of trial names which have already failed. # noqa: E501 + + :param failed_trial_list: The failed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[str] + """ + + self._failed_trial_list = failed_trial_list + + @property + def killed_trial_list(self): + """Gets the killed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + + List of trial names which have been killed. # noqa: E501 + + :return: The killed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[str] + """ + return self._killed_trial_list + + @killed_trial_list.setter + def killed_trial_list(self, killed_trial_list): + """Sets the killed_trial_list of this V1beta1ExperimentStatus. + + List of trial names which have been killed. # noqa: E501 + + :param killed_trial_list: The killed_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[str] + """ + + self._killed_trial_list = killed_trial_list + + @property + def last_reconcile_time(self): + """Gets the last_reconcile_time of this V1beta1ExperimentStatus. # noqa: E501 + + 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. # noqa: E501 + + :return: The last_reconcile_time of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: V1Time + """ + return self._last_reconcile_time + + @last_reconcile_time.setter + def last_reconcile_time(self, last_reconcile_time): + """Sets the last_reconcile_time of this V1beta1ExperimentStatus. + + 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. # noqa: E501 + + :param last_reconcile_time: The last_reconcile_time of this V1beta1ExperimentStatus. # noqa: E501 + :type: V1Time + """ + + self._last_reconcile_time = last_reconcile_time + + @property + def pending_trial_list(self): + """Gets the pending_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + + List of trial names which are pending. # noqa: E501 + + :return: The pending_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[str] + """ + return self._pending_trial_list + + @pending_trial_list.setter + def pending_trial_list(self, pending_trial_list): + """Sets the pending_trial_list of this V1beta1ExperimentStatus. + + List of trial names which are pending. # noqa: E501 + + :param pending_trial_list: The pending_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[str] + """ + + self._pending_trial_list = pending_trial_list + + @property + def running_trial_list(self): + """Gets the running_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + + List of trial names which are running. # noqa: E501 + + :return: The running_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[str] + """ + return self._running_trial_list + + @running_trial_list.setter + def running_trial_list(self, running_trial_list): + """Sets the running_trial_list of this V1beta1ExperimentStatus. + + List of trial names which are running. # noqa: E501 + + :param running_trial_list: The running_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[str] + """ + + self._running_trial_list = running_trial_list + + @property + def start_time(self): + """Gets the start_time of this V1beta1ExperimentStatus. # noqa: E501 + + 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. # noqa: E501 + + :return: The start_time of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1ExperimentStatus. + + 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. # noqa: E501 + + :param start_time: The start_time of this V1beta1ExperimentStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def succeeded_trial_list(self): + """Gets the succeeded_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + + List of trial names which have already succeeded. # noqa: E501 + + :return: The succeeded_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: list[str] + """ + return self._succeeded_trial_list + + @succeeded_trial_list.setter + def succeeded_trial_list(self, succeeded_trial_list): + """Sets the succeeded_trial_list of this V1beta1ExperimentStatus. + + List of trial names which have already succeeded. # noqa: E501 + + :param succeeded_trial_list: The succeeded_trial_list of this V1beta1ExperimentStatus. # noqa: E501 + :type: list[str] + """ + + self._succeeded_trial_list = succeeded_trial_list + + @property + def trials(self): + """Gets the trials of this V1beta1ExperimentStatus. # noqa: E501 + + Trials is the total number of trials owned by the experiment. # noqa: E501 + + :return: The trials of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials + + @trials.setter + def trials(self, trials): + """Sets the trials of this V1beta1ExperimentStatus. + + Trials is the total number of trials owned by the experiment. # noqa: E501 + + :param trials: The trials of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials = trials + + @property + def trials_failed(self): + """Gets the trials_failed of this V1beta1ExperimentStatus. # noqa: E501 + + How many trials have failed. # noqa: E501 + + :return: The trials_failed of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials_failed + + @trials_failed.setter + def trials_failed(self, trials_failed): + """Sets the trials_failed of this V1beta1ExperimentStatus. + + How many trials have failed. # noqa: E501 + + :param trials_failed: The trials_failed of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials_failed = trials_failed + + @property + def trials_killed(self): + """Gets the trials_killed of this V1beta1ExperimentStatus. # noqa: E501 + + How many trials have been killed. # noqa: E501 + + :return: The trials_killed of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials_killed + + @trials_killed.setter + def trials_killed(self, trials_killed): + """Sets the trials_killed of this V1beta1ExperimentStatus. + + How many trials have been killed. # noqa: E501 + + :param trials_killed: The trials_killed of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials_killed = trials_killed + + @property + def trials_pending(self): + """Gets the trials_pending of this V1beta1ExperimentStatus. # noqa: E501 + + How many trials are currently pending. # noqa: E501 + + :return: The trials_pending of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials_pending + + @trials_pending.setter + def trials_pending(self, trials_pending): + """Sets the trials_pending of this V1beta1ExperimentStatus. + + How many trials are currently pending. # noqa: E501 + + :param trials_pending: The trials_pending of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials_pending = trials_pending + + @property + def trials_running(self): + """Gets the trials_running of this V1beta1ExperimentStatus. # noqa: E501 + + How many trials are currently running. # noqa: E501 + + :return: The trials_running of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials_running + + @trials_running.setter + def trials_running(self, trials_running): + """Sets the trials_running of this V1beta1ExperimentStatus. + + How many trials are currently running. # noqa: E501 + + :param trials_running: The trials_running of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials_running = trials_running + + @property + def trials_succeeded(self): + """Gets the trials_succeeded of this V1beta1ExperimentStatus. # noqa: E501 + + How many trials have succeeded. # noqa: E501 + + :return: The trials_succeeded of this V1beta1ExperimentStatus. # noqa: E501 + :rtype: int + """ + return self._trials_succeeded + + @trials_succeeded.setter + def trials_succeeded(self, trials_succeeded): + """Sets the trials_succeeded of this V1beta1ExperimentStatus. + + How many trials have succeeded. # noqa: E501 + + :param trials_succeeded: The trials_succeeded of this V1beta1ExperimentStatus. # noqa: E501 + :type: int + """ + + self._trials_succeeded = trials_succeeded + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ExperimentStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ExperimentStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py new file mode 100644 index 00000000000..b945769bf42 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1FeasibleSpace(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'list': 'list[str]', + 'max': 'str', + 'min': 'str', + 'step': 'str' + } + + attribute_map = { + 'list': 'list', + 'max': 'max', + 'min': 'min', + 'step': 'step' + } + + def __init__(self, list=None, max=None, min=None, step=None): # noqa: E501 + """V1beta1FeasibleSpace - a model defined in Swagger""" # noqa: E501 + + self._list = None + self._max = None + self._min = None + self._step = None + self.discriminator = None + + if list is not None: + self.list = list + if max is not None: + self.max = max + if min is not None: + self.min = min + if step is not None: + self.step = step + + @property + def list(self): + """Gets the list of this V1beta1FeasibleSpace. # noqa: E501 + + + :return: The list of this V1beta1FeasibleSpace. # noqa: E501 + :rtype: list[str] + """ + return self._list + + @list.setter + def list(self, list): + """Sets the list of this V1beta1FeasibleSpace. + + + :param list: The list of this V1beta1FeasibleSpace. # noqa: E501 + :type: list[str] + """ + + self._list = list + + @property + def max(self): + """Gets the max of this V1beta1FeasibleSpace. # noqa: E501 + + + :return: The max of this V1beta1FeasibleSpace. # noqa: E501 + :rtype: str + """ + return self._max + + @max.setter + def max(self, max): + """Sets the max of this V1beta1FeasibleSpace. + + + :param max: The max of this V1beta1FeasibleSpace. # noqa: E501 + :type: str + """ + + self._max = max + + @property + def min(self): + """Gets the min of this V1beta1FeasibleSpace. # noqa: E501 + + + :return: The min of this V1beta1FeasibleSpace. # noqa: E501 + :rtype: str + """ + return self._min + + @min.setter + def min(self, min): + """Sets the min of this V1beta1FeasibleSpace. + + + :param min: The min of this V1beta1FeasibleSpace. # noqa: E501 + :type: str + """ + + self._min = min + + @property + def step(self): + """Gets the step of this V1beta1FeasibleSpace. # noqa: E501 + + + :return: The step of this V1beta1FeasibleSpace. # noqa: E501 + :rtype: str + """ + return self._step + + @step.setter + def step(self, step): + """Sets the step of this V1beta1FeasibleSpace. + + + :param step: The step of this V1beta1FeasibleSpace. # noqa: E501 + :type: str + """ + + self._step = step + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1FeasibleSpace, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1FeasibleSpace): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_file_system_path.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_file_system_path.py new file mode 100644 index 00000000000..2151f374c7e --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_file_system_path.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1FileSystemPath(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'kind': 'str', + 'path': 'str' + } + + attribute_map = { + 'kind': 'kind', + 'path': 'path' + } + + def __init__(self, kind=None, path=None): # noqa: E501 + """V1beta1FileSystemPath - a model defined in Swagger""" # noqa: E501 + + self._kind = None + self._path = None + self.discriminator = None + + if kind is not None: + self.kind = kind + if path is not None: + self.path = path + + @property + def kind(self): + """Gets the kind of this V1beta1FileSystemPath. # noqa: E501 + + + :return: The kind of this V1beta1FileSystemPath. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1FileSystemPath. + + + :param kind: The kind of this V1beta1FileSystemPath. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def path(self): + """Gets the path of this V1beta1FileSystemPath. # noqa: E501 + + + :return: The path of this V1beta1FileSystemPath. # noqa: E501 + :rtype: str + """ + return self._path + + @path.setter + def path(self, path): + """Sets the path of this V1beta1FileSystemPath. + + + :param path: The path of this V1beta1FileSystemPath. # noqa: E501 + :type: str + """ + + self._path = path + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1FileSystemPath, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1FileSystemPath): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py new file mode 100644 index 00000000000..dfdf62807da --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py @@ -0,0 +1,117 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1FilterSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'metrics_format': 'list[str]' + } + + attribute_map = { + 'metrics_format': 'metricsFormat' + } + + def __init__(self, metrics_format=None): # noqa: E501 + """V1beta1FilterSpec - a model defined in Swagger""" # noqa: E501 + + self._metrics_format = None + self.discriminator = None + + if metrics_format is not None: + self.metrics_format = metrics_format + + @property + def metrics_format(self): + """Gets the metrics_format of this V1beta1FilterSpec. # noqa: E501 + + When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else # noqa: E501 + + :return: The metrics_format of this V1beta1FilterSpec. # noqa: E501 + :rtype: list[str] + """ + return self._metrics_format + + @metrics_format.setter + def metrics_format(self, metrics_format): + """Sets the metrics_format of this V1beta1FilterSpec. + + When the metrics output follows format as this field specified, metricsCollector collects it and reports to metrics server, it can be \": \" or else # noqa: E501 + + :param metrics_format: The metrics_format of this V1beta1FilterSpec. # noqa: E501 + :type: list[str] + """ + + self._metrics_format = metrics_format + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1FilterSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1FilterSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py new file mode 100644 index 00000000000..d1dd35addea --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py @@ -0,0 +1,167 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1GraphConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'input_sizes': 'list[int]', + 'num_layers': 'int', + 'output_sizes': 'list[int]' + } + + attribute_map = { + 'input_sizes': 'inputSizes', + 'num_layers': 'numLayers', + 'output_sizes': 'outputSizes' + } + + def __init__(self, input_sizes=None, num_layers=None, output_sizes=None): # noqa: E501 + """V1beta1GraphConfig - a model defined in Swagger""" # noqa: E501 + + self._input_sizes = None + self._num_layers = None + self._output_sizes = None + self.discriminator = None + + if input_sizes is not None: + self.input_sizes = input_sizes + if num_layers is not None: + self.num_layers = num_layers + if output_sizes is not None: + self.output_sizes = output_sizes + + @property + def input_sizes(self): + """Gets the input_sizes of this V1beta1GraphConfig. # noqa: E501 + + + :return: The input_sizes of this V1beta1GraphConfig. # noqa: E501 + :rtype: list[int] + """ + return self._input_sizes + + @input_sizes.setter + def input_sizes(self, input_sizes): + """Sets the input_sizes of this V1beta1GraphConfig. + + + :param input_sizes: The input_sizes of this V1beta1GraphConfig. # noqa: E501 + :type: list[int] + """ + + self._input_sizes = input_sizes + + @property + def num_layers(self): + """Gets the num_layers of this V1beta1GraphConfig. # noqa: E501 + + + :return: The num_layers of this V1beta1GraphConfig. # noqa: E501 + :rtype: int + """ + return self._num_layers + + @num_layers.setter + def num_layers(self, num_layers): + """Sets the num_layers of this V1beta1GraphConfig. + + + :param num_layers: The num_layers of this V1beta1GraphConfig. # noqa: E501 + :type: int + """ + + self._num_layers = num_layers + + @property + def output_sizes(self): + """Gets the output_sizes of this V1beta1GraphConfig. # noqa: E501 + + + :return: The output_sizes of this V1beta1GraphConfig. # noqa: E501 + :rtype: list[int] + """ + return self._output_sizes + + @output_sizes.setter + def output_sizes(self, output_sizes): + """Sets the output_sizes of this V1beta1GraphConfig. + + + :param output_sizes: The output_sizes of this V1beta1GraphConfig. # noqa: E501 + :type: list[int] + """ + + self._output_sizes = output_sizes + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1GraphConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1GraphConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py new file mode 100644 index 00000000000..f1a6d171ff2 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py @@ -0,0 +1,193 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1Metric(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'latest': 'str', + 'max': 'str', + 'min': 'str', + 'name': 'str' + } + + attribute_map = { + 'latest': 'latest', + 'max': 'max', + 'min': 'min', + 'name': 'name' + } + + def __init__(self, latest=None, max=None, min=None, name=None): # noqa: E501 + """V1beta1Metric - a model defined in Swagger""" # noqa: E501 + + self._latest = None + self._max = None + self._min = None + self._name = None + self.discriminator = None + + if latest is not None: + self.latest = latest + if max is not None: + self.max = max + if min is not None: + self.min = min + if name is not None: + self.name = name + + @property + def latest(self): + """Gets the latest of this V1beta1Metric. # noqa: E501 + + + :return: The latest of this V1beta1Metric. # noqa: E501 + :rtype: str + """ + return self._latest + + @latest.setter + def latest(self, latest): + """Sets the latest of this V1beta1Metric. + + + :param latest: The latest of this V1beta1Metric. # noqa: E501 + :type: str + """ + + self._latest = latest + + @property + def max(self): + """Gets the max of this V1beta1Metric. # noqa: E501 + + + :return: The max of this V1beta1Metric. # noqa: E501 + :rtype: str + """ + return self._max + + @max.setter + def max(self, max): + """Sets the max of this V1beta1Metric. + + + :param max: The max of this V1beta1Metric. # noqa: E501 + :type: str + """ + + self._max = max + + @property + def min(self): + """Gets the min of this V1beta1Metric. # noqa: E501 + + + :return: The min of this V1beta1Metric. # noqa: E501 + :rtype: str + """ + return self._min + + @min.setter + def min(self, min): + """Sets the min of this V1beta1Metric. + + + :param min: The min of this V1beta1Metric. # noqa: E501 + :type: str + """ + + self._min = min + + @property + def name(self): + """Gets the name of this V1beta1Metric. # noqa: E501 + + + :return: The name of this V1beta1Metric. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1Metric. + + + :param name: The name of this V1beta1Metric. # noqa: E501 + :type: str + """ + + self._name = name + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Metric, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Metric): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py new file mode 100644 index 00000000000..2b297d30497 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1MetricStrategy(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """V1beta1MetricStrategy - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1MetricStrategy. # noqa: E501 + + + :return: The name of this V1beta1MetricStrategy. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1MetricStrategy. + + + :param name: The name of this V1beta1MetricStrategy. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1MetricStrategy. # noqa: E501 + + + :return: The value of this V1beta1MetricStrategy. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1MetricStrategy. + + + :param value: The value of this V1beta1MetricStrategy. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1MetricStrategy, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1MetricStrategy): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metrics_collector_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metrics_collector_spec.py new file mode 100644 index 00000000000..d070adb5189 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metrics_collector_spec.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_collector_spec import V1beta1CollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_source_spec import V1beta1SourceSpec # noqa: F401,E501 + + +class V1beta1MetricsCollectorSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'collector': 'V1beta1CollectorSpec', + 'source': 'V1beta1SourceSpec' + } + + attribute_map = { + 'collector': 'collector', + 'source': 'source' + } + + def __init__(self, collector=None, source=None): # noqa: E501 + """V1beta1MetricsCollectorSpec - a model defined in Swagger""" # noqa: E501 + + self._collector = None + self._source = None + self.discriminator = None + + if collector is not None: + self.collector = collector + if source is not None: + self.source = source + + @property + def collector(self): + """Gets the collector of this V1beta1MetricsCollectorSpec. # noqa: E501 + + + :return: The collector of this V1beta1MetricsCollectorSpec. # noqa: E501 + :rtype: V1beta1CollectorSpec + """ + return self._collector + + @collector.setter + def collector(self, collector): + """Sets the collector of this V1beta1MetricsCollectorSpec. + + + :param collector: The collector of this V1beta1MetricsCollectorSpec. # noqa: E501 + :type: V1beta1CollectorSpec + """ + + self._collector = collector + + @property + def source(self): + """Gets the source of this V1beta1MetricsCollectorSpec. # noqa: E501 + + + :return: The source of this V1beta1MetricsCollectorSpec. # noqa: E501 + :rtype: V1beta1SourceSpec + """ + return self._source + + @source.setter + def source(self, source): + """Sets the source of this V1beta1MetricsCollectorSpec. + + + :param source: The source of this V1beta1MetricsCollectorSpec. # noqa: E501 + :type: V1beta1SourceSpec + """ + + self._source = source + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1MetricsCollectorSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1MetricsCollectorSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py new file mode 100644 index 00000000000..8456a54bf09 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_graph_config import V1beta1GraphConfig # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_operation import V1beta1Operation # noqa: F401,E501 + + +class V1beta1NasConfig(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'graph_config': 'V1beta1GraphConfig', + 'operations': 'list[V1beta1Operation]' + } + + attribute_map = { + 'graph_config': 'graphConfig', + 'operations': 'operations' + } + + def __init__(self, graph_config=None, operations=None): # noqa: E501 + """V1beta1NasConfig - a model defined in Swagger""" # noqa: E501 + + self._graph_config = None + self._operations = None + self.discriminator = None + + if graph_config is not None: + self.graph_config = graph_config + if operations is not None: + self.operations = operations + + @property + def graph_config(self): + """Gets the graph_config of this V1beta1NasConfig. # noqa: E501 + + + :return: The graph_config of this V1beta1NasConfig. # noqa: E501 + :rtype: V1beta1GraphConfig + """ + return self._graph_config + + @graph_config.setter + def graph_config(self, graph_config): + """Sets the graph_config of this V1beta1NasConfig. + + + :param graph_config: The graph_config of this V1beta1NasConfig. # noqa: E501 + :type: V1beta1GraphConfig + """ + + self._graph_config = graph_config + + @property + def operations(self): + """Gets the operations of this V1beta1NasConfig. # noqa: E501 + + + :return: The operations of this V1beta1NasConfig. # noqa: E501 + :rtype: list[V1beta1Operation] + """ + return self._operations + + @operations.setter + def operations(self, operations): + """Sets the operations of this V1beta1NasConfig. + + + :param operations: The operations of this V1beta1NasConfig. # noqa: E501 + :type: list[V1beta1Operation] + """ + + self._operations = operations + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1NasConfig, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1NasConfig): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py new file mode 100644 index 00000000000..6b0d977eb77 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py @@ -0,0 +1,225 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_metric_strategy import V1beta1MetricStrategy # noqa: F401,E501 + + +class V1beta1ObjectiveSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'additional_metric_names': 'list[str]', + 'goal': 'float', + 'metric_strategies': 'list[V1beta1MetricStrategy]', + 'objective_metric_name': 'str', + 'type': 'str' + } + + attribute_map = { + 'additional_metric_names': 'additionalMetricNames', + 'goal': 'goal', + 'metric_strategies': 'metricStrategies', + 'objective_metric_name': 'objectiveMetricName', + 'type': 'type' + } + + def __init__(self, additional_metric_names=None, goal=None, metric_strategies=None, objective_metric_name=None, type=None): # noqa: E501 + """V1beta1ObjectiveSpec - a model defined in Swagger""" # noqa: E501 + + self._additional_metric_names = None + self._goal = None + self._metric_strategies = None + self._objective_metric_name = None + self._type = None + self.discriminator = None + + if additional_metric_names is not None: + self.additional_metric_names = additional_metric_names + if goal is not None: + self.goal = goal + if metric_strategies is not None: + self.metric_strategies = metric_strategies + if objective_metric_name is not None: + self.objective_metric_name = objective_metric_name + if type is not None: + self.type = type + + @property + def additional_metric_names(self): + """Gets the additional_metric_names of this V1beta1ObjectiveSpec. # noqa: E501 + + 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. # noqa: E501 + + :return: The additional_metric_names of this V1beta1ObjectiveSpec. # noqa: E501 + :rtype: list[str] + """ + return self._additional_metric_names + + @additional_metric_names.setter + def additional_metric_names(self, additional_metric_names): + """Sets the additional_metric_names of this V1beta1ObjectiveSpec. + + 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. # noqa: E501 + + :param additional_metric_names: The additional_metric_names of this V1beta1ObjectiveSpec. # noqa: E501 + :type: list[str] + """ + + self._additional_metric_names = additional_metric_names + + @property + def goal(self): + """Gets the goal of this V1beta1ObjectiveSpec. # noqa: E501 + + + :return: The goal of this V1beta1ObjectiveSpec. # noqa: E501 + :rtype: float + """ + return self._goal + + @goal.setter + def goal(self, goal): + """Sets the goal of this V1beta1ObjectiveSpec. + + + :param goal: The goal of this V1beta1ObjectiveSpec. # noqa: E501 + :type: float + """ + + self._goal = goal + + @property + def metric_strategies(self): + """Gets the metric_strategies of this V1beta1ObjectiveSpec. # noqa: E501 + + This field is allowed to missing, experiment defaulter (webhook) will fill it. # noqa: E501 + + :return: The metric_strategies of this V1beta1ObjectiveSpec. # noqa: E501 + :rtype: list[V1beta1MetricStrategy] + """ + return self._metric_strategies + + @metric_strategies.setter + def metric_strategies(self, metric_strategies): + """Sets the metric_strategies of this V1beta1ObjectiveSpec. + + This field is allowed to missing, experiment defaulter (webhook) will fill it. # noqa: E501 + + :param metric_strategies: The metric_strategies of this V1beta1ObjectiveSpec. # noqa: E501 + :type: list[V1beta1MetricStrategy] + """ + + self._metric_strategies = metric_strategies + + @property + def objective_metric_name(self): + """Gets the objective_metric_name of this V1beta1ObjectiveSpec. # noqa: E501 + + + :return: The objective_metric_name of this V1beta1ObjectiveSpec. # noqa: E501 + :rtype: str + """ + return self._objective_metric_name + + @objective_metric_name.setter + def objective_metric_name(self, objective_metric_name): + """Sets the objective_metric_name of this V1beta1ObjectiveSpec. + + + :param objective_metric_name: The objective_metric_name of this V1beta1ObjectiveSpec. # noqa: E501 + :type: str + """ + + self._objective_metric_name = objective_metric_name + + @property + def type(self): + """Gets the type of this V1beta1ObjectiveSpec. # noqa: E501 + + + :return: The type of this V1beta1ObjectiveSpec. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1ObjectiveSpec. + + + :param type: The type of this V1beta1ObjectiveSpec. # noqa: E501 + :type: str + """ + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ObjectiveSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ObjectiveSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py new file mode 100644 index 00000000000..6ad3a77e876 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_metric import V1beta1Metric # noqa: F401,E501 + + +class V1beta1Observation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'metrics': 'list[V1beta1Metric]' + } + + attribute_map = { + 'metrics': 'metrics' + } + + def __init__(self, metrics=None): # noqa: E501 + """V1beta1Observation - a model defined in Swagger""" # noqa: E501 + + self._metrics = None + self.discriminator = None + + self.metrics = metrics + + @property + def metrics(self): + """Gets the metrics of this V1beta1Observation. # noqa: E501 + + Key-value pairs for metric names and values # noqa: E501 + + :return: The metrics of this V1beta1Observation. # noqa: E501 + :rtype: list[V1beta1Metric] + """ + return self._metrics + + @metrics.setter + def metrics(self, metrics): + """Sets the metrics of this V1beta1Observation. + + Key-value pairs for metric names and values # noqa: E501 + + :param metrics: The metrics of this V1beta1Observation. # noqa: E501 + :type: list[V1beta1Metric] + """ + if metrics is None: + raise ValueError("Invalid value for `metrics`, must not be `None`") # noqa: E501 + + self._metrics = metrics + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Observation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Observation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py new file mode 100644 index 00000000000..8638abe5e22 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py @@ -0,0 +1,143 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec # noqa: F401,E501 + + +class V1beta1Operation(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'operation_type': 'str', + 'parameters': 'list[V1beta1ParameterSpec]' + } + + attribute_map = { + 'operation_type': 'operationType', + 'parameters': 'parameters' + } + + def __init__(self, operation_type=None, parameters=None): # noqa: E501 + """V1beta1Operation - a model defined in Swagger""" # noqa: E501 + + self._operation_type = None + self._parameters = None + self.discriminator = None + + if operation_type is not None: + self.operation_type = operation_type + if parameters is not None: + self.parameters = parameters + + @property + def operation_type(self): + """Gets the operation_type of this V1beta1Operation. # noqa: E501 + + + :return: The operation_type of this V1beta1Operation. # noqa: E501 + :rtype: str + """ + return self._operation_type + + @operation_type.setter + def operation_type(self, operation_type): + """Sets the operation_type of this V1beta1Operation. + + + :param operation_type: The operation_type of this V1beta1Operation. # noqa: E501 + :type: str + """ + + self._operation_type = operation_type + + @property + def parameters(self): + """Gets the parameters of this V1beta1Operation. # noqa: E501 + + + :return: The parameters of this V1beta1Operation. # noqa: E501 + :rtype: list[V1beta1ParameterSpec] + """ + return self._parameters + + @parameters.setter + def parameters(self, parameters): + """Sets the parameters of this V1beta1Operation. + + + :param parameters: The parameters of this V1beta1Operation. # noqa: E501 + :type: list[V1beta1ParameterSpec] + """ + + self._parameters = parameters + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Operation, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Operation): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py new file mode 100644 index 00000000000..873f180d3d1 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py @@ -0,0 +1,178 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_observation import V1beta1Observation # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment # noqa: F401,E501 + + +class V1beta1OptimalTrial(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'best_trial_name': 'str', + 'observation': 'V1beta1Observation', + 'parameter_assignments': 'list[V1beta1ParameterAssignment]' + } + + attribute_map = { + 'best_trial_name': 'bestTrialName', + 'observation': 'observation', + 'parameter_assignments': 'parameterAssignments' + } + + def __init__(self, best_trial_name=None, observation=None, parameter_assignments=None): # noqa: E501 + """V1beta1OptimalTrial - a model defined in Swagger""" # noqa: E501 + + self._best_trial_name = None + self._observation = None + self._parameter_assignments = None + self.discriminator = None + + self.best_trial_name = best_trial_name + if observation is not None: + self.observation = observation + self.parameter_assignments = parameter_assignments + + @property + def best_trial_name(self): + """Gets the best_trial_name of this V1beta1OptimalTrial. # noqa: E501 + + BestTrialName is the name of the best trial. # noqa: E501 + + :return: The best_trial_name of this V1beta1OptimalTrial. # noqa: E501 + :rtype: str + """ + return self._best_trial_name + + @best_trial_name.setter + def best_trial_name(self, best_trial_name): + """Sets the best_trial_name of this V1beta1OptimalTrial. + + BestTrialName is the name of the best trial. # noqa: E501 + + :param best_trial_name: The best_trial_name of this V1beta1OptimalTrial. # noqa: E501 + :type: str + """ + if best_trial_name is None: + raise ValueError("Invalid value for `best_trial_name`, must not be `None`") # noqa: E501 + + self._best_trial_name = best_trial_name + + @property + def observation(self): + """Gets the observation of this V1beta1OptimalTrial. # noqa: E501 + + Observation for this trial # noqa: E501 + + :return: The observation of this V1beta1OptimalTrial. # noqa: E501 + :rtype: V1beta1Observation + """ + return self._observation + + @observation.setter + def observation(self, observation): + """Sets the observation of this V1beta1OptimalTrial. + + Observation for this trial # noqa: E501 + + :param observation: The observation of this V1beta1OptimalTrial. # noqa: E501 + :type: V1beta1Observation + """ + + self._observation = observation + + @property + def parameter_assignments(self): + """Gets the parameter_assignments of this V1beta1OptimalTrial. # noqa: E501 + + Key-value pairs for hyperparameters and assignment values. # noqa: E501 + + :return: The parameter_assignments of this V1beta1OptimalTrial. # noqa: E501 + :rtype: list[V1beta1ParameterAssignment] + """ + return self._parameter_assignments + + @parameter_assignments.setter + def parameter_assignments(self, parameter_assignments): + """Sets the parameter_assignments of this V1beta1OptimalTrial. + + Key-value pairs for hyperparameters and assignment values. # noqa: E501 + + :param parameter_assignments: The parameter_assignments of this V1beta1OptimalTrial. # noqa: E501 + :type: list[V1beta1ParameterAssignment] + """ + if parameter_assignments is None: + raise ValueError("Invalid value for `parameter_assignments`, must not be `None`") # noqa: E501 + + self._parameter_assignments = parameter_assignments + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1OptimalTrial, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1OptimalTrial): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py new file mode 100644 index 00000000000..cd49d65c24a --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py @@ -0,0 +1,141 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1ParameterAssignment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'value': 'str' + } + + attribute_map = { + 'name': 'name', + 'value': 'value' + } + + def __init__(self, name=None, value=None): # noqa: E501 + """V1beta1ParameterAssignment - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._value = None + self.discriminator = None + + if name is not None: + self.name = name + if value is not None: + self.value = value + + @property + def name(self): + """Gets the name of this V1beta1ParameterAssignment. # noqa: E501 + + + :return: The name of this V1beta1ParameterAssignment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1ParameterAssignment. + + + :param name: The name of this V1beta1ParameterAssignment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def value(self): + """Gets the value of this V1beta1ParameterAssignment. # noqa: E501 + + + :return: The value of this V1beta1ParameterAssignment. # noqa: E501 + :rtype: str + """ + return self._value + + @value.setter + def value(self, value): + """Sets the value of this V1beta1ParameterAssignment. + + + :param value: The value of this V1beta1ParameterAssignment. # noqa: E501 + :type: str + """ + + self._value = value + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ParameterAssignment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ParameterAssignment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py new file mode 100644 index 00000000000..79d0cef544e --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_feasible_space import V1beta1FeasibleSpace # noqa: F401,E501 + + +class V1beta1ParameterSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'feasible_space': 'V1beta1FeasibleSpace', + 'name': 'str', + 'parameter_type': 'str' + } + + attribute_map = { + 'feasible_space': 'feasibleSpace', + 'name': 'name', + 'parameter_type': 'parameterType' + } + + def __init__(self, feasible_space=None, name=None, parameter_type=None): # noqa: E501 + """V1beta1ParameterSpec - a model defined in Swagger""" # noqa: E501 + + self._feasible_space = None + self._name = None + self._parameter_type = None + self.discriminator = None + + if feasible_space is not None: + self.feasible_space = feasible_space + if name is not None: + self.name = name + if parameter_type is not None: + self.parameter_type = parameter_type + + @property + def feasible_space(self): + """Gets the feasible_space of this V1beta1ParameterSpec. # noqa: E501 + + + :return: The feasible_space of this V1beta1ParameterSpec. # noqa: E501 + :rtype: V1beta1FeasibleSpace + """ + return self._feasible_space + + @feasible_space.setter + def feasible_space(self, feasible_space): + """Sets the feasible_space of this V1beta1ParameterSpec. + + + :param feasible_space: The feasible_space of this V1beta1ParameterSpec. # noqa: E501 + :type: V1beta1FeasibleSpace + """ + + self._feasible_space = feasible_space + + @property + def name(self): + """Gets the name of this V1beta1ParameterSpec. # noqa: E501 + + + :return: The name of this V1beta1ParameterSpec. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1ParameterSpec. + + + :param name: The name of this V1beta1ParameterSpec. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def parameter_type(self): + """Gets the parameter_type of this V1beta1ParameterSpec. # noqa: E501 + + + :return: The parameter_type of this V1beta1ParameterSpec. # noqa: E501 + :rtype: str + """ + return self._parameter_type + + @parameter_type.setter + def parameter_type(self, parameter_type): + """Sets the parameter_type of this V1beta1ParameterSpec. + + + :param parameter_type: The parameter_type of this V1beta1ParameterSpec. # noqa: E501 + :type: str + """ + + self._parameter_type = parameter_type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1ParameterSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1ParameterSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py new file mode 100644 index 00000000000..b6fc85c6fab --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py @@ -0,0 +1,177 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_file_system_path import V1beta1FileSystemPath # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_filter_spec import V1beta1FilterSpec # noqa: F401,E501 +from kubernetes.client import V1HTTPGetAction # noqa: F401,E501 + + +class V1beta1SourceSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'file_system_path': 'V1beta1FileSystemPath', + 'filter': 'V1beta1FilterSpec', + 'http_get': 'V1HTTPGetAction' + } + + attribute_map = { + 'file_system_path': 'fileSystemPath', + 'filter': 'filter', + 'http_get': 'httpGet' + } + + def __init__(self, file_system_path=None, filter=None, http_get=None): # noqa: E501 + """V1beta1SourceSpec - a model defined in Swagger""" # noqa: E501 + + self._file_system_path = None + self._filter = None + self._http_get = None + self.discriminator = None + + if file_system_path is not None: + self.file_system_path = file_system_path + if filter is not None: + self.filter = filter + if http_get is not None: + self.http_get = http_get + + @property + def file_system_path(self): + """Gets the file_system_path of this V1beta1SourceSpec. # noqa: E501 + + During training model, metrics may be persisted into local file in source code, such as tfEvent use case # noqa: E501 + + :return: The file_system_path of this V1beta1SourceSpec. # noqa: E501 + :rtype: V1beta1FileSystemPath + """ + return self._file_system_path + + @file_system_path.setter + def file_system_path(self, file_system_path): + """Sets the file_system_path of this V1beta1SourceSpec. + + During training model, metrics may be persisted into local file in source code, such as tfEvent use case # noqa: E501 + + :param file_system_path: The file_system_path of this V1beta1SourceSpec. # noqa: E501 + :type: V1beta1FileSystemPath + """ + + self._file_system_path = file_system_path + + @property + def filter(self): + """Gets the filter of this V1beta1SourceSpec. # noqa: E501 + + Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here # noqa: E501 + + :return: The filter of this V1beta1SourceSpec. # noqa: E501 + :rtype: V1beta1FilterSpec + """ + return self._filter + + @filter.setter + def filter(self, filter): + """Sets the filter of this V1beta1SourceSpec. + + Default metric output format is {\"metric\": \"\", \"value\": , \"epoch\": , \"step\": }, but if the output doesn't follow default format, please extend it here # noqa: E501 + + :param filter: The filter of this V1beta1SourceSpec. # noqa: E501 + :type: V1beta1FilterSpec + """ + + self._filter = filter + + @property + def http_get(self): + """Gets the http_get of this V1beta1SourceSpec. # noqa: E501 + + Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format # noqa: E501 + + :return: The http_get of this V1beta1SourceSpec. # noqa: E501 + :rtype: V1HTTPGetAction + """ + return self._http_get + + @http_get.setter + def http_get(self, http_get): + """Sets the http_get of this V1beta1SourceSpec. + + Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format # noqa: E501 + + :param http_get: The http_get of this V1beta1SourceSpec. # noqa: E501 + :type: V1HTTPGetAction + """ + + self._http_get = http_get + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1SourceSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SourceSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py new file mode 100644 index 00000000000..2810ab32f18 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_suggestion_spec import V1beta1SuggestionSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_suggestion_status import V1beta1SuggestionStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + + +class V1beta1Suggestion(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1SuggestionSpec', + 'status': 'V1beta1SuggestionStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None): # noqa: E501 + """V1beta1Suggestion - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1Suggestion. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1Suggestion. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1Suggestion. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1Suggestion. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1Suggestion. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1Suggestion. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1Suggestion. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1Suggestion. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1Suggestion. # noqa: E501 + + + :return: The metadata of this V1beta1Suggestion. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1Suggestion. + + + :param metadata: The metadata of this V1beta1Suggestion. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1Suggestion. # noqa: E501 + + + :return: The spec of this V1beta1Suggestion. # noqa: E501 + :rtype: V1beta1SuggestionSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1Suggestion. + + + :param spec: The spec of this V1beta1Suggestion. # noqa: E501 + :type: V1beta1SuggestionSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1Suggestion. # noqa: E501 + + + :return: The status of this V1beta1Suggestion. # noqa: E501 + :rtype: V1beta1SuggestionStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1Suggestion. + + + :param status: The status of this V1beta1Suggestion. # noqa: E501 + :type: V1beta1SuggestionStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Suggestion, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Suggestion): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py new file mode 100644 index 00000000000..168ecca19c4 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + + +class V1beta1SuggestionCondition(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last_transition_time': 'V1Time', + 'last_update_time': 'V1Time', + 'message': 'str', + 'reason': 'str', + 'status': 'str', + 'type': 'str' + } + + attribute_map = { + 'last_transition_time': 'lastTransitionTime', + 'last_update_time': 'lastUpdateTime', + 'message': 'message', + 'reason': 'reason', + 'status': 'status', + 'type': 'type' + } + + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status=None, type=None): # noqa: E501 + """V1beta1SuggestionCondition - a model defined in Swagger""" # noqa: E501 + + self._last_transition_time = None + self._last_update_time = None + self._message = None + self._reason = None + self._status = None + self._type = None + self.discriminator = None + + if last_transition_time is not None: + self.last_transition_time = last_transition_time + if last_update_time is not None: + self.last_update_time = last_update_time + if message is not None: + self.message = message + if reason is not None: + self.reason = reason + self.status = status + self.type = type + + @property + def last_transition_time(self): + """Gets the last_transition_time of this V1beta1SuggestionCondition. # noqa: E501 + + Last time the condition transitioned from one status to another. # noqa: E501 + + :return: The last_transition_time of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_transition_time + + @last_transition_time.setter + def last_transition_time(self, last_transition_time): + """Sets the last_transition_time of this V1beta1SuggestionCondition. + + Last time the condition transitioned from one status to another. # noqa: E501 + + :param last_transition_time: The last_transition_time of this V1beta1SuggestionCondition. # noqa: E501 + :type: V1Time + """ + + self._last_transition_time = last_transition_time + + @property + def last_update_time(self): + """Gets the last_update_time of this V1beta1SuggestionCondition. # noqa: E501 + + The last time this condition was updated. # noqa: E501 + + :return: The last_update_time of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_update_time + + @last_update_time.setter + def last_update_time(self, last_update_time): + """Sets the last_update_time of this V1beta1SuggestionCondition. + + The last time this condition was updated. # noqa: E501 + + :param last_update_time: The last_update_time of this V1beta1SuggestionCondition. # noqa: E501 + :type: V1Time + """ + + self._last_update_time = last_update_time + + @property + def message(self): + """Gets the message of this V1beta1SuggestionCondition. # noqa: E501 + + A human readable message indicating details about the transition. # noqa: E501 + + :return: The message of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this V1beta1SuggestionCondition. + + A human readable message indicating details about the transition. # noqa: E501 + + :param message: The message of this V1beta1SuggestionCondition. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def reason(self): + """Gets the reason of this V1beta1SuggestionCondition. # noqa: E501 + + The reason for the condition's last transition. # noqa: E501 + + :return: The reason of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this V1beta1SuggestionCondition. + + The reason for the condition's last transition. # noqa: E501 + + :param reason: The reason of this V1beta1SuggestionCondition. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def status(self): + """Gets the status of this V1beta1SuggestionCondition. # noqa: E501 + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :return: The status of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1SuggestionCondition. + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :param status: The status of this V1beta1SuggestionCondition. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def type(self): + """Gets the type of this V1beta1SuggestionCondition. # noqa: E501 + + Type of Suggestion condition. # noqa: E501 + + :return: The type of this V1beta1SuggestionCondition. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1SuggestionCondition. + + Type of Suggestion condition. # noqa: E501 + + :param type: The type of this V1beta1SuggestionCondition. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1SuggestionCondition, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SuggestionCondition): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py new file mode 100644 index 00000000000..21468f5289d --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_suggestion import V1beta1Suggestion # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + + +class V1beta1SuggestionList(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'items': 'list[V1beta1Suggestion]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 + """V1beta1SuggestionList - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1SuggestionList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1SuggestionList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1SuggestionList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1SuggestionList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1SuggestionList. # noqa: E501 + + + :return: The items of this V1beta1SuggestionList. # noqa: E501 + :rtype: list[V1beta1Suggestion] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1SuggestionList. + + + :param items: The items of this V1beta1SuggestionList. # noqa: E501 + :type: list[V1beta1Suggestion] + """ + if items is None: + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1SuggestionList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1SuggestionList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1SuggestionList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1SuggestionList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1SuggestionList. # noqa: E501 + + + :return: The metadata of this V1beta1SuggestionList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1SuggestionList. + + + :param metadata: The metadata of this V1beta1SuggestionList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1SuggestionList, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SuggestionList): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py new file mode 100644 index 00000000000..1aff6b04182 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py @@ -0,0 +1,144 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1SuggestionSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'algorithm_name': 'str', + 'requests': 'int' + } + + attribute_map = { + 'algorithm_name': 'algorithmName', + 'requests': 'requests' + } + + def __init__(self, algorithm_name=None, requests=None): # noqa: E501 + """V1beta1SuggestionSpec - a model defined in Swagger""" # noqa: E501 + + self._algorithm_name = None + self._requests = None + self.discriminator = None + + self.algorithm_name = algorithm_name + if requests is not None: + self.requests = requests + + @property + def algorithm_name(self): + """Gets the algorithm_name of this V1beta1SuggestionSpec. # noqa: E501 + + + :return: The algorithm_name of this V1beta1SuggestionSpec. # noqa: E501 + :rtype: str + """ + return self._algorithm_name + + @algorithm_name.setter + def algorithm_name(self, algorithm_name): + """Sets the algorithm_name of this V1beta1SuggestionSpec. + + + :param algorithm_name: The algorithm_name of this V1beta1SuggestionSpec. # noqa: E501 + :type: str + """ + if algorithm_name is None: + raise ValueError("Invalid value for `algorithm_name`, must not be `None`") # noqa: E501 + + self._algorithm_name = algorithm_name + + @property + def requests(self): + """Gets the requests of this V1beta1SuggestionSpec. # noqa: E501 + + Number of suggestions requested # noqa: E501 + + :return: The requests of this V1beta1SuggestionSpec. # noqa: E501 + :rtype: int + """ + return self._requests + + @requests.setter + def requests(self, requests): + """Sets the requests of this V1beta1SuggestionSpec. + + Number of suggestions requested # noqa: E501 + + :param requests: The requests of this V1beta1SuggestionSpec. # noqa: E501 + :type: int + """ + + self._requests = requests + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1SuggestionSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SuggestionSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py new file mode 100644 index 00000000000..7fa2833c24e --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py @@ -0,0 +1,290 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_suggestion_condition import V1beta1SuggestionCondition # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_trial_assignment import V1beta1TrialAssignment # noqa: F401,E501 + + +class V1beta1SuggestionStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'algorithm_settings': 'list[V1beta1AlgorithmSetting]', + 'completion_time': 'V1Time', + 'conditions': 'list[V1beta1SuggestionCondition]', + 'last_reconcile_time': 'V1Time', + 'start_time': 'V1Time', + 'suggestion_count': 'int', + 'suggestions': 'list[V1beta1TrialAssignment]' + } + + attribute_map = { + 'algorithm_settings': 'algorithmSettings', + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'last_reconcile_time': 'lastReconcileTime', + 'start_time': 'startTime', + 'suggestion_count': 'suggestionCount', + 'suggestions': 'suggestions' + } + + def __init__(self, algorithm_settings=None, completion_time=None, conditions=None, last_reconcile_time=None, start_time=None, suggestion_count=None, suggestions=None): # noqa: E501 + """V1beta1SuggestionStatus - a model defined in Swagger""" # noqa: E501 + + self._algorithm_settings = None + self._completion_time = None + self._conditions = None + self._last_reconcile_time = None + self._start_time = None + self._suggestion_count = None + self._suggestions = None + self.discriminator = None + + if algorithm_settings is not None: + self.algorithm_settings = algorithm_settings + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if last_reconcile_time is not None: + self.last_reconcile_time = last_reconcile_time + if start_time is not None: + self.start_time = start_time + if suggestion_count is not None: + self.suggestion_count = suggestion_count + if suggestions is not None: + self.suggestions = suggestions + + @property + def algorithm_settings(self): + """Gets the algorithm_settings of this V1beta1SuggestionStatus. # noqa: E501 + + Algorithmsettings set by the algorithm services. # noqa: E501 + + :return: The algorithm_settings of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: list[V1beta1AlgorithmSetting] + """ + return self._algorithm_settings + + @algorithm_settings.setter + def algorithm_settings(self, algorithm_settings): + """Sets the algorithm_settings of this V1beta1SuggestionStatus. + + Algorithmsettings set by the algorithm services. # noqa: E501 + + :param algorithm_settings: The algorithm_settings of this V1beta1SuggestionStatus. # noqa: E501 + :type: list[V1beta1AlgorithmSetting] + """ + + self._algorithm_settings = algorithm_settings + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1SuggestionStatus. # noqa: E501 + + Represents time when the Suggestion 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. # noqa: E501 + + :return: The completion_time of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1SuggestionStatus. + + Represents time when the Suggestion 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. # noqa: E501 + + :param completion_time: The completion_time of this V1beta1SuggestionStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1SuggestionStatus. # noqa: E501 + + List of observed runtime conditions for this Suggestion. # noqa: E501 + + :return: The conditions of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: list[V1beta1SuggestionCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1SuggestionStatus. + + List of observed runtime conditions for this Suggestion. # noqa: E501 + + :param conditions: The conditions of this V1beta1SuggestionStatus. # noqa: E501 + :type: list[V1beta1SuggestionCondition] + """ + + self._conditions = conditions + + @property + def last_reconcile_time(self): + """Gets the last_reconcile_time of this V1beta1SuggestionStatus. # noqa: E501 + + Represents last time when the Suggestion 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. # noqa: E501 + + :return: The last_reconcile_time of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: V1Time + """ + return self._last_reconcile_time + + @last_reconcile_time.setter + def last_reconcile_time(self, last_reconcile_time): + """Sets the last_reconcile_time of this V1beta1SuggestionStatus. + + Represents last time when the Suggestion 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. # noqa: E501 + + :param last_reconcile_time: The last_reconcile_time of this V1beta1SuggestionStatus. # noqa: E501 + :type: V1Time + """ + + self._last_reconcile_time = last_reconcile_time + + @property + def start_time(self): + """Gets the start_time of this V1beta1SuggestionStatus. # noqa: E501 + + Represents time when the Suggestion was acknowledged by the Suggestion 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. # noqa: E501 + + :return: The start_time of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1SuggestionStatus. + + Represents time when the Suggestion was acknowledged by the Suggestion 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. # noqa: E501 + + :param start_time: The start_time of this V1beta1SuggestionStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + @property + def suggestion_count(self): + """Gets the suggestion_count of this V1beta1SuggestionStatus. # noqa: E501 + + Number of suggestion results # noqa: E501 + + :return: The suggestion_count of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: int + """ + return self._suggestion_count + + @suggestion_count.setter + def suggestion_count(self, suggestion_count): + """Sets the suggestion_count of this V1beta1SuggestionStatus. + + Number of suggestion results # noqa: E501 + + :param suggestion_count: The suggestion_count of this V1beta1SuggestionStatus. # noqa: E501 + :type: int + """ + + self._suggestion_count = suggestion_count + + @property + def suggestions(self): + """Gets the suggestions of this V1beta1SuggestionStatus. # noqa: E501 + + Suggestion results # noqa: E501 + + :return: The suggestions of this V1beta1SuggestionStatus. # noqa: E501 + :rtype: list[V1beta1TrialAssignment] + """ + return self._suggestions + + @suggestions.setter + def suggestions(self, suggestions): + """Sets the suggestions of this V1beta1SuggestionStatus. + + Suggestion results # noqa: E501 + + :param suggestions: The suggestions of this V1beta1SuggestionStatus. # noqa: E501 + :type: list[V1beta1TrialAssignment] + """ + + self._suggestions = suggestions + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1SuggestionStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1SuggestionStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py new file mode 100644 index 00000000000..6ac83779725 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py @@ -0,0 +1,227 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_trial_spec import V1beta1TrialSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_trial_status import V1beta1TrialStatus # noqa: F401,E501 +from kubernetes.client import V1ObjectMeta # noqa: F401,E501 + + +class V1beta1Trial(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'kind': 'str', + 'metadata': 'V1ObjectMeta', + 'spec': 'V1beta1TrialSpec', + 'status': 'V1beta1TrialStatus' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'kind': 'kind', + 'metadata': 'metadata', + 'spec': 'spec', + 'status': 'status' + } + + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None): # noqa: E501 + """V1beta1Trial - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._kind = None + self._metadata = None + self._spec = None + self._status = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + if spec is not None: + self.spec = spec + if status is not None: + self.status = status + + @property + def api_version(self): + """Gets the api_version of this V1beta1Trial. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1Trial. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1Trial. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1Trial. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def kind(self): + """Gets the kind of this V1beta1Trial. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1Trial. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1Trial. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1Trial. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1Trial. # noqa: E501 + + + :return: The metadata of this V1beta1Trial. # noqa: E501 + :rtype: V1ObjectMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1Trial. + + + :param metadata: The metadata of this V1beta1Trial. # noqa: E501 + :type: V1ObjectMeta + """ + + self._metadata = metadata + + @property + def spec(self): + """Gets the spec of this V1beta1Trial. # noqa: E501 + + + :return: The spec of this V1beta1Trial. # noqa: E501 + :rtype: V1beta1TrialSpec + """ + return self._spec + + @spec.setter + def spec(self, spec): + """Sets the spec of this V1beta1Trial. + + + :param spec: The spec of this V1beta1Trial. # noqa: E501 + :type: V1beta1TrialSpec + """ + + self._spec = spec + + @property + def status(self): + """Gets the status of this V1beta1Trial. # noqa: E501 + + + :return: The status of this V1beta1Trial. # noqa: E501 + :rtype: V1beta1TrialStatus + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1Trial. + + + :param status: The status of this V1beta1Trial. # noqa: E501 + :type: V1beta1TrialStatus + """ + + self._status = status + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1Trial, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1Trial): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py new file mode 100644 index 00000000000..a7166dea1bd --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py @@ -0,0 +1,147 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment # noqa: F401,E501 + + +class V1beta1TrialAssignment(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'name': 'str', + 'parameter_assignments': 'list[V1beta1ParameterAssignment]' + } + + attribute_map = { + 'name': 'name', + 'parameter_assignments': 'parameterAssignments' + } + + def __init__(self, name=None, parameter_assignments=None): # noqa: E501 + """V1beta1TrialAssignment - a model defined in Swagger""" # noqa: E501 + + self._name = None + self._parameter_assignments = None + self.discriminator = None + + if name is not None: + self.name = name + if parameter_assignments is not None: + self.parameter_assignments = parameter_assignments + + @property + def name(self): + """Gets the name of this V1beta1TrialAssignment. # noqa: E501 + + Name of the suggestion # noqa: E501 + + :return: The name of this V1beta1TrialAssignment. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TrialAssignment. + + Name of the suggestion # noqa: E501 + + :param name: The name of this V1beta1TrialAssignment. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def parameter_assignments(self): + """Gets the parameter_assignments of this V1beta1TrialAssignment. # noqa: E501 + + Suggestion results # noqa: E501 + + :return: The parameter_assignments of this V1beta1TrialAssignment. # noqa: E501 + :rtype: list[V1beta1ParameterAssignment] + """ + return self._parameter_assignments + + @parameter_assignments.setter + def parameter_assignments(self, parameter_assignments): + """Sets the parameter_assignments of this V1beta1TrialAssignment. + + Suggestion results # noqa: E501 + + :param parameter_assignments: The parameter_assignments of this V1beta1TrialAssignment. # noqa: E501 + :type: list[V1beta1ParameterAssignment] + """ + + self._parameter_assignments = parameter_assignments + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialAssignment, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialAssignment): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py new file mode 100644 index 00000000000..bfc030a0923 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py @@ -0,0 +1,261 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 + + +class V1beta1TrialCondition(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'last_transition_time': 'V1Time', + 'last_update_time': 'V1Time', + 'message': 'str', + 'reason': 'str', + 'status': 'str', + 'type': 'str' + } + + attribute_map = { + 'last_transition_time': 'lastTransitionTime', + 'last_update_time': 'lastUpdateTime', + 'message': 'message', + 'reason': 'reason', + 'status': 'status', + 'type': 'type' + } + + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status=None, type=None): # noqa: E501 + """V1beta1TrialCondition - a model defined in Swagger""" # noqa: E501 + + self._last_transition_time = None + self._last_update_time = None + self._message = None + self._reason = None + self._status = None + self._type = None + self.discriminator = None + + if last_transition_time is not None: + self.last_transition_time = last_transition_time + if last_update_time is not None: + self.last_update_time = last_update_time + if message is not None: + self.message = message + if reason is not None: + self.reason = reason + self.status = status + self.type = type + + @property + def last_transition_time(self): + """Gets the last_transition_time of this V1beta1TrialCondition. # noqa: E501 + + Last time the condition transitioned from one status to another. # noqa: E501 + + :return: The last_transition_time of this V1beta1TrialCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_transition_time + + @last_transition_time.setter + def last_transition_time(self, last_transition_time): + """Sets the last_transition_time of this V1beta1TrialCondition. + + Last time the condition transitioned from one status to another. # noqa: E501 + + :param last_transition_time: The last_transition_time of this V1beta1TrialCondition. # noqa: E501 + :type: V1Time + """ + + self._last_transition_time = last_transition_time + + @property + def last_update_time(self): + """Gets the last_update_time of this V1beta1TrialCondition. # noqa: E501 + + The last time this condition was updated. # noqa: E501 + + :return: The last_update_time of this V1beta1TrialCondition. # noqa: E501 + :rtype: V1Time + """ + return self._last_update_time + + @last_update_time.setter + def last_update_time(self, last_update_time): + """Sets the last_update_time of this V1beta1TrialCondition. + + The last time this condition was updated. # noqa: E501 + + :param last_update_time: The last_update_time of this V1beta1TrialCondition. # noqa: E501 + :type: V1Time + """ + + self._last_update_time = last_update_time + + @property + def message(self): + """Gets the message of this V1beta1TrialCondition. # noqa: E501 + + A human readable message indicating details about the transition. # noqa: E501 + + :return: The message of this V1beta1TrialCondition. # noqa: E501 + :rtype: str + """ + return self._message + + @message.setter + def message(self, message): + """Sets the message of this V1beta1TrialCondition. + + A human readable message indicating details about the transition. # noqa: E501 + + :param message: The message of this V1beta1TrialCondition. # noqa: E501 + :type: str + """ + + self._message = message + + @property + def reason(self): + """Gets the reason of this V1beta1TrialCondition. # noqa: E501 + + The reason for the condition's last transition. # noqa: E501 + + :return: The reason of this V1beta1TrialCondition. # noqa: E501 + :rtype: str + """ + return self._reason + + @reason.setter + def reason(self, reason): + """Sets the reason of this V1beta1TrialCondition. + + The reason for the condition's last transition. # noqa: E501 + + :param reason: The reason of this V1beta1TrialCondition. # noqa: E501 + :type: str + """ + + self._reason = reason + + @property + def status(self): + """Gets the status of this V1beta1TrialCondition. # noqa: E501 + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :return: The status of this V1beta1TrialCondition. # noqa: E501 + :rtype: str + """ + return self._status + + @status.setter + def status(self, status): + """Sets the status of this V1beta1TrialCondition. + + Status of the condition, one of True, False, Unknown. # noqa: E501 + + :param status: The status of this V1beta1TrialCondition. # noqa: E501 + :type: str + """ + if status is None: + raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 + + self._status = status + + @property + def type(self): + """Gets the type of this V1beta1TrialCondition. # noqa: E501 + + Type of trial condition. # noqa: E501 + + :return: The type of this V1beta1TrialCondition. # noqa: E501 + :rtype: str + """ + return self._type + + @type.setter + def type(self, type): + """Sets the type of this V1beta1TrialCondition. + + Type of trial condition. # noqa: E501 + + :param type: The type of this V1beta1TrialCondition. # noqa: E501 + :type: str + """ + if type is None: + raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 + + self._type = type + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialCondition, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialCondition): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py new file mode 100644 index 00000000000..ae430eee9a8 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py @@ -0,0 +1,201 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1beta1_trial import V1beta1Trial # noqa: F401,E501 +from kubernetes.client import V1ListMeta # noqa: F401,E501 + + +class V1beta1TrialList(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'api_version': 'str', + 'items': 'list[V1beta1Trial]', + 'kind': 'str', + 'metadata': 'V1ListMeta' + } + + attribute_map = { + 'api_version': 'apiVersion', + 'items': 'items', + 'kind': 'kind', + 'metadata': 'metadata' + } + + def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 + """V1beta1TrialList - a model defined in Swagger""" # noqa: E501 + + self._api_version = None + self._items = None + self._kind = None + self._metadata = None + self.discriminator = None + + if api_version is not None: + self.api_version = api_version + self.items = items + if kind is not None: + self.kind = kind + if metadata is not None: + self.metadata = metadata + + @property + def api_version(self): + """Gets the api_version of this V1beta1TrialList. # noqa: E501 + + 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 # noqa: E501 + + :return: The api_version of this V1beta1TrialList. # noqa: E501 + :rtype: str + """ + return self._api_version + + @api_version.setter + def api_version(self, api_version): + """Sets the api_version of this V1beta1TrialList. + + 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 # noqa: E501 + + :param api_version: The api_version of this V1beta1TrialList. # noqa: E501 + :type: str + """ + + self._api_version = api_version + + @property + def items(self): + """Gets the items of this V1beta1TrialList. # noqa: E501 + + + :return: The items of this V1beta1TrialList. # noqa: E501 + :rtype: list[V1beta1Trial] + """ + return self._items + + @items.setter + def items(self, items): + """Sets the items of this V1beta1TrialList. + + + :param items: The items of this V1beta1TrialList. # noqa: E501 + :type: list[V1beta1Trial] + """ + if items is None: + raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 + + self._items = items + + @property + def kind(self): + """Gets the kind of this V1beta1TrialList. # noqa: E501 + + 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 # noqa: E501 + + :return: The kind of this V1beta1TrialList. # noqa: E501 + :rtype: str + """ + return self._kind + + @kind.setter + def kind(self, kind): + """Sets the kind of this V1beta1TrialList. + + 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 # noqa: E501 + + :param kind: The kind of this V1beta1TrialList. # noqa: E501 + :type: str + """ + + self._kind = kind + + @property + def metadata(self): + """Gets the metadata of this V1beta1TrialList. # noqa: E501 + + + :return: The metadata of this V1beta1TrialList. # noqa: E501 + :rtype: V1ListMeta + """ + return self._metadata + + @metadata.setter + def metadata(self, metadata): + """Sets the metadata of this V1beta1TrialList. + + + :param metadata: The metadata of this V1beta1TrialList. # noqa: E501 + :type: V1ListMeta + """ + + self._metadata = metadata + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialList, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialList): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_parameter_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_parameter_spec.py new file mode 100644 index 00000000000..e65fd89748f --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_parameter_spec.py @@ -0,0 +1,173 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + + +class V1beta1TrialParameterSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'description': 'str', + 'name': 'str', + 'reference': 'str' + } + + attribute_map = { + 'description': 'description', + 'name': 'name', + 'reference': 'reference' + } + + def __init__(self, description=None, name=None, reference=None): # noqa: E501 + """V1beta1TrialParameterSpec - a model defined in Swagger""" # noqa: E501 + + self._description = None + self._name = None + self._reference = None + self.discriminator = None + + if description is not None: + self.description = description + if name is not None: + self.name = name + if reference is not None: + self.reference = reference + + @property + def description(self): + """Gets the description of this V1beta1TrialParameterSpec. # noqa: E501 + + Description of the parameter # noqa: E501 + + :return: The description of this V1beta1TrialParameterSpec. # noqa: E501 + :rtype: str + """ + return self._description + + @description.setter + def description(self, description): + """Sets the description of this V1beta1TrialParameterSpec. + + Description of the parameter # noqa: E501 + + :param description: The description of this V1beta1TrialParameterSpec. # noqa: E501 + :type: str + """ + + self._description = description + + @property + def name(self): + """Gets the name of this V1beta1TrialParameterSpec. # noqa: E501 + + Name of the parameter that must be replaced in trial template # noqa: E501 + + :return: The name of this V1beta1TrialParameterSpec. # noqa: E501 + :rtype: str + """ + return self._name + + @name.setter + def name(self, name): + """Sets the name of this V1beta1TrialParameterSpec. + + Name of the parameter that must be replaced in trial template # noqa: E501 + + :param name: The name of this V1beta1TrialParameterSpec. # noqa: E501 + :type: str + """ + + self._name = name + + @property + def reference(self): + """Gets the reference of this V1beta1TrialParameterSpec. # noqa: E501 + + Reference to the parameter in search space # noqa: E501 + + :return: The reference of this V1beta1TrialParameterSpec. # noqa: E501 + :rtype: str + """ + return self._reference + + @reference.setter + def reference(self, reference): + """Sets the reference of this V1beta1TrialParameterSpec. + + Reference to the parameter in search space # noqa: E501 + + :param reference: The reference of this V1beta1TrialParameterSpec. # noqa: E501 + :type: str + """ + + self._reference = reference + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialParameterSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialParameterSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py new file mode 100644 index 00000000000..9c4f45432d2 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py @@ -0,0 +1,148 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: F401,E501 + + +class V1beta1TrialSource(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'config_map': 'V1beta1ConfigMapSource', + 'trial_spec': 'V1UnstructuredUnstructured' + } + + attribute_map = { + 'config_map': 'configMap', + 'trial_spec': 'trialSpec' + } + + def __init__(self, config_map=None, trial_spec=None): # noqa: E501 + """V1beta1TrialSource - a model defined in Swagger""" # noqa: E501 + + self._config_map = None + self._trial_spec = None + self.discriminator = None + + if config_map is not None: + self.config_map = config_map + if trial_spec is not None: + self.trial_spec = trial_spec + + @property + def config_map(self): + """Gets the config_map of this V1beta1TrialSource. # noqa: E501 + + ConfigMap spec represents a reference to ConfigMap # noqa: E501 + + :return: The config_map of this V1beta1TrialSource. # noqa: E501 + :rtype: V1beta1ConfigMapSource + """ + return self._config_map + + @config_map.setter + def config_map(self, config_map): + """Sets the config_map of this V1beta1TrialSource. + + ConfigMap spec represents a reference to ConfigMap # noqa: E501 + + :param config_map: The config_map of this V1beta1TrialSource. # noqa: E501 + :type: V1beta1ConfigMapSource + """ + + self._config_map = config_map + + @property + def trial_spec(self): + """Gets the trial_spec of this V1beta1TrialSource. # noqa: E501 + + TrialSpec represents trial template in unstructured format # noqa: E501 + + :return: The trial_spec of this V1beta1TrialSource. # noqa: E501 + :rtype: V1UnstructuredUnstructured + """ + return self._trial_spec + + @trial_spec.setter + def trial_spec(self, trial_spec): + """Sets the trial_spec of this V1beta1TrialSource. + + TrialSpec represents trial template in unstructured format # noqa: E501 + + :param trial_spec: The trial_spec of this V1beta1TrialSource. # noqa: E501 + :type: V1UnstructuredUnstructured + """ + + self._trial_spec = trial_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialSource, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialSource): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py new file mode 100644 index 00000000000..e3a912deb76 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py @@ -0,0 +1,235 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_metrics_collector_spec import V1beta1MetricsCollectorSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_objective_spec import V1beta1ObjectiveSpec # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment # noqa: F401,E501 + + +class V1beta1TrialSpec(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'metrics_collector': 'V1beta1MetricsCollectorSpec', + 'objective': 'V1beta1ObjectiveSpec', + 'parameter_assignments': 'list[V1beta1ParameterAssignment]', + 'retain_run': 'bool', + 'run_spec': 'V1UnstructuredUnstructured' + } + + attribute_map = { + 'metrics_collector': 'metricsCollector', + 'objective': 'objective', + 'parameter_assignments': 'parameterAssignments', + 'retain_run': 'retainRun', + 'run_spec': 'runSpec' + } + + def __init__(self, metrics_collector=None, objective=None, parameter_assignments=None, retain_run=None, run_spec=None): # noqa: E501 + """V1beta1TrialSpec - a model defined in Swagger""" # noqa: E501 + + self._metrics_collector = None + self._objective = None + self._parameter_assignments = None + self._retain_run = None + self._run_spec = None + self.discriminator = None + + if metrics_collector is not None: + self.metrics_collector = metrics_collector + if objective is not None: + self.objective = objective + self.parameter_assignments = parameter_assignments + if retain_run is not None: + self.retain_run = retain_run + if run_spec is not None: + self.run_spec = run_spec + + @property + def metrics_collector(self): + """Gets the metrics_collector of this V1beta1TrialSpec. # noqa: E501 + + Describes how metrics will be collected # noqa: E501 + + :return: The metrics_collector of this V1beta1TrialSpec. # noqa: E501 + :rtype: V1beta1MetricsCollectorSpec + """ + return self._metrics_collector + + @metrics_collector.setter + def metrics_collector(self, metrics_collector): + """Sets the metrics_collector of this V1beta1TrialSpec. + + Describes how metrics will be collected # noqa: E501 + + :param metrics_collector: The metrics_collector of this V1beta1TrialSpec. # noqa: E501 + :type: V1beta1MetricsCollectorSpec + """ + + self._metrics_collector = metrics_collector + + @property + def objective(self): + """Gets the objective of this V1beta1TrialSpec. # noqa: E501 + + Describes the objective of the experiment. # noqa: E501 + + :return: The objective of this V1beta1TrialSpec. # noqa: E501 + :rtype: V1beta1ObjectiveSpec + """ + return self._objective + + @objective.setter + def objective(self, objective): + """Sets the objective of this V1beta1TrialSpec. + + Describes the objective of the experiment. # noqa: E501 + + :param objective: The objective of this V1beta1TrialSpec. # noqa: E501 + :type: V1beta1ObjectiveSpec + """ + + self._objective = objective + + @property + def parameter_assignments(self): + """Gets the parameter_assignments of this V1beta1TrialSpec. # noqa: E501 + + Key-value pairs for hyperparameters and assignment values. # noqa: E501 + + :return: The parameter_assignments of this V1beta1TrialSpec. # noqa: E501 + :rtype: list[V1beta1ParameterAssignment] + """ + return self._parameter_assignments + + @parameter_assignments.setter + def parameter_assignments(self, parameter_assignments): + """Sets the parameter_assignments of this V1beta1TrialSpec. + + Key-value pairs for hyperparameters and assignment values. # noqa: E501 + + :param parameter_assignments: The parameter_assignments of this V1beta1TrialSpec. # noqa: E501 + :type: list[V1beta1ParameterAssignment] + """ + if parameter_assignments is None: + raise ValueError("Invalid value for `parameter_assignments`, must not be `None`") # noqa: E501 + + self._parameter_assignments = parameter_assignments + + @property + def retain_run(self): + """Gets the retain_run of this V1beta1TrialSpec. # noqa: E501 + + Whether to retain the trial run object after completed. # noqa: E501 + + :return: The retain_run of this V1beta1TrialSpec. # noqa: E501 + :rtype: bool + """ + return self._retain_run + + @retain_run.setter + def retain_run(self, retain_run): + """Sets the retain_run of this V1beta1TrialSpec. + + Whether to retain the trial run object after completed. # noqa: E501 + + :param retain_run: The retain_run of this V1beta1TrialSpec. # noqa: E501 + :type: bool + """ + + self._retain_run = retain_run + + @property + def run_spec(self): + """Gets the run_spec of this V1beta1TrialSpec. # noqa: E501 + + Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. # noqa: E501 + + :return: The run_spec of this V1beta1TrialSpec. # noqa: E501 + :rtype: V1UnstructuredUnstructured + """ + return self._run_spec + + @run_spec.setter + def run_spec(self, run_spec): + """Sets the run_spec of this V1beta1TrialSpec. + + Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. # noqa: E501 + + :param run_spec: The run_spec of this V1beta1TrialSpec. # noqa: E501 + :type: V1UnstructuredUnstructured + """ + + self._run_spec = run_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialSpec, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialSpec): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py new file mode 100644 index 00000000000..bae2c39a461 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py @@ -0,0 +1,233 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_observation import V1beta1Observation # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition # noqa: F401,E501 + + +class V1beta1TrialStatus(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'completion_time': 'V1Time', + 'conditions': 'list[V1beta1TrialCondition]', + 'last_reconcile_time': 'V1Time', + 'observation': 'V1beta1Observation', + 'start_time': 'V1Time' + } + + attribute_map = { + 'completion_time': 'completionTime', + 'conditions': 'conditions', + 'last_reconcile_time': 'lastReconcileTime', + 'observation': 'observation', + 'start_time': 'startTime' + } + + def __init__(self, completion_time=None, conditions=None, last_reconcile_time=None, observation=None, start_time=None): # noqa: E501 + """V1beta1TrialStatus - a model defined in Swagger""" # noqa: E501 + + self._completion_time = None + self._conditions = None + self._last_reconcile_time = None + self._observation = None + self._start_time = None + self.discriminator = None + + if completion_time is not None: + self.completion_time = completion_time + if conditions is not None: + self.conditions = conditions + if last_reconcile_time is not None: + self.last_reconcile_time = last_reconcile_time + if observation is not None: + self.observation = observation + if start_time is not None: + self.start_time = start_time + + @property + def completion_time(self): + """Gets the completion_time of this V1beta1TrialStatus. # noqa: E501 + + Represents time when the Trial 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 # noqa: E501 + + :return: The completion_time of this V1beta1TrialStatus. # noqa: E501 + :rtype: V1Time + """ + return self._completion_time + + @completion_time.setter + def completion_time(self, completion_time): + """Sets the completion_time of this V1beta1TrialStatus. + + Represents time when the Trial 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 # noqa: E501 + + :param completion_time: The completion_time of this V1beta1TrialStatus. # noqa: E501 + :type: V1Time + """ + + self._completion_time = completion_time + + @property + def conditions(self): + """Gets the conditions of this V1beta1TrialStatus. # noqa: E501 + + List of observed runtime conditions for this Trial. # noqa: E501 + + :return: The conditions of this V1beta1TrialStatus. # noqa: E501 + :rtype: list[V1beta1TrialCondition] + """ + return self._conditions + + @conditions.setter + def conditions(self, conditions): + """Sets the conditions of this V1beta1TrialStatus. + + List of observed runtime conditions for this Trial. # noqa: E501 + + :param conditions: The conditions of this V1beta1TrialStatus. # noqa: E501 + :type: list[V1beta1TrialCondition] + """ + + self._conditions = conditions + + @property + def last_reconcile_time(self): + """Gets the last_reconcile_time of this V1beta1TrialStatus. # noqa: E501 + + Represents last time when the Trial 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. # noqa: E501 + + :return: The last_reconcile_time of this V1beta1TrialStatus. # noqa: E501 + :rtype: V1Time + """ + return self._last_reconcile_time + + @last_reconcile_time.setter + def last_reconcile_time(self, last_reconcile_time): + """Sets the last_reconcile_time of this V1beta1TrialStatus. + + Represents last time when the Trial 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. # noqa: E501 + + :param last_reconcile_time: The last_reconcile_time of this V1beta1TrialStatus. # noqa: E501 + :type: V1Time + """ + + self._last_reconcile_time = last_reconcile_time + + @property + def observation(self): + """Gets the observation of this V1beta1TrialStatus. # noqa: E501 + + Results of the Trial - objectives and other metrics values. # noqa: E501 + + :return: The observation of this V1beta1TrialStatus. # noqa: E501 + :rtype: V1beta1Observation + """ + return self._observation + + @observation.setter + def observation(self, observation): + """Sets the observation of this V1beta1TrialStatus. + + Results of the Trial - objectives and other metrics values. # noqa: E501 + + :param observation: The observation of this V1beta1TrialStatus. # noqa: E501 + :type: V1beta1Observation + """ + + self._observation = observation + + @property + def start_time(self): + """Gets the start_time of this V1beta1TrialStatus. # noqa: E501 + + Represents time when the Trial was acknowledged by the Trial 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 # noqa: E501 + + :return: The start_time of this V1beta1TrialStatus. # noqa: E501 + :rtype: V1Time + """ + return self._start_time + + @start_time.setter + def start_time(self, start_time): + """Sets the start_time of this V1beta1TrialStatus. + + Represents time when the Trial was acknowledged by the Trial 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 # noqa: E501 + + :param start_time: The start_time of this V1beta1TrialStatus. # noqa: E501 + :type: V1Time + """ + + self._start_time = start_time + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialStatus, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialStatus): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py new file mode 100644 index 00000000000..f50aa3e5666 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py @@ -0,0 +1,205 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +import pprint +import re # noqa: F401 + +import six + +from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: F401,E501 +from kubeflow.katib.models.v1beta1_trial_parameter_spec import V1beta1TrialParameterSpec # noqa: F401,E501 + + +class V1beta1TrialTemplate(object): + """NOTE: This class is auto generated by the swagger code generator program. + + Do not edit the class manually. + """ + + """ + Attributes: + swagger_types (dict): The key is attribute name + and the value is attribute type. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + """ + swagger_types = { + 'config_map': 'V1beta1ConfigMapSource', + 'retain': 'bool', + 'trial_parameters': 'list[V1beta1TrialParameterSpec]', + 'trial_spec': 'V1UnstructuredUnstructured' + } + + attribute_map = { + 'config_map': 'configMap', + 'retain': 'retain', + 'trial_parameters': 'trialParameters', + 'trial_spec': 'trialSpec' + } + + def __init__(self, config_map=None, retain=None, trial_parameters=None, trial_spec=None): # noqa: E501 + """V1beta1TrialTemplate - a model defined in Swagger""" # noqa: E501 + + self._config_map = None + self._retain = None + self._trial_parameters = None + self._trial_spec = None + self.discriminator = None + + if config_map is not None: + self.config_map = config_map + if retain is not None: + self.retain = retain + if trial_parameters is not None: + self.trial_parameters = trial_parameters + if trial_spec is not None: + self.trial_spec = trial_spec + + @property + def config_map(self): + """Gets the config_map of this V1beta1TrialTemplate. # noqa: E501 + + ConfigMap spec represents a reference to ConfigMap # noqa: E501 + + :return: The config_map of this V1beta1TrialTemplate. # noqa: E501 + :rtype: V1beta1ConfigMapSource + """ + return self._config_map + + @config_map.setter + def config_map(self, config_map): + """Sets the config_map of this V1beta1TrialTemplate. + + ConfigMap spec represents a reference to ConfigMap # noqa: E501 + + :param config_map: The config_map of this V1beta1TrialTemplate. # noqa: E501 + :type: V1beta1ConfigMapSource + """ + + self._config_map = config_map + + @property + def retain(self): + """Gets the retain of this V1beta1TrialTemplate. # noqa: E501 + + Retain indicates that trial resources must be not cleanup # noqa: E501 + + :return: The retain of this V1beta1TrialTemplate. # noqa: E501 + :rtype: bool + """ + return self._retain + + @retain.setter + def retain(self, retain): + """Sets the retain of this V1beta1TrialTemplate. + + Retain indicates that trial resources must be not cleanup # noqa: E501 + + :param retain: The retain of this V1beta1TrialTemplate. # noqa: E501 + :type: bool + """ + + self._retain = retain + + @property + def trial_parameters(self): + """Gets the trial_parameters of this V1beta1TrialTemplate. # noqa: E501 + + List of parameters that are used in trial template # noqa: E501 + + :return: The trial_parameters of this V1beta1TrialTemplate. # noqa: E501 + :rtype: list[V1beta1TrialParameterSpec] + """ + return self._trial_parameters + + @trial_parameters.setter + def trial_parameters(self, trial_parameters): + """Sets the trial_parameters of this V1beta1TrialTemplate. + + List of parameters that are used in trial template # noqa: E501 + + :param trial_parameters: The trial_parameters of this V1beta1TrialTemplate. # noqa: E501 + :type: list[V1beta1TrialParameterSpec] + """ + + self._trial_parameters = trial_parameters + + @property + def trial_spec(self): + """Gets the trial_spec of this V1beta1TrialTemplate. # noqa: E501 + + TrialSpec represents trial template in unstructured format # noqa: E501 + + :return: The trial_spec of this V1beta1TrialTemplate. # noqa: E501 + :rtype: V1UnstructuredUnstructured + """ + return self._trial_spec + + @trial_spec.setter + def trial_spec(self, trial_spec): + """Sets the trial_spec of this V1beta1TrialTemplate. + + TrialSpec represents trial template in unstructured format # noqa: E501 + + :param trial_spec: The trial_spec of this V1beta1TrialTemplate. # noqa: E501 + :type: V1UnstructuredUnstructured + """ + + self._trial_spec = trial_spec + + def to_dict(self): + """Returns the model properties as a dict""" + result = {} + + for attr, _ in six.iteritems(self.swagger_types): + value = getattr(self, attr) + if isinstance(value, list): + result[attr] = list(map( + lambda x: x.to_dict() if hasattr(x, "to_dict") else x, + value + )) + elif hasattr(value, "to_dict"): + result[attr] = value.to_dict() + elif isinstance(value, dict): + result[attr] = dict(map( + lambda item: (item[0], item[1].to_dict()) + if hasattr(item[1], "to_dict") else item, + value.items() + )) + else: + result[attr] = value + if issubclass(V1beta1TrialTemplate, dict): + for key, value in self.items(): + result[key] = value + + return result + + def to_str(self): + """Returns the string representation of the model""" + return pprint.pformat(self.to_dict()) + + def __repr__(self): + """For `print` and `pprint`""" + return self.to_str() + + def __eq__(self, other): + """Returns true if both objects are equal""" + if not isinstance(other, V1beta1TrialTemplate): + return False + + return self.__dict__ == other.__dict__ + + def __ne__(self, other): + """Returns true if both objects are not equal""" + return not self == other diff --git a/sdk/python/kubeflow/katib/rest.py b/sdk/python/v1beta1/kubeflow/katib/rest.py similarity index 99% rename from sdk/python/kubeflow/katib/rest.py rename to sdk/python/v1beta1/kubeflow/katib/rest.py index 68b4250d03e..4d8e3a2e99d 100644 --- a/sdk/python/kubeflow/katib/rest.py +++ b/sdk/python/v1beta1/kubeflow/katib/rest.py @@ -1,11 +1,11 @@ # coding: utf-8 """ - katib + Katib - swagger description for katib # noqa: E501 + Swagger description for Katib # noqa: E501 - OpenAPI spec version: v0.1 + OpenAPI spec version: v1beta1-0.1 Generated by: https://github.com/swagger-api/swagger-codegen.git """ diff --git a/sdk/python/v1beta1/kubeflow/katib/utils/__init__.py b/sdk/python/v1beta1/kubeflow/katib/utils/__init__.py new file mode 100644 index 00000000000..ede60a09abd --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/utils/__init__.py @@ -0,0 +1,13 @@ +# Copyright 2019 kubeflow.org. +# +# 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 +# +# 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. diff --git a/sdk/python/v1beta1/kubeflow/katib/utils/utils.py b/sdk/python/v1beta1/kubeflow/katib/utils/utils.py new file mode 100644 index 00000000000..6e291791b09 --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/utils/utils.py @@ -0,0 +1,35 @@ +# Copyright 2019 kubeflow.org. +# +# 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 +# +# 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. + +import os + +def is_running_in_k8s(): + return os.path.isdir('/var/run/secrets/kubernetes.io/') + + +def get_current_k8s_namespace(): + with open('/var/run/secrets/kubernetes.io/serviceaccount/namespace', 'r') as f: + return f.readline() + + +def get_default_target_namespace(): + if not is_running_in_k8s(): + return 'default' + return get_current_k8s_namespace() + + +def set_katib_namespace(katib): + katib_namespace = katib.metadata.namespace + namespace = katib_namespace or get_default_target_namespace() + return namespace diff --git a/sdk/python/v1beta1/requirements.txt b/sdk/python/v1beta1/requirements.txt new file mode 100644 index 00000000000..7b0e0d448e9 --- /dev/null +++ b/sdk/python/v1beta1/requirements.txt @@ -0,0 +1,7 @@ +certifi>=14.05.14 +six>=1.10 +python_dateutil>=2.5.3 +setuptools>=21.0.0 +urllib3>=1.15.1 +kubernetes==10.0.1 +table_logger>=0.3.5 diff --git a/sdk/python/v1beta1/setup.py b/sdk/python/v1beta1/setup.py new file mode 100644 index 00000000000..3e5bd424d52 --- /dev/null +++ b/sdk/python/v1beta1/setup.py @@ -0,0 +1,52 @@ +# Copyright 2019 kubeflow.org. +# +# 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 +# +# 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. + +import setuptools + +with open('requirements.txt') as f: + REQUIRES = f.readlines() + +setuptools.setup( + name='kubeflow-katib', + version='0.0.3', + author="Kubeflow Authors", + author_email='premnath.vel@gmail.com', + license="Apache License Version 2.0", + url="https://github.com/kubeflow/katib/tree/master/sdk/python/v1beta1", + description="Katib Python SDK for APIVersion v1beta1", + long_description="Katib Python SDK for APIVersion v1beta1", + packages=setuptools.find_packages( + include=("kubeflow*")), + package_data={}, + include_package_data=False, + zip_safe=False, + classifiers=[ + 'Intended Audience :: Developers', + 'Intended Audience :: Education', + 'Intended Audience :: Science/Research', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + "License :: OSI Approved :: Apache Software License", + "Operating System :: OS Independent", + 'Topic :: Scientific/Engineering', + 'Topic :: Scientific/Engineering :: Artificial Intelligence', + 'Topic :: Software Development', + 'Topic :: Software Development :: Libraries', + 'Topic :: Software Development :: Libraries :: Python Modules', + ], + install_requires=REQUIRES +) diff --git a/sdk/python/v1beta1/test/__init__.py b/sdk/python/v1beta1/test/__init__.py new file mode 100644 index 00000000000..e69de29bb2d diff --git a/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py b/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py new file mode 100644 index 00000000000..2ea85d74303 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1AlgorithmSetting(unittest.TestCase): + """V1beta1AlgorithmSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1AlgorithmSetting(self): + """Test V1beta1AlgorithmSetting""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_algorithm_setting.V1beta1AlgorithmSetting() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_algorithm_spec.py b/sdk/python/v1beta1/test/test_v1beta1_algorithm_spec.py new file mode 100644 index 00000000000..39bd6becce9 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_algorithm_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1AlgorithmSpec(unittest.TestCase): + """V1beta1AlgorithmSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1AlgorithmSpec(self): + """Test V1beta1AlgorithmSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_algorithm_spec.V1beta1AlgorithmSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_collector_spec.py b/sdk/python/v1beta1/test/test_v1beta1_collector_spec.py new file mode 100644 index 00000000000..5a62ab572f4 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_collector_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_collector_spec import V1beta1CollectorSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1CollectorSpec(unittest.TestCase): + """V1beta1CollectorSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1CollectorSpec(self): + """Test V1beta1CollectorSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_collector_spec.V1beta1CollectorSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_config_map_source.py b/sdk/python/v1beta1/test/test_v1beta1_config_map_source.py new file mode 100644 index 00000000000..f8ab3d55af2 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_config_map_source.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ConfigMapSource(unittest.TestCase): + """V1beta1ConfigMapSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ConfigMapSource(self): + """Test V1beta1ConfigMapSource""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_config_map_source.V1beta1ConfigMapSource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_early_stopping_setting.py b/sdk/python/v1beta1/test/test_v1beta1_early_stopping_setting.py new file mode 100644 index 00000000000..b01a2940b2e --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_early_stopping_setting.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_early_stopping_setting import V1beta1EarlyStoppingSetting # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1EarlyStoppingSetting(unittest.TestCase): + """V1beta1EarlyStoppingSetting unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1EarlyStoppingSetting(self): + """Test V1beta1EarlyStoppingSetting""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_early_stopping_setting.V1beta1EarlyStoppingSetting() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_early_stopping_spec.py b/sdk/python/v1beta1/test/test_v1beta1_early_stopping_spec.py new file mode 100644 index 00000000000..2a7ab5de42f --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_early_stopping_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1EarlyStoppingSpec(unittest.TestCase): + """V1beta1EarlyStoppingSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1EarlyStoppingSpec(self): + """Test V1beta1EarlyStoppingSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_early_stopping_spec.V1beta1EarlyStoppingSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_experiment.py b/sdk/python/v1beta1/test/test_v1beta1_experiment.py new file mode 100644 index 00000000000..c8e8e976fee --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_experiment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_experiment import V1beta1Experiment # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Experiment(unittest.TestCase): + """V1beta1Experiment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Experiment(self): + """Test V1beta1Experiment""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_experiment.V1beta1Experiment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_experiment_condition.py b/sdk/python/v1beta1/test/test_v1beta1_experiment_condition.py new file mode 100644 index 00000000000..2c3fdae19aa --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_experiment_condition.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ExperimentCondition(unittest.TestCase): + """V1beta1ExperimentCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ExperimentCondition(self): + """Test V1beta1ExperimentCondition""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_experiment_condition.V1beta1ExperimentCondition() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_experiment_list.py b/sdk/python/v1beta1/test/test_v1beta1_experiment_list.py new file mode 100644 index 00000000000..d0ecde79481 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_experiment_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_experiment_list import V1beta1ExperimentList # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ExperimentList(unittest.TestCase): + """V1beta1ExperimentList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ExperimentList(self): + """Test V1beta1ExperimentList""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_experiment_list.V1beta1ExperimentList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_experiment_spec.py b/sdk/python/v1beta1/test/test_v1beta1_experiment_spec.py new file mode 100644 index 00000000000..fd16d61e52c --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_experiment_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_experiment_spec import V1beta1ExperimentSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ExperimentSpec(unittest.TestCase): + """V1beta1ExperimentSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ExperimentSpec(self): + """Test V1beta1ExperimentSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_experiment_spec.V1beta1ExperimentSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_experiment_status.py b/sdk/python/v1beta1/test/test_v1beta1_experiment_status.py new file mode 100644 index 00000000000..96692ec66fc --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_experiment_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_experiment_status import V1beta1ExperimentStatus # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ExperimentStatus(unittest.TestCase): + """V1beta1ExperimentStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ExperimentStatus(self): + """Test V1beta1ExperimentStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_experiment_status.V1beta1ExperimentStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_feasible_space.py b/sdk/python/v1beta1/test/test_v1beta1_feasible_space.py new file mode 100644 index 00000000000..7e4fa5eb425 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_feasible_space.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_feasible_space import V1beta1FeasibleSpace # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1FeasibleSpace(unittest.TestCase): + """V1beta1FeasibleSpace unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1FeasibleSpace(self): + """Test V1beta1FeasibleSpace""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_feasible_space.V1beta1FeasibleSpace() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_file_system_path.py b/sdk/python/v1beta1/test/test_v1beta1_file_system_path.py new file mode 100644 index 00000000000..68b5795b81f --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_file_system_path.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_file_system_path import V1beta1FileSystemPath # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1FileSystemPath(unittest.TestCase): + """V1beta1FileSystemPath unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1FileSystemPath(self): + """Test V1beta1FileSystemPath""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_file_system_path.V1beta1FileSystemPath() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_filter_spec.py b/sdk/python/v1beta1/test/test_v1beta1_filter_spec.py new file mode 100644 index 00000000000..3e5db70165e --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_filter_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_filter_spec import V1beta1FilterSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1FilterSpec(unittest.TestCase): + """V1beta1FilterSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1FilterSpec(self): + """Test V1beta1FilterSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_filter_spec.V1beta1FilterSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_graph_config.py b/sdk/python/v1beta1/test/test_v1beta1_graph_config.py new file mode 100644 index 00000000000..f220c6e038e --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_graph_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_graph_config import V1beta1GraphConfig # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1GraphConfig(unittest.TestCase): + """V1beta1GraphConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1GraphConfig(self): + """Test V1beta1GraphConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_graph_config.V1beta1GraphConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_metric.py b/sdk/python/v1beta1/test/test_v1beta1_metric.py new file mode 100644 index 00000000000..5feabcc7fd8 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_metric.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_metric import V1beta1Metric # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Metric(unittest.TestCase): + """V1beta1Metric unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Metric(self): + """Test V1beta1Metric""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_metric.V1beta1Metric() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_metric_strategy.py b/sdk/python/v1beta1/test/test_v1beta1_metric_strategy.py new file mode 100644 index 00000000000..c33ca67fcca --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_metric_strategy.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_metric_strategy import V1beta1MetricStrategy # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1MetricStrategy(unittest.TestCase): + """V1beta1MetricStrategy unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1MetricStrategy(self): + """Test V1beta1MetricStrategy""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_metric_strategy.V1beta1MetricStrategy() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_metrics_collector_spec.py b/sdk/python/v1beta1/test/test_v1beta1_metrics_collector_spec.py new file mode 100644 index 00000000000..975ba8c8984 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_metrics_collector_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_metrics_collector_spec import V1beta1MetricsCollectorSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1MetricsCollectorSpec(unittest.TestCase): + """V1beta1MetricsCollectorSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1MetricsCollectorSpec(self): + """Test V1beta1MetricsCollectorSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_metrics_collector_spec.V1beta1MetricsCollectorSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_nas_config.py b/sdk/python/v1beta1/test/test_v1beta1_nas_config.py new file mode 100644 index 00000000000..35ab675a675 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_nas_config.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_nas_config import V1beta1NasConfig # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1NasConfig(unittest.TestCase): + """V1beta1NasConfig unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1NasConfig(self): + """Test V1beta1NasConfig""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_nas_config.V1beta1NasConfig() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_objective_spec.py b/sdk/python/v1beta1/test/test_v1beta1_objective_spec.py new file mode 100644 index 00000000000..0c39101d6bb --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_objective_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_objective_spec import V1beta1ObjectiveSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ObjectiveSpec(unittest.TestCase): + """V1beta1ObjectiveSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ObjectiveSpec(self): + """Test V1beta1ObjectiveSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_objective_spec.V1beta1ObjectiveSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_observation.py b/sdk/python/v1beta1/test/test_v1beta1_observation.py new file mode 100644 index 00000000000..c6349470d26 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_observation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_observation import V1beta1Observation # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Observation(unittest.TestCase): + """V1beta1Observation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Observation(self): + """Test V1beta1Observation""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_observation.V1beta1Observation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_operation.py b/sdk/python/v1beta1/test/test_v1beta1_operation.py new file mode 100644 index 00000000000..3b4d2760835 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_operation.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_operation import V1beta1Operation # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Operation(unittest.TestCase): + """V1beta1Operation unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Operation(self): + """Test V1beta1Operation""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_operation.V1beta1Operation() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_optimal_trial.py b/sdk/python/v1beta1/test/test_v1beta1_optimal_trial.py new file mode 100644 index 00000000000..e73a80f6ba2 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_optimal_trial.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1OptimalTrial(unittest.TestCase): + """V1beta1OptimalTrial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1OptimalTrial(self): + """Test V1beta1OptimalTrial""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_optimal_trial.V1beta1OptimalTrial() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_parameter_assignment.py b/sdk/python/v1beta1/test/test_v1beta1_parameter_assignment.py new file mode 100644 index 00000000000..50914b72dce --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_parameter_assignment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ParameterAssignment(unittest.TestCase): + """V1beta1ParameterAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ParameterAssignment(self): + """Test V1beta1ParameterAssignment""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_parameter_assignment.V1beta1ParameterAssignment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_parameter_spec.py b/sdk/python/v1beta1/test/test_v1beta1_parameter_spec.py new file mode 100644 index 00000000000..02455d56133 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_parameter_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1ParameterSpec(unittest.TestCase): + """V1beta1ParameterSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1ParameterSpec(self): + """Test V1beta1ParameterSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_parameter_spec.V1beta1ParameterSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_source_spec.py b/sdk/python/v1beta1/test/test_v1beta1_source_spec.py new file mode 100644 index 00000000000..f237d0f1169 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_source_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_source_spec import V1beta1SourceSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1SourceSpec(unittest.TestCase): + """V1beta1SourceSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SourceSpec(self): + """Test V1beta1SourceSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_source_spec.V1beta1SourceSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_suggestion.py b/sdk/python/v1beta1/test/test_v1beta1_suggestion.py new file mode 100644 index 00000000000..c2920a4d62f --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_suggestion.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_suggestion import V1beta1Suggestion # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Suggestion(unittest.TestCase): + """V1beta1Suggestion unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Suggestion(self): + """Test V1beta1Suggestion""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_suggestion.V1beta1Suggestion() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_suggestion_condition.py b/sdk/python/v1beta1/test/test_v1beta1_suggestion_condition.py new file mode 100644 index 00000000000..ec4551b2012 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_suggestion_condition.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_suggestion_condition import V1beta1SuggestionCondition # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1SuggestionCondition(unittest.TestCase): + """V1beta1SuggestionCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SuggestionCondition(self): + """Test V1beta1SuggestionCondition""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_suggestion_condition.V1beta1SuggestionCondition() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_suggestion_list.py b/sdk/python/v1beta1/test/test_v1beta1_suggestion_list.py new file mode 100644 index 00000000000..1eb2a93d43c --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_suggestion_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_suggestion_list import V1beta1SuggestionList # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1SuggestionList(unittest.TestCase): + """V1beta1SuggestionList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SuggestionList(self): + """Test V1beta1SuggestionList""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_suggestion_list.V1beta1SuggestionList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_suggestion_spec.py b/sdk/python/v1beta1/test/test_v1beta1_suggestion_spec.py new file mode 100644 index 00000000000..4b701298259 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_suggestion_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_suggestion_spec import V1beta1SuggestionSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1SuggestionSpec(unittest.TestCase): + """V1beta1SuggestionSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SuggestionSpec(self): + """Test V1beta1SuggestionSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_suggestion_spec.V1beta1SuggestionSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_suggestion_status.py b/sdk/python/v1beta1/test/test_v1beta1_suggestion_status.py new file mode 100644 index 00000000000..45c48915404 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_suggestion_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_suggestion_status import V1beta1SuggestionStatus # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1SuggestionStatus(unittest.TestCase): + """V1beta1SuggestionStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1SuggestionStatus(self): + """Test V1beta1SuggestionStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_suggestion_status.V1beta1SuggestionStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial.py b/sdk/python/v1beta1/test/test_v1beta1_trial.py new file mode 100644 index 00000000000..3d88a7ac439 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial import V1beta1Trial # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1Trial(unittest.TestCase): + """V1beta1Trial unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1Trial(self): + """Test V1beta1Trial""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial.V1beta1Trial() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_assignment.py b/sdk/python/v1beta1/test/test_v1beta1_trial_assignment.py new file mode 100644 index 00000000000..3d8ecbb90cd --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_assignment.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_assignment import V1beta1TrialAssignment # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialAssignment(unittest.TestCase): + """V1beta1TrialAssignment unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialAssignment(self): + """Test V1beta1TrialAssignment""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_assignment.V1beta1TrialAssignment() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_condition.py b/sdk/python/v1beta1/test/test_v1beta1_trial_condition.py new file mode 100644 index 00000000000..643030446e4 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_condition.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialCondition(unittest.TestCase): + """V1beta1TrialCondition unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialCondition(self): + """Test V1beta1TrialCondition""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_condition.V1beta1TrialCondition() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_list.py b/sdk/python/v1beta1/test/test_v1beta1_trial_list.py new file mode 100644 index 00000000000..cff78a92eaf --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_list.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_list import V1beta1TrialList # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialList(unittest.TestCase): + """V1beta1TrialList unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialList(self): + """Test V1beta1TrialList""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_list.V1beta1TrialList() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_parameter_spec.py b/sdk/python/v1beta1/test/test_v1beta1_trial_parameter_spec.py new file mode 100644 index 00000000000..048024c44f3 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_parameter_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_parameter_spec import V1beta1TrialParameterSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialParameterSpec(unittest.TestCase): + """V1beta1TrialParameterSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialParameterSpec(self): + """Test V1beta1TrialParameterSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_parameter_spec.V1beta1TrialParameterSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_source.py b/sdk/python/v1beta1/test/test_v1beta1_trial_source.py new file mode 100644 index 00000000000..dc846d5253c --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_source.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_source import V1beta1TrialSource # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialSource(unittest.TestCase): + """V1beta1TrialSource unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialSource(self): + """Test V1beta1TrialSource""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_source.V1beta1TrialSource() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_spec.py b/sdk/python/v1beta1/test/test_v1beta1_trial_spec.py new file mode 100644 index 00000000000..abb1707458b --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_spec.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_spec import V1beta1TrialSpec # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialSpec(unittest.TestCase): + """V1beta1TrialSpec unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialSpec(self): + """Test V1beta1TrialSpec""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_spec.V1beta1TrialSpec() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_status.py b/sdk/python/v1beta1/test/test_v1beta1_trial_status.py new file mode 100644 index 00000000000..ee8ae2a8a81 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_status.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_status import V1beta1TrialStatus # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialStatus(unittest.TestCase): + """V1beta1TrialStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialStatus(self): + """Test V1beta1TrialStatus""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_status.V1beta1TrialStatus() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/sdk/python/v1beta1/test/test_v1beta1_trial_template.py b/sdk/python/v1beta1/test/test_v1beta1_trial_template.py new file mode 100644 index 00000000000..ac87673f0c9 --- /dev/null +++ b/sdk/python/v1beta1/test/test_v1beta1_trial_template.py @@ -0,0 +1,40 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + OpenAPI spec version: v1beta1-0.1 + + Generated by: https://github.com/swagger-api/swagger-codegen.git +""" + + +from __future__ import absolute_import + +import unittest + +import kubeflow.katib +from kubeflow.katib.models.v1beta1_trial_template import V1beta1TrialTemplate # noqa: E501 +from kubeflow.katib.rest import ApiException + + +class TestV1beta1TrialTemplate(unittest.TestCase): + """V1beta1TrialTemplate unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testV1beta1TrialTemplate(self): + """Test V1beta1TrialTemplate""" + # FIXME: construct object with mandatory attributes with example values + # model = katib.models.v1beta1_trial_template.V1beta1TrialTemplate() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()