From 44875b825062ec4d728c77ea79040045033e96fc Mon Sep 17 00:00:00 2001 From: Andrey Velichkevich Date: Thu, 29 Jul 2021 16:35:19 +0100 Subject: [PATCH] Update Katib SDK with OpenAPI generator (#1572) * Use openapi JAR * Remove test from SDK * Use k8s>=12.0 version --- .gitignore | 3 + hack/gen-python-sdk/gen-sdk.sh | 17 +- hack/gen-python-sdk/post_gen.py | 6 +- .../v1beta1/docs/V1beta1AlgorithmSetting.md | 1 + .../v1beta1/docs/V1beta1AlgorithmSpec.md | 1 + .../v1beta1/docs/V1beta1CollectorSpec.md | 2 +- .../v1beta1/docs/V1beta1ConfigMapSource.md | 1 + .../v1beta1/docs/V1beta1EarlyStoppingRule.md | 1 + .../docs/V1beta1EarlyStoppingSetting.md | 1 + .../v1beta1/docs/V1beta1EarlyStoppingSpec.md | 1 + sdk/python/v1beta1/docs/V1beta1Experiment.md | 1 + .../docs/V1beta1ExperimentCondition.md | 5 +- .../v1beta1/docs/V1beta1ExperimentList.md | 1 + .../v1beta1/docs/V1beta1ExperimentSpec.md | 11 +- .../v1beta1/docs/V1beta1ExperimentStatus.md | 9 +- sdk/python/v1beta1/docs/V1beta1GraphConfig.md | 1 + sdk/python/v1beta1/docs/V1beta1NasConfig.md | 1 + .../v1beta1/docs/V1beta1ObjectiveSpec.md | 1 + sdk/python/v1beta1/docs/V1beta1Operation.md | 1 + .../v1beta1/docs/V1beta1OptimalTrial.md | 3 +- sdk/python/v1beta1/docs/V1beta1SourceSpec.md | 6 +- sdk/python/v1beta1/docs/V1beta1Suggestion.md | 1 + .../docs/V1beta1SuggestionCondition.md | 5 +- .../v1beta1/docs/V1beta1SuggestionList.md | 1 + .../v1beta1/docs/V1beta1SuggestionSpec.md | 5 +- .../v1beta1/docs/V1beta1SuggestionStatus.md | 7 +- sdk/python/v1beta1/docs/V1beta1Trial.md | 1 + .../v1beta1/docs/V1beta1TrialAssignment.md | 1 + .../v1beta1/docs/V1beta1TrialCondition.md | 5 +- sdk/python/v1beta1/docs/V1beta1TrialList.md | 1 + .../v1beta1/docs/V1beta1TrialParameterSpec.md | 1 + sdk/python/v1beta1/docs/V1beta1TrialSource.md | 5 +- sdk/python/v1beta1/docs/V1beta1TrialSpec.md | 7 +- sdk/python/v1beta1/docs/V1beta1TrialStatus.md | 9 +- .../v1beta1/docs/V1beta1TrialTemplate.md | 5 +- sdk/python/v1beta1/kubeflow/katib/__init__.py | 12 +- .../v1beta1/kubeflow/katib/api_client.py | 190 +++++++------ .../v1beta1/kubeflow/katib/configuration.py | 267 +++++++++++++----- .../v1beta1/kubeflow/katib/exceptions.py | 120 ++++++++ .../v1beta1/kubeflow/katib/models/__init__.py | 5 +- .../katib/models/v1beta1_algorithm_setting.py | 33 ++- .../katib/models/v1beta1_algorithm_spec.py | 33 ++- .../katib/models/v1beta1_collector_spec.py | 37 +-- .../katib/models/v1beta1_config_map_source.py | 33 ++- .../models/v1beta1_early_stopping_rule.py | 33 ++- .../models/v1beta1_early_stopping_setting.py | 33 ++- .../models/v1beta1_early_stopping_spec.py | 33 ++- .../katib/models/v1beta1_experiment.py | 35 +-- .../models/v1beta1_experiment_condition.py | 40 +-- .../katib/models/v1beta1_experiment_list.py | 36 +-- .../katib/models/v1beta1_experiment_spec.py | 49 ++-- .../katib/models/v1beta1_experiment_status.py | 42 ++- .../katib/models/v1beta1_feasible_space.py | 33 ++- .../katib/models/v1beta1_file_system_path.py | 33 ++- .../katib/models/v1beta1_filter_spec.py | 33 ++- .../katib/models/v1beta1_graph_config.py | 33 ++- .../kubeflow/katib/models/v1beta1_metric.py | 33 ++- .../katib/models/v1beta1_metric_strategy.py | 33 ++- .../models/v1beta1_metrics_collector_spec.py | 34 +-- .../katib/models/v1beta1_nas_config.py | 34 +-- .../katib/models/v1beta1_objective_spec.py | 33 ++- .../katib/models/v1beta1_observation.py | 35 +-- .../katib/models/v1beta1_operation.py | 33 ++- .../katib/models/v1beta1_optimal_trial.py | 40 +-- .../models/v1beta1_parameter_assignment.py | 33 ++- .../katib/models/v1beta1_parameter_spec.py | 33 ++- .../katib/models/v1beta1_source_spec.py | 41 ++- .../katib/models/v1beta1_suggestion.py | 35 +-- .../models/v1beta1_suggestion_condition.py | 40 +-- .../katib/models/v1beta1_suggestion_list.py | 36 +-- .../katib/models/v1beta1_suggestion_spec.py | 40 ++- .../katib/models/v1beta1_suggestion_status.py | 41 ++- .../kubeflow/katib/models/v1beta1_trial.py | 35 +-- .../katib/models/v1beta1_trial_assignment.py | 34 +-- .../katib/models/v1beta1_trial_condition.py | 40 +-- .../katib/models/v1beta1_trial_list.py | 36 +-- .../models/v1beta1_trial_parameter_spec.py | 33 ++- .../katib/models/v1beta1_trial_source.py | 37 ++- .../katib/models/v1beta1_trial_spec.py | 44 ++- .../katib/models/v1beta1_trial_status.py | 42 ++- .../katib/models/v1beta1_trial_template.py | 38 ++- sdk/python/v1beta1/kubeflow/katib/rest.py | 52 +--- sdk/python/v1beta1/requirements.txt | 4 +- sdk/python/v1beta1/test/__init__.py | 0 .../test/test_v1beta1_algorithm_setting.py | 40 --- .../test/test_v1beta1_algorithm_spec.py | 40 --- .../test/test_v1beta1_collector_spec.py | 40 --- .../test/test_v1beta1_config_map_source.py | 40 --- .../test/test_v1beta1_early_stopping_rule.py | 40 --- .../test_v1beta1_early_stopping_setting.py | 40 --- .../test/test_v1beta1_early_stopping_spec.py | 40 --- .../v1beta1/test/test_v1beta1_experiment.py | 40 --- .../test/test_v1beta1_experiment_condition.py | 40 --- .../test/test_v1beta1_experiment_list.py | 40 --- .../test/test_v1beta1_experiment_spec.py | 40 --- .../test/test_v1beta1_experiment_status.py | 40 --- .../test/test_v1beta1_feasible_space.py | 40 --- .../test/test_v1beta1_file_system_path.py | 40 --- .../v1beta1/test/test_v1beta1_filter_spec.py | 40 --- .../v1beta1/test/test_v1beta1_graph_config.py | 40 --- .../v1beta1/test/test_v1beta1_metric.py | 40 --- .../test/test_v1beta1_metric_strategy.py | 40 --- .../test_v1beta1_metrics_collector_spec.py | 40 --- .../v1beta1/test/test_v1beta1_nas_config.py | 40 --- .../test/test_v1beta1_objective_spec.py | 40 --- .../v1beta1/test/test_v1beta1_observation.py | 40 --- .../v1beta1/test/test_v1beta1_operation.py | 40 --- .../test/test_v1beta1_optimal_trial.py | 40 --- .../test/test_v1beta1_parameter_assignment.py | 40 --- .../test/test_v1beta1_parameter_spec.py | 40 --- .../v1beta1/test/test_v1beta1_source_spec.py | 40 --- .../v1beta1/test/test_v1beta1_suggestion.py | 40 --- .../test/test_v1beta1_suggestion_condition.py | 40 --- .../test/test_v1beta1_suggestion_list.py | 40 --- .../test/test_v1beta1_suggestion_spec.py | 40 --- .../test/test_v1beta1_suggestion_status.py | 40 --- sdk/python/v1beta1/test/test_v1beta1_trial.py | 40 --- .../test/test_v1beta1_trial_assignment.py | 40 --- .../test/test_v1beta1_trial_condition.py | 40 --- .../v1beta1/test/test_v1beta1_trial_list.py | 40 --- .../test/test_v1beta1_trial_parameter_spec.py | 40 --- .../v1beta1/test/test_v1beta1_trial_source.py | 40 --- .../v1beta1/test/test_v1beta1_trial_spec.py | 40 --- .../v1beta1/test/test_v1beta1_trial_status.py | 40 --- .../test/test_v1beta1_trial_template.py | 40 --- 125 files changed, 1301 insertions(+), 2599 deletions(-) create mode 100644 sdk/python/v1beta1/kubeflow/katib/exceptions.py delete mode 100644 sdk/python/v1beta1/test/__init__.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_algorithm_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_collector_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_config_map_source.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_early_stopping_rule.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_early_stopping_setting.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_early_stopping_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_experiment.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_experiment_condition.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_experiment_list.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_experiment_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_experiment_status.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_feasible_space.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_file_system_path.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_filter_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_graph_config.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_metric.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_metric_strategy.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_metrics_collector_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_nas_config.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_objective_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_observation.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_operation.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_optimal_trial.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_parameter_assignment.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_parameter_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_source_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_suggestion.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_suggestion_condition.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_suggestion_list.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_suggestion_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_suggestion_status.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_assignment.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_condition.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_list.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_parameter_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_source.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_spec.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_status.py delete mode 100644 sdk/python/v1beta1/test/test_v1beta1_trial_template.py diff --git a/.gitignore b/.gitignore index ee2a690312a..d90d0d215c8 100644 --- a/.gitignore +++ b/.gitignore @@ -7,6 +7,9 @@ __pycache__/ build/ *.charm +# SDK generator JAR file +hack/gen-python-sdk/openapi-generator-cli.jar + # Project specific ignore files *.swp bin diff --git a/hack/gen-python-sdk/gen-sdk.sh b/hack/gen-python-sdk/gen-sdk.sh index da6b41fe7d2..d24b742c6a4 100755 --- a/hack/gen-python-sdk/gen-sdk.sh +++ b/hack/gen-python-sdk/gen-sdk.sh @@ -18,26 +18,29 @@ 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_JAR_URL="https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/4.3.1/openapi-generator-cli-4.3.1.jar" +SWAGGER_CODEGEN_JAR="hack/gen-python-sdk/openapi-generator-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=(v1beta1) -echo "Downloading the swagger-codegen JAR package ..." -wget -O ${SWAGGER_CODEGEN_JAR} ${SWAGGER_JAR_URL} +# Download JAR package if file doesn't exist. +if ! test -f ${SWAGGER_CODEGEN_JAR}; then + echo "Downloading the openapi generator JAR package ..." + wget -O ${SWAGGER_CODEGEN_JAR} ${SWAGGER_JAR_URL} +fi 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} + java -jar ${SWAGGER_CODEGEN_JAR} generate -i ${SWAGGER_FILE} -g python -o ${TMP_PATH} -c ${SWAGGER_CODEGEN_CONF} # Run post gen script. 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 index e927312427a..e57857410d2 100644 --- a/hack/gen-python-sdk/post_gen.py +++ b/hack/gen-python-sdk/post_gen.py @@ -39,7 +39,6 @@ def _rewrite_helper(input_file, output_file, rewrite_rules): # Add Katib client to init file. if (output_file == "sdk/python/v1beta1/kubeflow/katib/__init__.py"): - lines.append("\n") lines.append("# Import Katib API client.\n") lines.append("from kubeflow.katib.api.katib_client import KatibClient\n") @@ -85,16 +84,17 @@ def update_python_sdk(src, dest, versions=('v1beta1')): 'python/blob/master/kubernetes/docs/V1HTTPGetAction.md)') ] + # TODO (andreyvelich): Currently test can't be generated properly. src_dirs = [ os.path.join(src, 'katib'), os.path.join(src, 'katib', 'models'), - os.path.join(src, 'test'), + # 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, 'test'), os.path.join(dest, 'docs') ] diff --git a/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md b/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md index 09df3d47a94..9cc457cf6bc 100644 --- a/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md +++ b/sdk/python/v1beta1/docs/V1beta1AlgorithmSetting.md @@ -1,5 +1,6 @@ # V1beta1AlgorithmSetting +AlgorithmSetting represents key-value pair for HP or NAS algorithm settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md b/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md index 78f95ac835f..f8705e14329 100644 --- a/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1AlgorithmSpec.md @@ -1,5 +1,6 @@ # V1beta1AlgorithmSpec +AlgorithmSpec is the specification for a HP or NAS algorithm. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md b/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md index 29f88fdeceb..ee8ea21ef60 100644 --- a/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md @@ -3,7 +3,7 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**custom_collector** | [**V1Container**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Container.md) | When kind is \"customCollector\", this field will be used | [optional] +**custom_collector** | [**V1Container**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1Container.md) | | [optional] **kind** | **str** | | [default to ''] [[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 index 8aa1bbc4a31..604ad3b5a9d 100644 --- a/sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md +++ b/sdk/python/v1beta1/docs/V1beta1ConfigMapSource.md @@ -1,5 +1,6 @@ # V1beta1ConfigMapSource +ConfigMapSource references the config map where trial template is located ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingRule.md b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingRule.md index 26e9dc9e567..90d3446a0f9 100644 --- a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingRule.md +++ b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingRule.md @@ -1,5 +1,6 @@ # V1beta1EarlyStoppingRule +EarlyStoppingRule represents each rule for early stopping. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md index 8d531b2ba83..70dc09ca065 100644 --- a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md +++ b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSetting.md @@ -1,5 +1,6 @@ # V1beta1EarlyStoppingSetting +EarlyStoppingSetting represents key-value pair for early stopping algorithm settings. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md index 7fa4abdcff4..63315ba2c77 100644 --- a/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1EarlyStoppingSpec.md @@ -1,5 +1,6 @@ # V1beta1EarlyStoppingSpec +EarlyStoppingSpec is the specification for a early stopping algorithm. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1Experiment.md b/sdk/python/v1beta1/docs/V1beta1Experiment.md index 3c470fc082d..7ec58c2a133 100644 --- a/sdk/python/v1beta1/docs/V1beta1Experiment.md +++ b/sdk/python/v1beta1/docs/V1beta1Experiment.md @@ -1,5 +1,6 @@ # V1beta1Experiment +Structure of the Experiment custom resource. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md index b207b3aebd2..5210f8fb2bd 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md @@ -1,10 +1,11 @@ # V1beta1ExperimentCondition +ExperimentCondition describes the state of the experiment at a certain point. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | **datetime** | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | **datetime** | The last time this condition was updated. | [optional] +**last_transition_time** | **datetime** | | [optional] +**last_update_time** | **datetime** | | [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. | [default to ''] diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentList.md b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md index 86cd539f822..3b395635630 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentList.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md @@ -1,5 +1,6 @@ # V1beta1ExperimentList +ExperimentList contains a list of Experiments ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md b/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md index c6159e65d6f..d6e79754457 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentSpec.md @@ -1,19 +1,20 @@ # V1beta1ExperimentSpec +ExperimentSpec is the specification of an Experiment. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.md) | Describes the suggestion algorithm. | [optional] -**early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.md) | Describes the early stopping algorithm. | [optional] +**algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.md) | | [optional] +**early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.md) | | [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] +**metrics_collector_spec** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | | [optional] **nas_config** | [**V1beta1NasConfig**](V1beta1NasConfig.md) | | [optional] -**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | Describes the objective of the experiment. | [optional] +**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | | [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] +**trial_template** | [**V1beta1TrialTemplate**](V1beta1TrialTemplate.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/V1beta1ExperimentStatus.md b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md index 7425e8dd7d6..88122564a15 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md @@ -1,18 +1,19 @@ # V1beta1ExperimentStatus +ExperimentStatus is the current status of an Experiment. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**completion_time** | **datetime** | 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] +**completion_time** | **datetime** | | [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] +**current_optimal_trial** | [**V1beta1OptimalTrial**](V1beta1OptimalTrial.md) | | [optional] **early_stopped_trial_list** | **list[str]** | List of trial names which have been early stopped. | [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** | **datetime** | 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] +**last_reconcile_time** | **datetime** | | [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** | **datetime** | 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] +**start_time** | **datetime** | | [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_early_stopped** | **int** | How many trials are currently early stopped. | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1GraphConfig.md b/sdk/python/v1beta1/docs/V1beta1GraphConfig.md index 7bfbaa074f9..fbcd29393a7 100644 --- a/sdk/python/v1beta1/docs/V1beta1GraphConfig.md +++ b/sdk/python/v1beta1/docs/V1beta1GraphConfig.md @@ -1,5 +1,6 @@ # V1beta1GraphConfig +GraphConfig contains a config of DAG ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1NasConfig.md b/sdk/python/v1beta1/docs/V1beta1NasConfig.md index c517002476b..68b594ebd7e 100644 --- a/sdk/python/v1beta1/docs/V1beta1NasConfig.md +++ b/sdk/python/v1beta1/docs/V1beta1NasConfig.md @@ -1,5 +1,6 @@ # V1beta1NasConfig +NasConfig contains config for NAS job ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md b/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md index 91fe96df272..f98a40f065c 100644 --- a/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1ObjectiveSpec.md @@ -1,5 +1,6 @@ # V1beta1ObjectiveSpec +ObjectiveSpec represents Experiment's objective specification. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1Operation.md b/sdk/python/v1beta1/docs/V1beta1Operation.md index 7662e8cc137..3555f065e3d 100644 --- a/sdk/python/v1beta1/docs/V1beta1Operation.md +++ b/sdk/python/v1beta1/docs/V1beta1Operation.md @@ -1,5 +1,6 @@ # V1beta1Operation +Operation contains type of operation in DAG ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md b/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md index 75632d7a4c8..305269ef68a 100644 --- a/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md +++ b/sdk/python/v1beta1/docs/V1beta1OptimalTrial.md @@ -1,10 +1,11 @@ # V1beta1OptimalTrial +OptimalTrial is the metrics and assignments of the best trial. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **best_trial_name** | **str** | BestTrialName is the name of the best trial. | [default to ''] -**observation** | [**V1beta1Observation**](V1beta1Observation.md) | Observation for this trial | [optional] +**observation** | [**V1beta1Observation**](V1beta1Observation.md) | | [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/V1beta1SourceSpec.md b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md index efeb352d574..d056232de80 100644 --- a/sdk/python/v1beta1/docs/V1beta1SourceSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md @@ -3,9 +3,9 @@ ## 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**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1HTTPGetAction.md) | Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format | [optional] +**file_system_path** | [**V1beta1FileSystemPath**](V1beta1FileSystemPath.md) | | [optional] +**filter** | [**V1beta1FilterSpec**](V1beta1FilterSpec.md) | | [optional] +**http_get** | [**V1HTTPGetAction**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1HTTPGetAction.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/V1beta1Suggestion.md b/sdk/python/v1beta1/docs/V1beta1Suggestion.md index ab8f229eaf4..206af3bbbdb 100644 --- a/sdk/python/v1beta1/docs/V1beta1Suggestion.md +++ b/sdk/python/v1beta1/docs/V1beta1Suggestion.md @@ -1,5 +1,6 @@ # V1beta1Suggestion +Suggestion represents the structure of a Suggestion resource. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md index 22fecb2f392..77eb1afa266 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md @@ -1,10 +1,11 @@ # V1beta1SuggestionCondition +SuggestionCondition describes the state of the Suggestion at a certain point. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | **datetime** | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | **datetime** | The last time this condition was updated. | [optional] +**last_transition_time** | **datetime** | | [optional] +**last_update_time** | **datetime** | | [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. | [default to ''] diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionList.md b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md index 542642fab35..afb07f0279f 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionList.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md @@ -1,5 +1,6 @@ # V1beta1SuggestionList +SuggestionList contains a list of Suggestion ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md b/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md index ea6440120f8..8b2bca3e367 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionSpec.md @@ -1,10 +1,11 @@ # V1beta1SuggestionSpec +SuggestionSpec is the specification of a Suggestion. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.md) | Algorithm describes HP or NAS algorithm that suggestion is used. | -**early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.md) | EarlyStopping describes early stopping algorithm that suggestion is used. | [optional] +**algorithm** | [**V1beta1AlgorithmSpec**](V1beta1AlgorithmSpec.md) | | +**early_stopping** | [**V1beta1EarlyStoppingSpec**](V1beta1EarlyStoppingSpec.md) | | [optional] **requests** | **int** | Number of suggestions requested. | [optional] **resume_policy** | **str** | ResumePolicy describes resuming policy which usually take effect after experiment terminated. Default value is LongRunning. | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md index 9d725aa3670..eacdfb4c585 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md @@ -1,13 +1,14 @@ # V1beta1SuggestionStatus +SuggestionStatus is the current status of a Suggestion. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **algorithm_settings** | [**list[V1beta1AlgorithmSetting]**](V1beta1AlgorithmSetting.md) | AlgorithmSettings defines HP or NAS algorithm settings which suggestion gRPC service returns. These settings overwrites Experiment's settings before the gRPC request. It can be empty if settings haven't been changed. | [optional] -**completion_time** | **datetime** | 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] +**completion_time** | **datetime** | | [optional] **conditions** | [**list[V1beta1SuggestionCondition]**](V1beta1SuggestionCondition.md) | List of observed runtime conditions for this Suggestion. | [optional] -**last_reconcile_time** | **datetime** | 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** | **datetime** | 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] +**last_reconcile_time** | **datetime** | | [optional] +**start_time** | **datetime** | | [optional] **suggestion_count** | **int** | Number of suggestion results | [optional] **suggestions** | [**list[V1beta1TrialAssignment]**](V1beta1TrialAssignment.md) | Suggestion results | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1Trial.md b/sdk/python/v1beta1/docs/V1beta1Trial.md index 555e51b3201..902c485e028 100644 --- a/sdk/python/v1beta1/docs/V1beta1Trial.md +++ b/sdk/python/v1beta1/docs/V1beta1Trial.md @@ -1,5 +1,6 @@ # V1beta1Trial +Represents the structure of a Trial resource. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md b/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md index f1dcb8eed48..1f7f2e4a47b 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialAssignment.md @@ -1,5 +1,6 @@ # V1beta1TrialAssignment +TrialAssignment is the assignment for one trial. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1TrialCondition.md b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md index 58630353c3e..ba0e62dbfb0 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md @@ -1,10 +1,11 @@ # V1beta1TrialCondition +TrialCondition describes the state of the trial at a certain point. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | **datetime** | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | **datetime** | The last time this condition was updated. | [optional] +**last_transition_time** | **datetime** | | [optional] +**last_update_time** | **datetime** | | [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. | [default to ''] diff --git a/sdk/python/v1beta1/docs/V1beta1TrialList.md b/sdk/python/v1beta1/docs/V1beta1TrialList.md index 4149ac1e09b..ebd17394cca 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialList.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialList.md @@ -1,5 +1,6 @@ # V1beta1TrialList +TrialList contains a list of Trials ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md b/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md index ebd3db051bd..ba7f86ef68c 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialParameterSpec.md @@ -1,5 +1,6 @@ # V1beta1TrialParameterSpec +TrialParameterSpec describes parameters that must be replaced in trial template ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- diff --git a/sdk/python/v1beta1/docs/V1beta1TrialSource.md b/sdk/python/v1beta1/docs/V1beta1TrialSource.md index 1f3a6a23186..295fd89c087 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialSource.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialSource.md @@ -1,10 +1,11 @@ # V1beta1TrialSource +TrialSource represent the source for trial template Only one source can be specified ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | ConfigMap spec represents a reference to ConfigMap | [optional] -**trial_spec** | **object** | TrialSpec represents trial template in unstructured format | [optional] +**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | | [optional] +**trial_spec** | **object** | | [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 index 0b960b25a4f..44c3a4c27f2 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialSpec.md @@ -1,17 +1,18 @@ # V1beta1TrialSpec +TrialSpec is the specification of a Trial. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **early_stopping_rules** | [**list[V1beta1EarlyStoppingRule]**](V1beta1EarlyStoppingRule.md) | Rules for early stopping techniques. Each rule should be met to early stop Trial. | [optional] **failure_condition** | **str** | Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")# | [optional] -**metrics_collector** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | Describes how metrics will be collected | [optional] -**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | Describes the objective of the experiment. | [optional] +**metrics_collector** | [**V1beta1MetricsCollectorSpec**](V1beta1MetricsCollectorSpec.md) | | [optional] +**objective** | [**V1beta1ObjectiveSpec**](V1beta1ObjectiveSpec.md) | | [optional] **parameter_assignments** | [**list[V1beta1ParameterAssignment]**](V1beta1ParameterAssignment.md) | Key-value pairs for hyperparameters and assignment values. | **primary_container_name** | **str** | Name of training container where actual model training is running | [optional] **primary_pod_labels** | **dict(str, str)** | Label that determines if pod needs to be injected by Katib sidecar container | [optional] **retain_run** | **bool** | Whether to retain the trial run object after completed. | [optional] -**run_spec** | **object** | 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] +**run_spec** | **object** | | [optional] **success_condition** | **str** | Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")# | [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 index 074ec07642d..1df5939df3f 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialStatus.md @@ -1,13 +1,14 @@ # V1beta1TrialStatus +TrialStatus is the current status of a Trial. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**completion_time** | **datetime** | 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] +**completion_time** | **datetime** | | [optional] **conditions** | [**list[V1beta1TrialCondition]**](V1beta1TrialCondition.md) | List of observed runtime conditions for this Trial. | [optional] -**last_reconcile_time** | **datetime** | 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** | **datetime** | 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] +**last_reconcile_time** | **datetime** | | [optional] +**observation** | [**V1beta1Observation**](V1beta1Observation.md) | | [optional] +**start_time** | **datetime** | | [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 index 5f76d9cefdd..2a868b38bd2 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md @@ -1,16 +1,17 @@ # V1beta1TrialTemplate +TrialTemplate describes structure of trial template ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | ConfigMap spec represents a reference to ConfigMap | [optional] +**config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | | [optional] **failure_condition** | **str** | Condition when trial custom resource is failed. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Failed\")#|#(status==\"True\")# | [optional] **primary_container_name** | **str** | Name of training container where actual model training is running | [optional] **primary_pod_labels** | **dict(str, str)** | Labels that determines if pod needs to be injected by Katib sidecar container. If PrimaryPodLabels is omitted, metrics collector wraps all Trial's pods. | [optional] **retain** | **bool** | Retain indicates that trial resources must be not cleanup | [optional] **success_condition** | **str** | Condition when trial custom resource is succeeded. Condition must be in GJSON format, ref https://github.com/tidwall/gjson. For example for BatchJob: status.conditions.#(type==\"Complete\")#|#(status==\"True\")# | [optional] **trial_parameters** | [**list[V1beta1TrialParameterSpec]**](V1beta1TrialParameterSpec.md) | List of parameters that are used in trial template | [optional] -**trial_spec** | **object** | TrialSpec represents trial template in unstructured format | [optional] +**trial_spec** | **object** | | [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/katib/__init__.py b/sdk/python/v1beta1/kubeflow/katib/__init__.py index 27c10de80bb..a8b1253551f 100644 --- a/sdk/python/v1beta1/kubeflow/katib/__init__.py +++ b/sdk/python/v1beta1/kubeflow/katib/__init__.py @@ -7,19 +7,25 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +__version__ = "0.1" + # import apis into sdk package # import ApiClient from kubeflow.katib.api_client import ApiClient from kubeflow.katib.configuration import Configuration +from kubeflow.katib.exceptions import OpenApiException +from kubeflow.katib.exceptions import ApiTypeError +from kubeflow.katib.exceptions import ApiValueError +from kubeflow.katib.exceptions import ApiKeyError +from kubeflow.katib.exceptions import ApiException # import models into sdk package from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec diff --git a/sdk/python/v1beta1/kubeflow/katib/api_client.py b/sdk/python/v1beta1/kubeflow/katib/api_client.py index c7cfd7a24a5..0a77d18c53d 100644 --- a/sdk/python/v1beta1/kubeflow/katib/api_client.py +++ b/sdk/python/v1beta1/kubeflow/katib/api_client.py @@ -4,14 +4,15 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ from __future__ import absolute_import +import atexit import datetime +from dateutil.parser import parse import json import mimetypes from multiprocessing.pool import ThreadPool @@ -26,18 +27,19 @@ from kubeflow.katib.configuration import Configuration import kubeflow.katib.models from kubeflow.katib import rest +from kubeflow.katib.exceptions import ApiValueError, ApiException class ApiClient(object): - """Generic API client for Swagger client library builds. + """Generic API client for OpenAPI client library builds. - Swagger generic API client. This client handles the client- + OpenAPI 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 + the methods and models for each application are generated from the OpenAPI templates. - NOTE: This class is auto generated by the swagger code generator program. - Ref: https://github.com/swagger-api/swagger-codegen + NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. :param configuration: .Configuration object for this client @@ -46,6 +48,8 @@ class ApiClient(object): the API. :param cookie: a cookie to include in the header when making calls to the API + :param pool_threads: The number of threads to use for async requests + to the API. More threads means more concurrent API requests. """ PRIMITIVE_TYPES = (float, bool, bytes, six.text_type) + six.integer_types @@ -59,32 +63,46 @@ class ApiClient(object): 'datetime': datetime.datetime, 'object': object, } + _pool = None def __init__(self, configuration=None, header_name=None, header_value=None, - cookie=None): + cookie=None, pool_threads=1): if configuration is None: - configuration = Configuration() + configuration = Configuration.get_default_copy() self.configuration = configuration + self.pool_threads = pool_threads - # 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' + self.user_agent = 'OpenAPI-Generator/0.1/python' + self.client_side_validation = configuration.client_side_validation - def __del__(self): - if self._pool is not None: + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_value, traceback): + self.close() + + def close(self): + if self._pool: self._pool.close() self._pool.join() + self._pool = None + if hasattr(atexit, 'unregister'): + atexit.unregister(self.close) @property def pool(self): + """Create thread pool on first request + avoids instantiating unused threadpool for blocking clients. + """ if self._pool is None: - self._pool = ThreadPool() + atexit.register(self.close) + self._pool = ThreadPool(self.pool_threads) return self._pool @property @@ -104,7 +122,7 @@ def __call_api( 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): + _preload_content=True, _request_timeout=None, _host=None): config = self.configuration @@ -138,10 +156,11 @@ def __call_api( # post parameters if post_params or files: - post_params = self.prepare_post_parameters(post_params, files) + post_params = post_params if post_params else [] post_params = self.sanitize_for_serialization(post_params) post_params = self.parameters_to_tuples(post_params, collection_formats) + post_params.extend(self.files_parameters(files)) # auth setting self.update_params_for_auth(header_params, query_params, auth_settings) @@ -151,24 +170,44 @@ def __call_api( body = self.sanitize_for_serialization(body) # request url - url = self.configuration.host + resource_path + if _host is None: + url = self.configuration.host + resource_path + else: + # use server/host defined in path or operation instead + url = _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) + try: + # 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) + except ApiException as e: + e.body = e.body.decode('utf-8') if six.PY3 else e.body + raise e + + content_type = response_data.getheader('content-type') 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 not _preload_content: + return return_data + + if six.PY3 and response_type not in ["file", "bytes"]: + match = None + if content_type is not None: + match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type) + encoding = match.group(1) if match else "utf-8" + response_data.data = response_data.data.decode(encoding) + + # 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) @@ -185,7 +224,7 @@ def sanitize_for_serialization(self, obj): 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. + If obj is OpenAPI model, return the properties dict. :param obj: The data to serialize. :return: The serialized form of data. @@ -207,12 +246,12 @@ def sanitize_for_serialization(self, obj): obj_dict = obj else: # Convert model obj to dict except - # attributes `swagger_types`, `attribute_map` + # attributes `openapi_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) + for attr, _ in six.iteritems(obj.openapi_types) if getattr(obj, attr) is not None} return {key: self.sanitize_for_serialization(val) @@ -275,7 +314,7 @@ def __deserialize(self, data, klass): elif klass == datetime.date: return self.__deserialize_date(data) elif klass == datetime.datetime: - return self.__deserialize_datatime(data) + return self.__deserialize_datetime(data) else: return self.__deserialize_model(data, klass) @@ -284,10 +323,10 @@ def call_api(self, resource_path, method, 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): + _preload_content=True, _request_timeout=None, _host=None): """Makes the HTTP request (synchronous) and returns deserialized data. - To make an async request, set the async_req parameter. + To make an async_req request, set the async_req parameter. :param resource_path: Path to method endpoint. :param method: Method to call. @@ -327,17 +366,20 @@ def call_api(self, resource_path, method, 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 + _preload_content, _request_timeout, _host) + + return 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, + _host)) def request(self, method, url, query_params=None, headers=None, post_params=None, body=None, _preload_content=True, @@ -359,10 +401,8 @@ def request(self, method, url, query_params=None, headers=None, 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) + _request_timeout=_request_timeout) elif method == "POST": return self.rest_client.POST(url, query_params=query_params, @@ -395,7 +435,7 @@ def request(self, method, url, query_params=None, headers=None, _request_timeout=_request_timeout, body=body) else: - raise ValueError( + raise ApiValueError( "http method must be `GET`, `HEAD`, `OPTIONS`," " `POST`, `PATCH`, `PUT` or `DELETE`." ) @@ -430,18 +470,14 @@ def parameters_to_tuples(self, params, collection_formats): new_params.append((k, v)) return new_params - def prepare_post_parameters(self, post_params=None, files=None): + def files_parameters(self, 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: @@ -503,14 +539,14 @@ def update_params_for_auth(self, headers, querys, auth_settings): for auth in auth_settings: auth_setting = self.configuration.auth_settings().get(auth) if auth_setting: - if not auth_setting['value']: - continue + if auth_setting['in'] == 'cookie': + headers['Cookie'] = auth_setting['value'] 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( + raise ApiValueError( 'Authentication token must be in `query` or `header`' ) @@ -554,7 +590,7 @@ def __deserialize_primitive(self, data, klass): return data def __deserialize_object(self, value): - """Return a original value. + """Return an original value. :return: object. """ @@ -567,7 +603,6 @@ def __deserialize_date(self, string): :return: date. """ try: - from dateutil.parser import parse return parse(string).date() except ImportError: return string @@ -577,7 +612,7 @@ def __deserialize_date(self, string): reason="Failed to parse `{0}` as date object".format(string) ) - def __deserialize_datatime(self, string): + def __deserialize_datetime(self, string): """Deserializes string to datetime. The string should be in iso8601 datetime format. @@ -586,7 +621,6 @@ def __deserialize_datatime(self, string): :return: datetime. """ try: - from dateutil.parser import parse return parse(string) except ImportError: return string @@ -599,9 +633,6 @@ def __deserialize_datatime(self, string): ) ) - def __hasattr(self, object, name): - return name in object.__class__.__dict__ - def __deserialize_model(self, data, klass): """Deserializes list or dict to model. @@ -609,29 +640,26 @@ def __deserialize_model(self, data, klass): :param klass: class literal. :return: model object. """ + has_discriminator = False + if (hasattr(klass, 'get_real_child_model') + and klass.discriminator_value_class_map): + has_discriminator = True - if (not klass.swagger_types and - not self.__hasattr(klass, 'get_real_child_model')): + if not klass.openapi_types and has_discriminator is False: 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))): + if (data is not None and + klass.openapi_types is not None and + isinstance(data, (list, dict))): + for attr, attr_type in six.iteritems(klass.openapi_types): + if klass.attribute_map[attr] in data: 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'): + if has_discriminator: klass_name = instance.get_real_child_model(data) if klass_name: instance = self.__deserialize(data, klass_name) diff --git a/sdk/python/v1beta1/kubeflow/katib/configuration.py b/sdk/python/v1beta1/kubeflow/katib/configuration.py index 81b58392a54..2c01b00e3c1 100644 --- a/sdk/python/v1beta1/kubeflow/katib/configuration.py +++ b/sdk/python/v1beta1/kubeflow/katib/configuration.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -24,79 +23,174 @@ class Configuration(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://github.com/swagger-api/swagger-codegen + Ref: https://openapi-generator.tech Do not edit the class manually. + + :param host: Base url + :param api_key: Dict to store API key(s). + Each entry in the dict specifies an API key. + The dict key is the name of the security scheme in the OAS specification. + The dict value is the API key secret. + :param api_key_prefix: Dict to store API prefix (e.g. Bearer) + The dict key is the name of the security scheme in the OAS specification. + The dict value is an API key prefix when generating the auth data. + :param username: Username for HTTP basic authentication + :param password: Password for HTTP basic authentication + :param discard_unknown_keys: Boolean value indicating whether to discard + unknown properties. A server may send a response that includes additional + properties that are not known by the client in the following scenarios: + 1. The OpenAPI document is incomplete, i.e. it does not match the server + implementation. + 2. The client was generated using an older version of the OpenAPI document + and the server has been upgraded since then. + If a schema in the OpenAPI document defines the additionalProperties attribute, + then all undeclared properties received by the server are injected into the + additional properties map. In that case, there are undeclared properties, and + nothing to discard. + """ _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 + def __init__(self, host="http://localhost", + api_key=None, api_key_prefix=None, + username=None, password=None, + discard_unknown_keys=False, + ): + """Constructor + """ + self.host = host + """Default Base url + """ self.temp_folder_path = None - + """Temp file folder for downloading files + """ # Authentication Settings - # dict to store API key(s) self.api_key = {} - # dict to store API prefix (e.g. Bearer) + if api_key: + self.api_key = api_key + """dict to store API key(s) + """ self.api_key_prefix = {} - # Username for HTTP basic authentication - self.username = "" - # Password for HTTP basic authentication - self.password = "" - - # Logging Settings + if api_key_prefix: + self.api_key_prefix = api_key_prefix + """dict to store API prefix (e.g. Bearer) + """ + self.refresh_api_key_hook = None + """function hook to refresh API key if expired + """ + self.username = username + """Username for HTTP basic authentication + """ + self.password = password + """Password for HTTP basic authentication + """ + self.discard_unknown_keys = discard_unknown_keys self.logger = {} + """Logging Settings + """ 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 + """Log format + """ self.logger_stream_handler = None - # Log file handler + """Log stream handler + """ self.logger_file_handler = None - # Debug file location + """Log file handler + """ self.logger_file = None - # Debug switch + """Debug file location + """ self.debug = False + """Debug switch + """ - # 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. + """SSL/TLS verification + Set this to false to skip verifying SSL certificate when calling API + from https server. + """ self.ssl_ca_cert = None - # client certificate file + """Set this to customize the certificate file to verify the peer. + """ self.cert_file = None - # client key file + """client certificate file + """ self.key_file = None - # Set this to True/False to enable/disable SSL hostname verification. + """client key file + """ self.assert_hostname = None + """Set this to True/False to enable/disable SSL hostname verification. + """ - # 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 + """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. + """ - # Proxy URL self.proxy = None - # Safe chars for path_param + """Proxy URL + """ + self.proxy_headers = None + """Proxy headers + """ self.safe_chars_for_path_param = '' + """Safe chars for path_param + """ + self.retries = None + """Adding retries to override urllib3 default value 3 + """ + # Disable client side validation + self.client_side_validation = True + + def __deepcopy__(self, memo): + cls = self.__class__ + result = cls.__new__(cls) + memo[id(self)] = result + for k, v in self.__dict__.items(): + if k not in ('logger', 'logger_file_handler'): + setattr(result, k, copy.deepcopy(v, memo)) + # shallow copy of loggers + result.logger = copy.copy(self.logger) + # use setters to configure loggers + result.logger_file = self.logger_file + result.debug = self.debug + return result + + def __setattr__(self, name, value): + object.__setattr__(self, name, value) @classmethod def set_default(cls, default): - cls._default = default + """Set default instance of configuration. + + It stores default configuration, which can be + returned by get_default_copy method. + + :param default: object of Configuration + """ + cls._default = copy.deepcopy(default) + + @classmethod + def get_default_copy(cls): + """Return new instance of configuration. + + This method returns newly created, based on default constructor, + object of Configuration class or returns a copy of default + configuration passed by the set_default method. + + :return: The configuration object. + """ + if cls._default is not None: + return copy.deepcopy(cls._default) + return Configuration() @property def logger_file(self): @@ -128,17 +222,6 @@ def logger_file(self, value): 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): @@ -200,19 +283,29 @@ def get_api_key_with_prefix(self, identifier): :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] + if self.refresh_api_key_hook is not None: + self.refresh_api_key_hook(self) + key = self.api_key.get(identifier) + if key: + prefix = self.api_key_prefix.get(identifier) + if prefix: + return "%s %s" % (prefix, key) + else: + return key def get_basic_auth_token(self): """Gets HTTP basic authentication header (string). :return: The token for basic HTTP authentication. """ + username = "" + if self.username is not None: + username = self.username + password = "" + if self.password is not None: + password = self.password return urllib3.util.make_headers( - basic_auth=self.username + ':' + self.password + basic_auth=username + ':' + password ).get('authorization') def auth_settings(self): @@ -220,9 +313,8 @@ def auth_settings(self): :return: The Auth Settings information dict. """ - return { - - } + auth = {} + return auth def to_debug_report(self): """Gets the essential information for debugging. @@ -235,3 +327,50 @@ def to_debug_report(self): "Version of the API: v1beta1-0.1\n"\ "SDK Package Version: 0.1".\ format(env=sys.platform, pyversion=sys.version) + + def get_host_settings(self): + """Gets an array of host settings + + :return: An array of host settings + """ + return [ + { + 'url': "/", + 'description': "No description provided", + } + ] + + def get_host_from_settings(self, index, variables=None): + """Gets host URL based on the index and variables + :param index: array index of the host settings + :param variables: hash of variable and the corresponding value + :return: URL based on host settings + """ + variables = {} if variables is None else variables + servers = self.get_host_settings() + + try: + server = servers[index] + except IndexError: + raise ValueError( + "Invalid index {0} when selecting the host settings. " + "Must be less than {1}".format(index, len(servers))) + + url = server['url'] + + # go through variables and replace placeholders + for variable_name, variable in server['variables'].items(): + used_value = variables.get( + variable_name, variable['default_value']) + + if 'enum_values' in variable \ + and used_value not in variable['enum_values']: + raise ValueError( + "The variable `{0}` in the host URL has invalid value " + "{1}. Must be {2}.".format( + variable_name, variables[variable_name], + variable['enum_values'])) + + url = url.replace("{" + variable_name + "}", used_value) + + return url diff --git a/sdk/python/v1beta1/kubeflow/katib/exceptions.py b/sdk/python/v1beta1/kubeflow/katib/exceptions.py new file mode 100644 index 00000000000..fe4813dc91e --- /dev/null +++ b/sdk/python/v1beta1/kubeflow/katib/exceptions.py @@ -0,0 +1,120 @@ +# coding: utf-8 + +""" + Katib + + Swagger description for Katib # noqa: E501 + + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech +""" + + +import six + + +class OpenApiException(Exception): + """The base exception class for all OpenAPIExceptions""" + + +class ApiTypeError(OpenApiException, TypeError): + def __init__(self, msg, path_to_item=None, valid_classes=None, + key_type=None): + """ Raises an exception for TypeErrors + + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list): a list of keys an indices to get to the + current_item + None if unset + valid_classes (tuple): the primitive classes that current item + should be an instance of + None if unset + key_type (bool): False if our value is a value in a dict + True if it is a key in a dict + False if our item is an item in a list + None if unset + """ + self.path_to_item = path_to_item + self.valid_classes = valid_classes + self.key_type = key_type + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiTypeError, self).__init__(full_msg) + + +class ApiValueError(OpenApiException, ValueError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (list) the path to the exception in the + received_data dict. None if unset + """ + + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiValueError, self).__init__(full_msg) + + +class ApiKeyError(OpenApiException, KeyError): + def __init__(self, msg, path_to_item=None): + """ + Args: + msg (str): the exception message + + Keyword Args: + path_to_item (None/list) the path to the exception in the + received_data dict + """ + self.path_to_item = path_to_item + full_msg = msg + if path_to_item: + full_msg = "{0} at {1}".format(msg, render_path(path_to_item)) + super(ApiKeyError, self).__init__(full_msg) + + +class ApiException(OpenApiException): + + 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 + + +def render_path(path_to_item): + """Returns a string representation of a path""" + result = "" + for pth in path_to_item: + if isinstance(pth, six.integer_types): + result += "[{0}]".format(pth) + else: + result += "['{0}']".format(pth) + return result diff --git a/sdk/python/v1beta1/kubeflow/katib/models/__init__.py b/sdk/python/v1beta1/kubeflow/katib/models/__init__.py index 32350e9b6c9..00320adcba2 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/__init__.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/__init__.py @@ -6,9 +6,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py index 3bb94347b25..0062568e10c 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_setting.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1AlgorithmSetting(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'name': 'str', 'value': 'str' } @@ -40,8 +42,11 @@ class V1beta1AlgorithmSetting(object): 'value': 'value' } - def __init__(self, name=None, value=None): # noqa: E501 - """V1beta1AlgorithmSetting - a model defined in Swagger""" # noqa: E501 + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1AlgorithmSetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -102,7 +107,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -119,9 +124,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1AlgorithmSetting, dict): - for key, value in self.items(): - result[key] = value return result @@ -138,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1AlgorithmSetting): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1AlgorithmSetting): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py index 44987375438..c14f3de79fb 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_algorithm_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1AlgorithmSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'algorithm_name': 'str', 'algorithm_settings': 'list[V1beta1AlgorithmSetting]' } @@ -42,8 +42,11 @@ class V1beta1AlgorithmSpec(object): 'algorithm_settings': 'algorithmSettings' } - def __init__(self, algorithm_name=None, algorithm_settings=None): # noqa: E501 - """V1beta1AlgorithmSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, algorithm_name=None, algorithm_settings=None, local_vars_configuration=None): # noqa: E501 + """V1beta1AlgorithmSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._algorithm_name = None self._algorithm_settings = None @@ -104,7 +107,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -121,9 +124,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1AlgorithmSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -140,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1AlgorithmSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1AlgorithmSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py index d471856dca7..04e9df945fe 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_collector_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubernetes.client import V1Container # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1CollectorSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'custom_collector': 'V1Container', 'kind': 'str' } @@ -42,8 +42,11 @@ class V1beta1CollectorSpec(object): 'kind': 'kind' } - def __init__(self, custom_collector=None, kind=''): # noqa: E501 - """V1beta1CollectorSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, custom_collector=None, kind='', local_vars_configuration=None): # noqa: E501 + """V1beta1CollectorSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._custom_collector = None self._kind = None @@ -57,7 +60,6 @@ def __init__(self, custom_collector=None, kind=''): # noqa: E501 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 @@ -68,7 +70,6 @@ def custom_collector(self): 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 @@ -94,7 +95,7 @@ def kind(self, kind): :param kind: The kind of this V1beta1CollectorSpec. # noqa: E501 :type: str """ - if kind is None: + if self.local_vars_configuration.client_side_validation and kind is None: # noqa: E501 raise ValueError("Invalid value for `kind`, must not be `None`") # noqa: E501 self._kind = kind @@ -103,7 +104,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -120,9 +121,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1CollectorSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -139,8 +137,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1CollectorSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1CollectorSpec): + return True + + return self.to_dict() != other.to_dict() 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 index 01fbb0857af..57ee65c0608 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_config_map_source.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_config_map_source.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1ConfigMapSource(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'config_map_name': 'str', 'config_map_namespace': 'str', 'template_path': 'str' @@ -42,8 +44,11 @@ class V1beta1ConfigMapSource(object): '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 + def __init__(self, config_map_name=None, config_map_namespace=None, template_path=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ConfigMapSource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._config_map_name = None self._config_map_namespace = None @@ -130,7 +135,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -147,9 +152,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ConfigMapSource, dict): - for key, value in self.items(): - result[key] = value return result @@ -166,8 +168,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ConfigMapSource): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ConfigMapSource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_rule.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_rule.py index 088035a6f10..55e0e7702a5 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_rule.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_rule.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1EarlyStoppingRule(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'comparison': 'str', 'name': 'str', 'start_step': 'int', @@ -44,8 +46,11 @@ class V1beta1EarlyStoppingRule(object): 'value': 'value' } - def __init__(self, comparison=None, name=None, start_step=None, value=None): # noqa: E501 - """V1beta1EarlyStoppingRule - a model defined in Swagger""" # noqa: E501 + def __init__(self, comparison=None, name=None, start_step=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1EarlyStoppingRule - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._comparison = None self._name = None @@ -158,7 +163,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -175,9 +180,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1EarlyStoppingRule, dict): - for key, value in self.items(): - result[key] = value return result @@ -194,8 +196,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1EarlyStoppingRule): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1EarlyStoppingRule): + return True + + return self.to_dict() != other.to_dict() 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 index eb0b29ede41..634c5f53b27 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_setting.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_setting.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1EarlyStoppingSetting(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'name': 'str', 'value': 'str' } @@ -40,8 +42,11 @@ class V1beta1EarlyStoppingSetting(object): 'value': 'value' } - def __init__(self, name=None, value=None): # noqa: E501 - """V1beta1EarlyStoppingSetting - a model defined in Swagger""" # noqa: E501 + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1EarlyStoppingSetting - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -102,7 +107,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -119,9 +124,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1EarlyStoppingSetting, dict): - for key, value in self.items(): - result[key] = value return result @@ -138,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1EarlyStoppingSetting): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1EarlyStoppingSetting): + return True + + return self.to_dict() != other.to_dict() 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 index e4f10613a0d..c192019b3bb 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_early_stopping_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_early_stopping_setting import V1beta1EarlyStoppingSetting # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1EarlyStoppingSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'algorithm_name': 'str', 'algorithm_settings': 'list[V1beta1EarlyStoppingSetting]' } @@ -42,8 +42,11 @@ class V1beta1EarlyStoppingSpec(object): 'algorithm_settings': 'algorithmSettings' } - def __init__(self, algorithm_name=None, algorithm_settings=None): # noqa: E501 - """V1beta1EarlyStoppingSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, algorithm_name=None, algorithm_settings=None, local_vars_configuration=None): # noqa: E501 + """V1beta1EarlyStoppingSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._algorithm_name = None self._algorithm_settings = None @@ -104,7 +107,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -121,9 +124,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1EarlyStoppingSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -140,8 +140,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1EarlyStoppingSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1EarlyStoppingSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py index f34c54b8bd0..7da73ead88c 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,25 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1Experiment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', @@ -50,8 +48,11 @@ class V1beta1Experiment(object): '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 + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Experiment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._kind = None @@ -184,7 +185,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -201,9 +202,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Experiment, dict): - for key, value in self.items(): - result[key] = value return result @@ -220,8 +218,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Experiment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Experiment): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py index c0b77d543ba..041396abd20 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,22 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration class V1beta1ExperimentCondition(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'last_transition_time': 'datetime', 'last_update_time': 'datetime', 'message': 'str', @@ -49,8 +50,11 @@ class V1beta1ExperimentCondition(object): 'type': 'type' } - def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type=''): # noqa: E501 - """V1beta1ExperimentCondition - a model defined in Swagger""" # noqa: E501 + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type='', local_vars_configuration=None): # noqa: E501 + """V1beta1ExperimentCondition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._last_transition_time = None self._last_update_time = None @@ -75,7 +79,6 @@ def __init__(self, last_transition_time=None, last_update_time=None, message=Non 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: datetime @@ -86,7 +89,6 @@ def last_transition_time(self): 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: datetime @@ -98,7 +100,6 @@ def last_transition_time(self, last_transition_time): 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: datetime @@ -109,7 +110,6 @@ def last_update_time(self): 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: datetime @@ -183,7 +183,7 @@ def status(self, status): :param status: The status of this V1beta1ExperimentCondition. # noqa: E501 :type: str """ - if status is None: + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 self._status = status @@ -208,7 +208,7 @@ def type(self, type): :param type: The type of this V1beta1ExperimentCondition. # noqa: E501 :type: str """ - if type is None: + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -217,7 +217,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -234,9 +234,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ExperimentCondition, dict): - for key, value in self.items(): - result[key] = value return result @@ -253,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ExperimentCondition): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ExperimentCondition): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py index db2f90c7117..58746127f83 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_list.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_experiment import V1beta1Experiment # noqa: F401,E501 -from kubernetes.client import V1ListMeta # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1ExperimentList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'items': 'list[V1beta1Experiment]', 'kind': 'str', @@ -47,8 +46,11 @@ class V1beta1ExperimentList(object): 'metadata': 'metadata' } - def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 - """V1beta1ExperimentList - a model defined in Swagger""" # noqa: E501 + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ExperimentList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._items = None @@ -105,7 +107,7 @@ def items(self, items): :param items: The items of this V1beta1ExperimentList. # noqa: E501 :type: list[V1beta1Experiment] """ - if items is None: + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 self._items = items @@ -158,7 +160,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -175,9 +177,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ExperimentList, dict): - for key, value in self.items(): - result[key] = value return result @@ -194,8 +193,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ExperimentList): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ExperimentList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py index ea6541bfb12..f703ae464ea 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,29 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec # noqa: F401,E501 -from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec # 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 +from kubeflow.katib.configuration import Configuration class V1beta1ExperimentSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'algorithm': 'V1beta1AlgorithmSpec', 'early_stopping': 'V1beta1EarlyStoppingSpec', 'max_failed_trial_count': 'int', @@ -66,8 +60,11 @@ class V1beta1ExperimentSpec(object): 'trial_template': 'trialTemplate' } - def __init__(self, algorithm=None, early_stopping=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 + def __init__(self, algorithm=None, early_stopping=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, local_vars_configuration=None): # noqa: E501 + """V1beta1ExperimentSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._algorithm = None self._early_stopping = None @@ -109,7 +106,6 @@ def __init__(self, algorithm=None, early_stopping=None, max_failed_trial_count=N 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 @@ -120,7 +116,6 @@ def algorithm(self): 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 @@ -132,7 +127,6 @@ def algorithm(self, algorithm): def early_stopping(self): """Gets the early_stopping of this V1beta1ExperimentSpec. # noqa: E501 - Describes the early stopping algorithm. # noqa: E501 :return: The early_stopping of this V1beta1ExperimentSpec. # noqa: E501 :rtype: V1beta1EarlyStoppingSpec @@ -143,7 +137,6 @@ def early_stopping(self): def early_stopping(self, early_stopping): """Sets the early_stopping of this V1beta1ExperimentSpec. - Describes the early stopping algorithm. # noqa: E501 :param early_stopping: The early_stopping of this V1beta1ExperimentSpec. # noqa: E501 :type: V1beta1EarlyStoppingSpec @@ -201,7 +194,6 @@ def max_trial_count(self, max_trial_count): 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 @@ -212,7 +204,6 @@ def metrics_collector_spec(self): 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 @@ -245,7 +236,6 @@ def nas_config(self, nas_config): 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 @@ -256,7 +246,6 @@ def objective(self): 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 @@ -337,7 +326,6 @@ def resume_policy(self, resume_policy): 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 @@ -348,7 +336,6 @@ def trial_template(self): 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 @@ -360,7 +347,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -377,9 +364,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ExperimentSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -396,8 +380,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ExperimentSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ExperimentSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py index 3f3d8bd68fe..71f0cfdbb43 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition # noqa: F401,E501 -from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1ExperimentStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'completion_time': 'datetime', 'conditions': 'list[V1beta1ExperimentCondition]', 'current_optimal_trial': 'V1beta1OptimalTrial', @@ -75,8 +74,11 @@ class V1beta1ExperimentStatus(object): 'trials_succeeded': 'trialsSucceeded' } - def __init__(self, completion_time=None, conditions=None, current_optimal_trial=None, early_stopped_trial_list=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_early_stopped=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 + def __init__(self, completion_time=None, conditions=None, current_optimal_trial=None, early_stopped_trial_list=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_early_stopped=None, trials_failed=None, trials_killed=None, trials_pending=None, trials_running=None, trials_succeeded=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ExperimentStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._completion_time = None self._conditions = None @@ -139,7 +141,6 @@ def __init__(self, completion_time=None, conditions=None, current_optimal_trial= 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: datetime @@ -150,7 +151,6 @@ def completion_time(self): 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: datetime @@ -185,7 +185,6 @@ def conditions(self, conditions): 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 @@ -196,7 +195,6 @@ def current_optimal_trial(self): 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 @@ -277,7 +275,6 @@ def killed_trial_list(self, killed_trial_list): 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: datetime @@ -288,7 +285,6 @@ def last_reconcile_time(self): 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: datetime @@ -346,7 +342,6 @@ def running_trial_list(self, running_trial_list): 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: datetime @@ -357,7 +352,6 @@ def start_time(self): 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: datetime @@ -553,7 +547,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -570,9 +564,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ExperimentStatus, dict): - for key, value in self.items(): - result[key] = value return result @@ -589,8 +580,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ExperimentStatus): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ExperimentStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py index b945769bf42..248318e80ed 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_feasible_space.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1FeasibleSpace(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'list': 'list[str]', 'max': 'str', 'min': 'str', @@ -44,8 +46,11 @@ class V1beta1FeasibleSpace(object): 'step': 'step' } - def __init__(self, list=None, max=None, min=None, step=None): # noqa: E501 - """V1beta1FeasibleSpace - a model defined in Swagger""" # noqa: E501 + def __init__(self, list=None, max=None, min=None, step=None, local_vars_configuration=None): # noqa: E501 + """V1beta1FeasibleSpace - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._list = None self._max = None @@ -150,7 +155,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -167,9 +172,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1FeasibleSpace, dict): - for key, value in self.items(): - result[key] = value return result @@ -186,8 +188,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1FeasibleSpace): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1FeasibleSpace): + return True + + return self.to_dict() != other.to_dict() 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 index 2151f374c7e..addc29a73f4 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_file_system_path.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_file_system_path.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1FileSystemPath(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'kind': 'str', 'path': 'str' } @@ -40,8 +42,11 @@ class V1beta1FileSystemPath(object): 'path': 'path' } - def __init__(self, kind=None, path=None): # noqa: E501 - """V1beta1FileSystemPath - a model defined in Swagger""" # noqa: E501 + def __init__(self, kind=None, path=None, local_vars_configuration=None): # noqa: E501 + """V1beta1FileSystemPath - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._kind = None self._path = None @@ -98,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -115,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1FileSystemPath, dict): - for key, value in self.items(): - result[key] = value return result @@ -134,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1FileSystemPath): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1FileSystemPath): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py index dfdf62807da..d8a6ec1e3f4 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_filter_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1FilterSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'metrics_format': 'list[str]' } @@ -38,8 +40,11 @@ class V1beta1FilterSpec(object): 'metrics_format': 'metricsFormat' } - def __init__(self, metrics_format=None): # noqa: E501 - """V1beta1FilterSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, metrics_format=None, local_vars_configuration=None): # noqa: E501 + """V1beta1FilterSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._metrics_format = None self.discriminator = None @@ -74,7 +79,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -91,9 +96,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1FilterSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -110,8 +112,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1FilterSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1FilterSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py index d1dd35addea..b74a8a1dae7 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_graph_config.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1GraphConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'input_sizes': 'list[int]', 'num_layers': 'int', 'output_sizes': 'list[int]' @@ -42,8 +44,11 @@ class V1beta1GraphConfig(object): '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 + def __init__(self, input_sizes=None, num_layers=None, output_sizes=None, local_vars_configuration=None): # noqa: E501 + """V1beta1GraphConfig - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._input_sizes = None self._num_layers = None @@ -124,7 +129,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -141,9 +146,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1GraphConfig, dict): - for key, value in self.items(): - result[key] = value return result @@ -160,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1GraphConfig): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1GraphConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py index f1a6d171ff2..2c2f2ed26d8 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1Metric(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'latest': 'str', 'max': 'str', 'min': 'str', @@ -44,8 +46,11 @@ class V1beta1Metric(object): 'name': 'name' } - def __init__(self, latest=None, max=None, min=None, name=None): # noqa: E501 - """V1beta1Metric - a model defined in Swagger""" # noqa: E501 + def __init__(self, latest=None, max=None, min=None, name=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Metric - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._latest = None self._max = None @@ -150,7 +155,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -167,9 +172,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Metric, dict): - for key, value in self.items(): - result[key] = value return result @@ -186,8 +188,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Metric): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Metric): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py index 2b297d30497..26897a1e605 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metric_strategy.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1MetricStrategy(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'name': 'str', 'value': 'str' } @@ -40,8 +42,11 @@ class V1beta1MetricStrategy(object): 'value': 'value' } - def __init__(self, name=None, value=None): # noqa: E501 - """V1beta1MetricStrategy - a model defined in Swagger""" # noqa: E501 + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1MetricStrategy - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -98,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -115,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1MetricStrategy, dict): - for key, value in self.items(): - result[key] = value return result @@ -134,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1MetricStrategy): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1MetricStrategy): + return True + + return self.to_dict() != other.to_dict() 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 index d070adb5189..e4b75729098 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metrics_collector_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_metrics_collector_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1MetricsCollectorSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'collector': 'V1beta1CollectorSpec', 'source': 'V1beta1SourceSpec' } @@ -43,8 +42,11 @@ class V1beta1MetricsCollectorSpec(object): 'source': 'source' } - def __init__(self, collector=None, source=None): # noqa: E501 - """V1beta1MetricsCollectorSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, collector=None, source=None, local_vars_configuration=None): # noqa: E501 + """V1beta1MetricsCollectorSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._collector = None self._source = None @@ -101,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -118,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1MetricsCollectorSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -137,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1MetricsCollectorSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1MetricsCollectorSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py index 8456a54bf09..dbc00690b16 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_nas_config.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1NasConfig(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'graph_config': 'V1beta1GraphConfig', 'operations': 'list[V1beta1Operation]' } @@ -43,8 +42,11 @@ class V1beta1NasConfig(object): 'operations': 'operations' } - def __init__(self, graph_config=None, operations=None): # noqa: E501 - """V1beta1NasConfig - a model defined in Swagger""" # noqa: E501 + def __init__(self, graph_config=None, operations=None, local_vars_configuration=None): # noqa: E501 + """V1beta1NasConfig - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._graph_config = None self._operations = None @@ -101,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -118,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1NasConfig, dict): - for key, value in self.items(): - result[key] = value return result @@ -137,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1NasConfig): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1NasConfig): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py index 7bb5e801f7c..e18dac8a15f 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_objective_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_metric_strategy import V1beta1MetricStrategy # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1ObjectiveSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'additional_metric_names': 'list[str]', 'goal': 'float', 'metric_strategies': 'list[V1beta1MetricStrategy]', @@ -48,8 +48,11 @@ class V1beta1ObjectiveSpec(object): '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 + def __init__(self, additional_metric_names=None, goal=None, metric_strategies=None, objective_metric_name=None, type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ObjectiveSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._additional_metric_names = None self._goal = None @@ -188,7 +191,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -205,9 +208,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ObjectiveSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -224,8 +224,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ObjectiveSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ObjectiveSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py index 6ad3a77e876..451406af8b5 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_observation.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_metric import V1beta1Metric # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1Observation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'metrics': 'list[V1beta1Metric]' } @@ -40,8 +40,11 @@ class V1beta1Observation(object): 'metrics': 'metrics' } - def __init__(self, metrics=None): # noqa: E501 - """V1beta1Observation - a model defined in Swagger""" # noqa: E501 + def __init__(self, metrics=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Observation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._metrics = None self.discriminator = None @@ -68,7 +71,7 @@ def metrics(self, metrics): :param metrics: The metrics of this V1beta1Observation. # noqa: E501 :type: list[V1beta1Metric] """ - if metrics is None: + if self.local_vars_configuration.client_side_validation and metrics is None: # noqa: E501 raise ValueError("Invalid value for `metrics`, must not be `None`") # noqa: E501 self._metrics = metrics @@ -77,7 +80,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -94,9 +97,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Observation, dict): - for key, value in self.items(): - result[key] = value return result @@ -113,8 +113,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Observation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Observation): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py index 8638abe5e22..e3fe6b577ef 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_operation.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_parameter_spec import V1beta1ParameterSpec # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1Operation(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'operation_type': 'str', 'parameters': 'list[V1beta1ParameterSpec]' } @@ -42,8 +42,11 @@ class V1beta1Operation(object): 'parameters': 'parameters' } - def __init__(self, operation_type=None, parameters=None): # noqa: E501 - """V1beta1Operation - a model defined in Swagger""" # noqa: E501 + def __init__(self, operation_type=None, parameters=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Operation - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._operation_type = None self._parameters = None @@ -100,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -117,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Operation, dict): - for key, value in self.items(): - result[key] = value return result @@ -136,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Operation): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Operation): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py index 2c0886a0594..e5fe4ce82ee 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_optimal_trial.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1OptimalTrial(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'best_trial_name': 'str', 'observation': 'V1beta1Observation', 'parameter_assignments': 'list[V1beta1ParameterAssignment]' @@ -45,8 +44,11 @@ class V1beta1OptimalTrial(object): 'parameter_assignments': 'parameterAssignments' } - def __init__(self, best_trial_name='', observation=None, parameter_assignments=None): # noqa: E501 - """V1beta1OptimalTrial - a model defined in Swagger""" # noqa: E501 + def __init__(self, best_trial_name='', observation=None, parameter_assignments=None, local_vars_configuration=None): # noqa: E501 + """V1beta1OptimalTrial - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._best_trial_name = None self._observation = None @@ -78,7 +80,7 @@ def best_trial_name(self, best_trial_name): :param best_trial_name: The best_trial_name of this V1beta1OptimalTrial. # noqa: E501 :type: str """ - if best_trial_name is None: + if self.local_vars_configuration.client_side_validation and best_trial_name is None: # noqa: E501 raise ValueError("Invalid value for `best_trial_name`, must not be `None`") # noqa: E501 self._best_trial_name = best_trial_name @@ -87,7 +89,6 @@ def best_trial_name(self, best_trial_name): 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 @@ -98,7 +99,6 @@ def observation(self): 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 @@ -126,7 +126,7 @@ def parameter_assignments(self, parameter_assignments): :param parameter_assignments: The parameter_assignments of this V1beta1OptimalTrial. # noqa: E501 :type: list[V1beta1ParameterAssignment] """ - if parameter_assignments is None: + if self.local_vars_configuration.client_side_validation and parameter_assignments is None: # noqa: E501 raise ValueError("Invalid value for `parameter_assignments`, must not be `None`") # noqa: E501 self._parameter_assignments = parameter_assignments @@ -135,7 +135,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -152,9 +152,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1OptimalTrial, dict): - for key, value in self.items(): - result[key] = value return result @@ -171,8 +168,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1OptimalTrial): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1OptimalTrial): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py index cd49d65c24a..74e26bbaa11 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_assignment.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1ParameterAssignment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'name': 'str', 'value': 'str' } @@ -40,8 +42,11 @@ class V1beta1ParameterAssignment(object): 'value': 'value' } - def __init__(self, name=None, value=None): # noqa: E501 - """V1beta1ParameterAssignment - a model defined in Swagger""" # noqa: E501 + def __init__(self, name=None, value=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ParameterAssignment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._name = None self._value = None @@ -98,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -115,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ParameterAssignment, dict): - for key, value in self.items(): - result[key] = value return result @@ -134,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ParameterAssignment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ParameterAssignment): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py index 79d0cef544e..34f671b5638 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_parameter_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_feasible_space import V1beta1FeasibleSpace # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1ParameterSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'feasible_space': 'V1beta1FeasibleSpace', 'name': 'str', 'parameter_type': 'str' @@ -44,8 +44,11 @@ class V1beta1ParameterSpec(object): 'parameter_type': 'parameterType' } - def __init__(self, feasible_space=None, name=None, parameter_type=None): # noqa: E501 - """V1beta1ParameterSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, feasible_space=None, name=None, parameter_type=None, local_vars_configuration=None): # noqa: E501 + """V1beta1ParameterSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._feasible_space = None self._name = None @@ -126,7 +129,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -143,9 +146,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1ParameterSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -162,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1ParameterSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1ParameterSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py index b6fc85c6fab..e4ce84644c6 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_source_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,25 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1SourceSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'file_system_path': 'V1beta1FileSystemPath', 'filter': 'V1beta1FilterSpec', 'http_get': 'V1HTTPGetAction' @@ -46,8 +44,11 @@ class V1beta1SourceSpec(object): '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 + def __init__(self, file_system_path=None, filter=None, http_get=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SourceSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._file_system_path = None self._filter = None @@ -65,7 +66,6 @@ def __init__(self, file_system_path=None, filter=None, http_get=None): # noqa: 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 @@ -76,7 +76,6 @@ def file_system_path(self): 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 @@ -88,7 +87,6 @@ def file_system_path(self, file_system_path): 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 @@ -99,7 +97,6 @@ def filter(self): 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 @@ -111,7 +108,6 @@ def filter(self, filter): 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 @@ -122,7 +118,6 @@ def http_get(self): 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 @@ -134,7 +129,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -151,9 +146,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1SourceSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -170,8 +162,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1SourceSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1SourceSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py index 029d4f29fa5..573fa158b5e 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,25 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1Suggestion(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', @@ -50,8 +48,11 @@ class V1beta1Suggestion(object): '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 + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Suggestion - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._kind = None @@ -184,7 +185,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -201,9 +202,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Suggestion, dict): - for key, value in self.items(): - result[key] = value return result @@ -220,8 +218,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Suggestion): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Suggestion): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py index e528f8ad70b..7ad25f69bcc 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,22 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration class V1beta1SuggestionCondition(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'last_transition_time': 'datetime', 'last_update_time': 'datetime', 'message': 'str', @@ -49,8 +50,11 @@ class V1beta1SuggestionCondition(object): 'type': 'type' } - def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type=''): # noqa: E501 - """V1beta1SuggestionCondition - a model defined in Swagger""" # noqa: E501 + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type='', local_vars_configuration=None): # noqa: E501 + """V1beta1SuggestionCondition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._last_transition_time = None self._last_update_time = None @@ -75,7 +79,6 @@ def __init__(self, last_transition_time=None, last_update_time=None, message=Non 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: datetime @@ -86,7 +89,6 @@ def last_transition_time(self): 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: datetime @@ -98,7 +100,6 @@ def last_transition_time(self, last_transition_time): 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: datetime @@ -109,7 +110,6 @@ def last_update_time(self): 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: datetime @@ -183,7 +183,7 @@ def status(self, status): :param status: The status of this V1beta1SuggestionCondition. # noqa: E501 :type: str """ - if status is None: + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 self._status = status @@ -208,7 +208,7 @@ def type(self, type): :param type: The type of this V1beta1SuggestionCondition. # noqa: E501 :type: str """ - if type is None: + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -217,7 +217,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -234,9 +234,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1SuggestionCondition, dict): - for key, value in self.items(): - result[key] = value return result @@ -253,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1SuggestionCondition): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1SuggestionCondition): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py index bb5d31a4755..407571cda7f 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_list.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_suggestion import V1beta1Suggestion # noqa: F401,E501 -from kubernetes.client import V1ListMeta # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1SuggestionList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'items': 'list[V1beta1Suggestion]', 'kind': 'str', @@ -47,8 +46,11 @@ class V1beta1SuggestionList(object): 'metadata': 'metadata' } - def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 - """V1beta1SuggestionList - a model defined in Swagger""" # noqa: E501 + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SuggestionList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._items = None @@ -105,7 +107,7 @@ def items(self, items): :param items: The items of this V1beta1SuggestionList. # noqa: E501 :type: list[V1beta1Suggestion] """ - if items is None: + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 self._items = items @@ -158,7 +160,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -175,9 +177,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1SuggestionList, dict): - for key, value in self.items(): - result[key] = value return result @@ -194,8 +193,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1SuggestionList): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1SuggestionList): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py index 4a57b44f13d..aebc37365e5 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_algorithm_spec import V1beta1AlgorithmSpec # noqa: F401,E501 -from kubeflow.katib.models.v1beta1_early_stopping_spec import V1beta1EarlyStoppingSpec # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1SuggestionSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'algorithm': 'V1beta1AlgorithmSpec', 'early_stopping': 'V1beta1EarlyStoppingSpec', 'requests': 'int', @@ -47,8 +46,11 @@ class V1beta1SuggestionSpec(object): 'resume_policy': 'resumePolicy' } - def __init__(self, algorithm=None, early_stopping=None, requests=None, resume_policy=None): # noqa: E501 - """V1beta1SuggestionSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, algorithm=None, early_stopping=None, requests=None, resume_policy=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SuggestionSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._algorithm = None self._early_stopping = None @@ -68,7 +70,6 @@ def __init__(self, algorithm=None, early_stopping=None, requests=None, resume_po def algorithm(self): """Gets the algorithm of this V1beta1SuggestionSpec. # noqa: E501 - Algorithm describes HP or NAS algorithm that suggestion is used. # noqa: E501 :return: The algorithm of this V1beta1SuggestionSpec. # noqa: E501 :rtype: V1beta1AlgorithmSpec @@ -79,12 +80,11 @@ def algorithm(self): def algorithm(self, algorithm): """Sets the algorithm of this V1beta1SuggestionSpec. - Algorithm describes HP or NAS algorithm that suggestion is used. # noqa: E501 :param algorithm: The algorithm of this V1beta1SuggestionSpec. # noqa: E501 :type: V1beta1AlgorithmSpec """ - if algorithm is None: + if self.local_vars_configuration.client_side_validation and algorithm is None: # noqa: E501 raise ValueError("Invalid value for `algorithm`, must not be `None`") # noqa: E501 self._algorithm = algorithm @@ -93,7 +93,6 @@ def algorithm(self, algorithm): def early_stopping(self): """Gets the early_stopping of this V1beta1SuggestionSpec. # noqa: E501 - EarlyStopping describes early stopping algorithm that suggestion is used. # noqa: E501 :return: The early_stopping of this V1beta1SuggestionSpec. # noqa: E501 :rtype: V1beta1EarlyStoppingSpec @@ -104,7 +103,6 @@ def early_stopping(self): def early_stopping(self, early_stopping): """Sets the early_stopping of this V1beta1SuggestionSpec. - EarlyStopping describes early stopping algorithm that suggestion is used. # noqa: E501 :param early_stopping: The early_stopping of this V1beta1SuggestionSpec. # noqa: E501 :type: V1beta1EarlyStoppingSpec @@ -162,7 +160,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -179,9 +177,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1SuggestionSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -198,8 +193,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1SuggestionSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1SuggestionSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py index b5bb1ecb1d6..8281ba51c48 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,25 +15,24 @@ import six -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 +from kubeflow.katib.configuration import Configuration class V1beta1SuggestionStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'algorithm_settings': 'list[V1beta1AlgorithmSetting]', 'completion_time': 'datetime', 'conditions': 'list[V1beta1SuggestionCondition]', @@ -54,8 +52,11 @@ class V1beta1SuggestionStatus(object): '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 + def __init__(self, algorithm_settings=None, completion_time=None, conditions=None, last_reconcile_time=None, start_time=None, suggestion_count=None, suggestions=None, local_vars_configuration=None): # noqa: E501 + """V1beta1SuggestionStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._algorithm_settings = None self._completion_time = None @@ -108,7 +109,6 @@ def algorithm_settings(self, algorithm_settings): 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: datetime @@ -119,7 +119,6 @@ def completion_time(self): 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: datetime @@ -154,7 +153,6 @@ def conditions(self, conditions): 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: datetime @@ -165,7 +163,6 @@ def last_reconcile_time(self): 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: datetime @@ -177,7 +174,6 @@ def last_reconcile_time(self, last_reconcile_time): 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: datetime @@ -188,7 +184,6 @@ def start_time(self): 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: datetime @@ -246,7 +241,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -263,9 +258,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1SuggestionStatus, dict): - for key, value in self.items(): - result[key] = value return result @@ -282,8 +274,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1SuggestionStatus): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1SuggestionStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py index 33f4b740215..d66a0936050 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,25 +15,24 @@ 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 +from kubeflow.katib.configuration import Configuration class V1beta1Trial(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'kind': 'str', 'metadata': 'V1ObjectMeta', @@ -50,8 +48,11 @@ class V1beta1Trial(object): '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 + def __init__(self, api_version=None, kind=None, metadata=None, spec=None, status=None, local_vars_configuration=None): # noqa: E501 + """V1beta1Trial - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._kind = None @@ -184,7 +185,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -201,9 +202,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1Trial, dict): - for key, value in self.items(): - result[key] = value return result @@ -220,8 +218,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1Trial): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1Trial): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py index de139171d9e..be3d7539906 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_assignment.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_early_stopping_rule import V1beta1EarlyStoppingRule # noqa: F401,E501 -from kubeflow.katib.models.v1beta1_parameter_assignment import V1beta1ParameterAssignment # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1TrialAssignment(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'early_stopping_rules': 'list[V1beta1EarlyStoppingRule]', 'name': 'str', 'parameter_assignments': 'list[V1beta1ParameterAssignment]' @@ -45,8 +44,11 @@ class V1beta1TrialAssignment(object): 'parameter_assignments': 'parameterAssignments' } - def __init__(self, early_stopping_rules=None, name=None, parameter_assignments=None): # noqa: E501 - """V1beta1TrialAssignment - a model defined in Swagger""" # noqa: E501 + def __init__(self, early_stopping_rules=None, name=None, parameter_assignments=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialAssignment - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._early_stopping_rules = None self._name = None @@ -133,7 +135,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -150,9 +152,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialAssignment, dict): - for key, value in self.items(): - result[key] = value return result @@ -169,8 +168,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialAssignment): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialAssignment): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py index 78da7ca3fc1..7ae8e151337 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,22 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration class V1beta1TrialCondition(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'last_transition_time': 'datetime', 'last_update_time': 'datetime', 'message': 'str', @@ -49,8 +50,11 @@ class V1beta1TrialCondition(object): 'type': 'type' } - def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type=''): # noqa: E501 - """V1beta1TrialCondition - a model defined in Swagger""" # noqa: E501 + def __init__(self, last_transition_time=None, last_update_time=None, message=None, reason=None, status='', type='', local_vars_configuration=None): # noqa: E501 + """V1beta1TrialCondition - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._last_transition_time = None self._last_update_time = None @@ -75,7 +79,6 @@ def __init__(self, last_transition_time=None, last_update_time=None, message=Non 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: datetime @@ -86,7 +89,6 @@ def last_transition_time(self): 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: datetime @@ -98,7 +100,6 @@ def last_transition_time(self, last_transition_time): 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: datetime @@ -109,7 +110,6 @@ def last_update_time(self): 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: datetime @@ -183,7 +183,7 @@ def status(self, status): :param status: The status of this V1beta1TrialCondition. # noqa: E501 :type: str """ - if status is None: + if self.local_vars_configuration.client_side_validation and status is None: # noqa: E501 raise ValueError("Invalid value for `status`, must not be `None`") # noqa: E501 self._status = status @@ -208,7 +208,7 @@ def type(self, type): :param type: The type of this V1beta1TrialCondition. # noqa: E501 :type: str """ - if type is None: + if self.local_vars_configuration.client_side_validation and type is None: # noqa: E501 raise ValueError("Invalid value for `type`, must not be `None`") # noqa: E501 self._type = type @@ -217,7 +217,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -234,9 +234,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialCondition, dict): - for key, value in self.items(): - result[key] = value return result @@ -253,8 +250,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialCondition): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialCondition): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py index 5054b46db76..59a2bcca352 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_list.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_trial import V1beta1Trial # noqa: F401,E501 -from kubernetes.client import V1ListMeta # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1TrialList(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'api_version': 'str', 'items': 'list[V1beta1Trial]', 'kind': 'str', @@ -47,8 +46,11 @@ class V1beta1TrialList(object): 'metadata': 'metadata' } - def __init__(self, api_version=None, items=None, kind=None, metadata=None): # noqa: E501 - """V1beta1TrialList - a model defined in Swagger""" # noqa: E501 + def __init__(self, api_version=None, items=None, kind=None, metadata=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialList - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._api_version = None self._items = None @@ -105,7 +107,7 @@ def items(self, items): :param items: The items of this V1beta1TrialList. # noqa: E501 :type: list[V1beta1Trial] """ - if items is None: + if self.local_vars_configuration.client_side_validation and items is None: # noqa: E501 raise ValueError("Invalid value for `items`, must not be `None`") # noqa: E501 self._items = items @@ -158,7 +160,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -175,9 +177,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialList, dict): - for key, value in self.items(): - result[key] = value return result @@ -194,8 +193,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialList): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialList): + return True + + return self.to_dict() != other.to_dict() 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 index e65fd89748f..2bdb94ac294 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_parameter_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_parameter_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,21 +15,24 @@ import six +from kubeflow.katib.configuration import Configuration + class V1beta1TrialParameterSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'description': 'str', 'name': 'str', 'reference': 'str' @@ -42,8 +44,11 @@ class V1beta1TrialParameterSpec(object): 'reference': 'reference' } - def __init__(self, description=None, name=None, reference=None): # noqa: E501 - """V1beta1TrialParameterSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, description=None, name=None, reference=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialParameterSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._description = None self._name = None @@ -130,7 +135,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -147,9 +152,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialParameterSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -166,8 +168,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialParameterSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialParameterSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py index 339439ae89b..3bbff419358 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,23 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1TrialSource(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'config_map': 'V1beta1ConfigMapSource', 'trial_spec': 'object' } @@ -42,8 +42,11 @@ class V1beta1TrialSource(object): 'trial_spec': 'trialSpec' } - def __init__(self, config_map=None, trial_spec=None): # noqa: E501 - """V1beta1TrialSource - a model defined in Swagger""" # noqa: E501 + def __init__(self, config_map=None, trial_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialSource - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._config_map = None self._trial_spec = None @@ -58,7 +61,6 @@ def __init__(self, config_map=None, trial_spec=None): # noqa: E501 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 @@ -69,7 +71,6 @@ def config_map(self): 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 @@ -81,7 +82,6 @@ def config_map(self, config_map): 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: object @@ -92,7 +92,6 @@ def trial_spec(self): 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: object @@ -104,7 +103,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -121,9 +120,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialSource, dict): - for key, value in self.items(): - result[key] = value return result @@ -140,8 +136,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialSource): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialSource): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py index 4f9f3015beb..d6cf8c5bf52 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,26 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_early_stopping_rule import V1beta1EarlyStoppingRule # 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 +from kubeflow.katib.configuration import Configuration class V1beta1TrialSpec(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'early_stopping_rules': 'list[V1beta1EarlyStoppingRule]', 'failure_condition': 'str', 'metrics_collector': 'V1beta1MetricsCollectorSpec', @@ -61,8 +58,11 @@ class V1beta1TrialSpec(object): 'success_condition': 'successCondition' } - def __init__(self, early_stopping_rules=None, failure_condition=None, metrics_collector=None, objective=None, parameter_assignments=None, primary_container_name=None, primary_pod_labels=None, retain_run=None, run_spec=None, success_condition=None): # noqa: E501 - """V1beta1TrialSpec - a model defined in Swagger""" # noqa: E501 + def __init__(self, early_stopping_rules=None, failure_condition=None, metrics_collector=None, objective=None, parameter_assignments=None, primary_container_name=None, primary_pod_labels=None, retain_run=None, run_spec=None, success_condition=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialSpec - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._early_stopping_rules = None self._failure_condition = None @@ -146,7 +146,6 @@ def failure_condition(self, failure_condition): 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 @@ -157,7 +156,6 @@ def metrics_collector(self): 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 @@ -169,7 +167,6 @@ def metrics_collector(self, metrics_collector): 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 @@ -180,7 +177,6 @@ def objective(self): 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 @@ -208,7 +204,7 @@ def parameter_assignments(self, parameter_assignments): :param parameter_assignments: The parameter_assignments of this V1beta1TrialSpec. # noqa: E501 :type: list[V1beta1ParameterAssignment] """ - if parameter_assignments is None: + if self.local_vars_configuration.client_side_validation and parameter_assignments is None: # noqa: E501 raise ValueError("Invalid value for `parameter_assignments`, must not be `None`") # noqa: E501 self._parameter_assignments = parameter_assignments @@ -286,7 +282,6 @@ def retain_run(self, retain_run): 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: object @@ -297,7 +292,6 @@ def run_spec(self): 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: object @@ -332,7 +326,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -349,9 +343,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialSpec, dict): - for key, value in self.items(): - result[key] = value return result @@ -368,8 +359,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialSpec): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialSpec): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py index 5d7145ff758..cd79b217368 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -from kubeflow.katib.models.v1beta1_observation import V1beta1Observation # noqa: F401,E501 -from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition # noqa: F401,E501 +from kubeflow.katib.configuration import Configuration class V1beta1TrialStatus(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'completion_time': 'datetime', 'conditions': 'list[V1beta1TrialCondition]', 'last_reconcile_time': 'datetime', @@ -49,8 +48,11 @@ class V1beta1TrialStatus(object): '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 + def __init__(self, completion_time=None, conditions=None, last_reconcile_time=None, observation=None, start_time=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialStatus - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._completion_time = None self._conditions = None @@ -74,7 +76,6 @@ def __init__(self, completion_time=None, conditions=None, last_reconcile_time=No 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: datetime @@ -85,7 +86,6 @@ def completion_time(self): 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: datetime @@ -120,7 +120,6 @@ def conditions(self, conditions): 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: datetime @@ -131,7 +130,6 @@ def last_reconcile_time(self): 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: datetime @@ -143,7 +141,6 @@ def last_reconcile_time(self, last_reconcile_time): 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 @@ -154,7 +151,6 @@ def observation(self): 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 @@ -166,7 +162,6 @@ def observation(self, observation): 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: datetime @@ -177,7 +172,6 @@ def start_time(self): 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: datetime @@ -189,7 +183,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -206,9 +200,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialStatus, dict): - for key, value in self.items(): - result[key] = value return result @@ -225,8 +216,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialStatus): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialStatus): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py index 9e309e1ece6..200060257b6 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -16,24 +15,24 @@ import six -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 +from kubeflow.katib.configuration import Configuration class V1beta1TrialTemplate(object): - """NOTE: This class is auto generated by the swagger code generator program. + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech Do not edit the class manually. """ """ Attributes: - swagger_types (dict): The key is attribute name + openapi_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 = { + openapi_types = { 'config_map': 'V1beta1ConfigMapSource', 'failure_condition': 'str', 'primary_container_name': 'str', @@ -55,8 +54,11 @@ class V1beta1TrialTemplate(object): 'trial_spec': 'trialSpec' } - def __init__(self, config_map=None, failure_condition=None, primary_container_name=None, primary_pod_labels=None, retain=None, success_condition=None, trial_parameters=None, trial_spec=None): # noqa: E501 - """V1beta1TrialTemplate - a model defined in Swagger""" # noqa: E501 + def __init__(self, config_map=None, failure_condition=None, primary_container_name=None, primary_pod_labels=None, retain=None, success_condition=None, trial_parameters=None, trial_spec=None, local_vars_configuration=None): # noqa: E501 + """V1beta1TrialTemplate - a model defined in OpenAPI""" # noqa: E501 + if local_vars_configuration is None: + local_vars_configuration = Configuration() + self.local_vars_configuration = local_vars_configuration self._config_map = None self._failure_condition = None @@ -89,7 +91,6 @@ def __init__(self, config_map=None, failure_condition=None, primary_container_na 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 @@ -100,7 +101,6 @@ def config_map(self): 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 @@ -250,7 +250,6 @@ def trial_parameters(self, trial_parameters): 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: object @@ -261,7 +260,6 @@ def trial_spec(self): 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: object @@ -273,7 +271,7 @@ def to_dict(self): """Returns the model properties as a dict""" result = {} - for attr, _ in six.iteritems(self.swagger_types): + for attr, _ in six.iteritems(self.openapi_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( @@ -290,9 +288,6 @@ def to_dict(self): )) else: result[attr] = value - if issubclass(V1beta1TrialTemplate, dict): - for key, value in self.items(): - result[key] = value return result @@ -309,8 +304,11 @@ def __eq__(self, other): if not isinstance(other, V1beta1TrialTemplate): return False - return self.__dict__ == other.__dict__ + return self.to_dict() == other.to_dict() def __ne__(self, other): """Returns true if both objects are not equal""" - return not self == other + if not isinstance(other, V1beta1TrialTemplate): + return True + + return self.to_dict() != other.to_dict() diff --git a/sdk/python/v1beta1/kubeflow/katib/rest.py b/sdk/python/v1beta1/kubeflow/katib/rest.py index 4d8e3a2e99d..218d4807ef9 100644 --- a/sdk/python/v1beta1/kubeflow/katib/rest.py +++ b/sdk/python/v1beta1/kubeflow/katib/rest.py @@ -5,9 +5,8 @@ Swagger description for Katib # noqa: E501 - OpenAPI spec version: v1beta1-0.1 - - Generated by: https://github.com/swagger-api/swagger-codegen.git + The version of the OpenAPI document: v1beta1-0.1 + Generated by: https://openapi-generator.tech """ @@ -23,11 +22,9 @@ # python 2 and python 3 compatibility library import six from six.moves.urllib.parse import urlencode +import urllib3 -try: - import urllib3 -except ImportError: - raise ImportError('Swagger python client requires urllib3.') +from kubeflow.katib.exceptions import ApiException, ApiValueError logger = logging.getLogger(__name__) @@ -76,6 +73,9 @@ def __init__(self, configuration, pools_size=4, maxsize=None): if configuration.assert_hostname is not None: addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501 + if configuration.retries is not None: + addition_pool_args['retries'] = configuration.retries + if maxsize is None: if configuration.connection_pool_maxsize is not None: maxsize = configuration.connection_pool_maxsize @@ -92,6 +92,7 @@ def __init__(self, configuration, pools_size=4, maxsize=None): cert_file=configuration.cert_file, key_file=configuration.key_file, proxy_url=configuration.proxy, + proxy_headers=configuration.proxy_headers, **addition_pool_args ) else: @@ -131,7 +132,7 @@ def request(self, method, url, query_params=None, headers=None, 'PATCH', 'OPTIONS'] if post_params and body: - raise ValueError( + raise ApiValueError( "body parameter cannot be used with post_params parameter." ) @@ -188,7 +189,7 @@ def request(self, method, url, query_params=None, headers=None, # 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): + elif isinstance(body, str) or isinstance(body, bytes): request_body = body r = self.pool_manager.request( method, url, @@ -216,11 +217,6 @@ def request(self, method, url, query_params=None, headers=None, 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) @@ -293,31 +289,3 @@ def PATCH(self, url, headers=None, query_params=None, post_params=None, _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/v1beta1/requirements.txt b/sdk/python/v1beta1/requirements.txt index 7b0e0d448e9..3a454769530 100644 --- a/sdk/python/v1beta1/requirements.txt +++ b/sdk/python/v1beta1/requirements.txt @@ -1,7 +1,5 @@ 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 +kubernetes>=12.0.0 diff --git a/sdk/python/v1beta1/test/__init__.py b/sdk/python/v1beta1/test/__init__.py deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py b/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py deleted file mode 100644 index 2ea85d74303..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_algorithm_setting.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 39bd6becce9..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_algorithm_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 5a62ab572f4..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_collector_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index f8ab3d55af2..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_config_map_source.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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_rule.py b/sdk/python/v1beta1/test/test_v1beta1_early_stopping_rule.py deleted file mode 100644 index c4685703b64..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_early_stopping_rule.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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_rule import V1beta1EarlyStoppingRule # noqa: E501 -from kubeflow.katib.rest import ApiException - - -class TestV1beta1EarlyStoppingRule(unittest.TestCase): - """V1beta1EarlyStoppingRule unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def testV1beta1EarlyStoppingRule(self): - """Test V1beta1EarlyStoppingRule""" - # FIXME: construct object with mandatory attributes with example values - # model = katib.models.v1beta1_early_stopping_rule.V1beta1EarlyStoppingRule() # 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 deleted file mode 100644 index b01a2940b2e..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_early_stopping_setting.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 2a7ab5de42f..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_early_stopping_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index c8e8e976fee..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_experiment.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 2c3fdae19aa..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_experiment_condition.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index d0ecde79481..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_experiment_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index fd16d61e52c..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_experiment_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 96692ec66fc..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_experiment_status.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 7e4fa5eb425..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_feasible_space.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 68b5795b81f..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_file_system_path.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 3e5db70165e..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_filter_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index f220c6e038e..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_graph_config.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 5feabcc7fd8..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_metric.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index c33ca67fcca..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_metric_strategy.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 975ba8c8984..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_metrics_collector_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 35ab675a675..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_nas_config.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 0c39101d6bb..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_objective_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index c6349470d26..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_observation.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 3b4d2760835..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_operation.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index e73a80f6ba2..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_optimal_trial.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 50914b72dce..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_parameter_assignment.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 02455d56133..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_parameter_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index f237d0f1169..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_source_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index c2920a4d62f..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_suggestion.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index ec4551b2012..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_suggestion_condition.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 1eb2a93d43c..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_suggestion_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 4b701298259..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_suggestion_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 45c48915404..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_suggestion_status.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 3d88a7ac439..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 3d8ecbb90cd..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_assignment.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 643030446e4..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_condition.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index cff78a92eaf..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_list.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 048024c44f3..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_parameter_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index dc846d5253c..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_source.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index abb1707458b..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index ee8ae2a8a81..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_status.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index ac87673f0c9..00000000000 --- a/sdk/python/v1beta1/test/test_v1beta1_trial_template.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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()