From 68ba3e60a2898fc9a99b0cdefdefefd122f1b8e9 Mon Sep 17 00:00:00 2001 From: avelichk Date: Fri, 27 Nov 2020 10:43:02 +0000 Subject: [PATCH] Modify SDK --- hack/gen-python-sdk/gen-sdk.sh | 1 + hack/gen-python-sdk/post_gen.py | 36 +++- hack/gen-python-sdk/swagger_config.json | 8 +- sdk/python/v1beta1/docs/KatibClient.md | 157 ++++++++++++++++++ .../v1beta1/docs/V1beta1CollectorSpec.md | 2 +- sdk/python/v1beta1/docs/V1beta1Experiment.md | 2 +- .../docs/V1beta1ExperimentCondition.md | 4 +- .../v1beta1/docs/V1beta1ExperimentList.md | 2 +- .../v1beta1/docs/V1beta1ExperimentStatus.md | 6 +- sdk/python/v1beta1/docs/V1beta1SourceSpec.md | 2 +- sdk/python/v1beta1/docs/V1beta1Suggestion.md | 2 +- .../docs/V1beta1SuggestionCondition.md | 4 +- .../v1beta1/docs/V1beta1SuggestionList.md | 2 +- .../v1beta1/docs/V1beta1SuggestionStatus.md | 6 +- sdk/python/v1beta1/docs/V1beta1Trial.md | 2 +- .../v1beta1/docs/V1beta1TrialCondition.md | 4 +- sdk/python/v1beta1/docs/V1beta1TrialList.md | 2 +- sdk/python/v1beta1/docs/V1beta1TrialSource.md | 2 +- sdk/python/v1beta1/docs/V1beta1TrialSpec.md | 2 +- sdk/python/v1beta1/docs/V1beta1TrialStatus.md | 6 +- .../v1beta1/docs/V1beta1TrialTemplate.md | 2 +- .../models/v1beta1_experiment_condition.py | 13 +- .../katib/models/v1beta1_experiment_status.py | 19 +-- .../models/v1beta1_suggestion_condition.py | 13 +- .../katib/models/v1beta1_suggestion_status.py | 19 +-- .../katib/models/v1beta1_trial_condition.py | 13 +- .../katib/models/v1beta1_trial_source.py | 7 +- .../katib/models/v1beta1_trial_spec.py | 7 +- .../katib/models/v1beta1_trial_status.py | 19 +-- .../katib/models/v1beta1_trial_template.py | 7 +- sdk/python/v1beta1/setup.py | 2 +- 31 files changed, 278 insertions(+), 95 deletions(-) create mode 100644 sdk/python/v1beta1/docs/KatibClient.md diff --git a/hack/gen-python-sdk/gen-sdk.sh b/hack/gen-python-sdk/gen-sdk.sh index 5f623fe6ec2..fd25941aba8 100755 --- a/hack/gen-python-sdk/gen-sdk.sh +++ b/hack/gen-python-sdk/gen-sdk.sh @@ -36,6 +36,7 @@ for VERSION in ${KATIB_VERSIONS[@]}; do 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} + # Run post gen script. python ${POST_GEN_PYTHON_HANDLER} ${TMP_PATH} ${SDK_OUTPUT_PATH}/${VERSION} done diff --git a/hack/gen-python-sdk/post_gen.py b/hack/gen-python-sdk/post_gen.py index 6a4b9186209..a43bb2a0144 100644 --- a/hack/gen-python-sdk/post_gen.py +++ b/hack/gen-python-sdk/post_gen.py @@ -2,6 +2,11 @@ import shutil import sys +IGNORE_LINES = [ + "from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured", + "from kubeflow.katib.models.v1_time import V1Time" +] + def _rewrite_helper(input_file, output_file, rewrite_rules): rules = rewrite_rules or [] @@ -11,9 +16,12 @@ def _rewrite_helper(input_file, output_file, rewrite_rules): line = f.readline() if not line: break + # Apply rewrite rules to the line. for rule in rules: line = rule(line) - lines.append(line) + # Remove ignored lines. + if not any(l in line for l in IGNORE_LINES): + lines.append(line) # Add Katib client to init file if (output_file == "sdk/python/v1beta1/kubeflow/katib/__init__.py"): @@ -30,8 +38,29 @@ def _rewrite_helper(input_file, output_file, rewrite_rules): def update_python_sdk(src, dest, versions=('v1beta1')): # tiny transformers to refine generated codes rewrite_rules = [ + # Models rules. lambda l: l.replace('import katib', 'import kubeflow.katib'), lambda l: l.replace('from katib', 'from kubeflow.katib'), + # Doc rules. + lambda l: l.replace('[**datetime**](V1Time.md)', '**datetime**'), + lambda l: l.replace('[**dict()**](V1UnstructuredUnstructured.md)', '**dict()**'), + + lambda l: l.replace('[**V1Container**](V1Container.md)', + '[**V1Container**](https://github.com/kubernetes-client/' + 'python/blob/master/kubernetes/docs/V1Container.md)'), + + lambda l: l.replace('[**V1ObjectMeta**](V1ObjectMeta.md)', + '[**V1ObjectMeta**](https://github.com/kubernetes-client/' + 'python/blob/master/kubernetes/docs/V1ObjectMeta.md)'), + + lambda l: l.replace('[**V1ListMeta**](V1ListMeta.md)', + '[**V1ListMeta**](https://github.com/kubernetes-client/' + 'python/blob/master/kubernetes/docs/V1ListMeta.md)'), + + lambda l: l.replace('[**V1HTTPGetAction**](V1HTTPGetAction.md)', + '[**V1HTTPGetAction**](https://github.com/kubernetes-client/' + 'python/blob/master/kubernetes/docs/V1HTTPGetAction.md)') + ] src_dirs = [ @@ -48,10 +77,11 @@ def update_python_sdk(src, dest, versions=('v1beta1')): ] for src_dir, dest_dir in zip(src_dirs, dest_dirs): - # remove previous generated files explicitly, in case of deprecated instances + # Remove previous generated files explicitly, in case of deprecated instances. for file in os.listdir(dest_dir): path = os.path.join(dest_dir, file) - if not os.path.isfile(path): + # We should not remove KatibClient doc. + if not os.path.isfile(path) or "/docs/KatibClient.md" in path: continue for v in versions: if v in file.lower(): diff --git a/hack/gen-python-sdk/swagger_config.json b/hack/gen-python-sdk/swagger_config.json index 6c77ced6eb9..3fdcf6f5c33 100644 --- a/hack/gen-python-sdk/swagger_config.json +++ b/hack/gen-python-sdk/swagger_config.json @@ -1,11 +1,15 @@ { - "packageName" : "katib", - "projectName" : "katib", + "packageName": "katib", + "projectName": "katib", "packageVersion": "0.1", "importMappings": { "V1Container": "from kubernetes.client import V1Container", "V1ListMeta": "from kubernetes.client import V1ListMeta", "V1ObjectMeta": "from kubernetes.client import V1ObjectMeta", "V1HTTPGetAction": "from kubernetes.client import V1HTTPGetAction" + }, + "typeMappings": { + "V1Time": "datetime", + "V1UnstructuredUnstructured": "dict()" } } diff --git a/sdk/python/v1beta1/docs/KatibClient.md b/sdk/python/v1beta1/docs/KatibClient.md new file mode 100644 index 00000000000..4f3d2766d51 --- /dev/null +++ b/sdk/python/v1beta1/docs/KatibClient.md @@ -0,0 +1,157 @@ +# KatibClient + +> KatibClient(config_file=None, context=None, client_configuration=None, persist_config=True) + +User can load authentication and cluster information from kube-config file and stores them in kubernetes.client.configuration. Parameters are as following: + +| Parameter | Description | +| --- | --- | +| config_file | Location of kube-config file. Defaults to `~/.kube/config`. Note that the config_file is needed if user want to operate katib SDK in another remote cluster, user must set `config_file` to load kube-config file explicitly, e.g. `KatibClient(config_file="~/.kube/config")`. | +| context | Set the active context. If is set to None, current_context from config file will be used. | +| client_configuration | The kubernetes.client.Configuration to set configs to. | +| persist_config | If True, config file will be updated when changed (e.g GCP token refresh). | + +The APIs for KatibClient are as following: + +| Class | Method | Description | +| ----------- | ----------------------------------------------------------- | ------------------------------------------------------------------------- | +| KatibClient | [create_experiment](#create_experiment) | Create Katib Experiment | +| KatibClient | [get_experiment](#get_experiment) | Get or watch the specified Experiment or all Experiments in the namespace | +| KatibClient | [delete_experiment](#delete_experiment) | Delete specified Experiment | +| KatibClient | [list_experiments](#list_experiments) | List all Experiments with status | +| KatibClient | [get_experiment_status](#get_experiment_status) | Get Experiment status | +| KatibClient | [is_experiment_succeeded](#is_experiment_succeeded) | Check if Experiment status is Succeeded | +| KatibClient | [list_trials](#list_trials) | List all Trials of specified Experiment with status | +| KatibClient | [get_optimal_hyperparameters](#get_optimal_hyperparameters) | Get currentOptimalTrial with parameterAssignments of an Experiment | + +## create_experiment + +> create_experiment(experiment, namespace=None) + +### Parameters + +| Name | Type | Description | Notes | +| --- | --- | --- | --- | +| experiment | [V1beta1Experiment](V1beta1Experiment.md) | experiment definition | Required | +| namespace | str | Namespace for experiment deploying to. If the `namespace` is not defined, will align with experiment definition, or use current or default namespace if namespace is not specified in experiment definition. | Optional | + + +### Return type + +object + +## get_experiment + +> get_experiment(name=None, namespace=None) + +Get Experiment in the specified namespace + +### Parameters + +| Name | Type | Description | Notes | +| --- | --- | --- | --- | +| name | str | Experiment name. If the `name` is not specified, will get all experiments in the namespace. | Optional | +| namespace | str | Experiment's namespace. Defaults to current or default namespace. | Optional | + +### Return type + +object + +## delete_experiment + +> delete_experiment(name, namespace=None) + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| name | str | Experiment name. | Required | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +object + +## list_experiments + +> list_experiments(namespace=None) + +List all Experiments with status + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +List + +## get_experiment_status + +> get_experiment_status(name, namespace=None) + +Returns Experiment status, such as Created, Running, Failed, Succeeded or Restarting. + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| name | str | Experiment name. | Required | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +Str + +## is_experiment_succeeded + +> is_experiment_succeeded(name, namespace=None) + +Returns True if Experiment succeeded; false otherwise. + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| name | str | Experiment name. | Required | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +Bool + +## list_trials + +> list_trials(name, namespace=None) + +List all Trials of an Experiment with status + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| name | str | Experiment name. | Required | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +List + +## get_optimal_hyperparameters + +> get_optimal_hyperparameters(name, namespace=None) + +Get currentOptimalTrial with parameterAssignments of an Experiment + +### Parameters + +| Name | Type | Description | Notes | +| --------- | ---- | --------------------------------------------------------------- | -------- | +| name | str | Experiment name. | Required | +| namespace | str | Experiment namespace. Defaults to current or default namespace. | Optional | + +### Return type + +Dict diff --git a/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md b/sdk/python/v1beta1/docs/V1beta1CollectorSpec.md index 8eb640d6606..81ddb8d30a9 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**](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) | When kind is \"customCollector\", this field will be used | [optional] **kind** | **str** | | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1Experiment.md b/sdk/python/v1beta1/docs/V1beta1Experiment.md index 1a481de0d66..7c48927c037 100644 --- a/sdk/python/v1beta1/docs/V1beta1Experiment.md +++ b/sdk/python/v1beta1/docs/V1beta1Experiment.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] **spec** | [**V1beta1ExperimentSpec**](V1beta1ExperimentSpec.md) | | [optional] **status** | [**V1beta1ExperimentStatus**](V1beta1ExperimentStatus.md) | | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md index d1aae13adc8..a19d3930588 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentCondition.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | [**V1Time**](V1Time.md) | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | [**V1Time**](V1Time.md) | The last time this condition was updated. | [optional] +**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] **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. | diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentList.md b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md index ba1ffb6a002..107e1673122 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentList.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **items** | [**list[V1beta1Experiment]**](V1beta1Experiment.md) | | **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md index 069d2d08ee0..7425e8dd7d6 100644 --- a/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1ExperimentStatus.md @@ -3,16 +3,16 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**completion_time** | [**V1Time**](V1Time.md) | Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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] **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] **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** | [**V1Time**](V1Time.md) | Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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] **pending_trial_list** | **list[str]** | List of trial names which are pending. | [optional] **running_trial_list** | **list[str]** | List of trial names which are running. | [optional] -**start_time** | [**V1Time**](V1Time.md) | Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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] **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/V1beta1SourceSpec.md b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md index 42f42acbf20..efeb352d574 100644 --- a/sdk/python/v1beta1/docs/V1beta1SourceSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1SourceSpec.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **file_system_path** | [**V1beta1FileSystemPath**](V1beta1FileSystemPath.md) | During training model, metrics may be persisted into local file in source code, such as tfEvent use case | [optional] **filter** | [**V1beta1FilterSpec**](V1beta1FilterSpec.md) | Default metric output format is {\"metric\": \"<metric_name>\", \"value\": <int_or_float>, \"epoch\": <int>, \"step\": <int>}, but if the output doesn't follow default format, please extend it here | [optional] -**http_get** | [**V1HTTPGetAction**](V1HTTPGetAction.md) | Model-train source code can expose metrics by http, such as HTTP endpoint in prometheus metric format | [optional] +**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] [[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 86aa2c3fb67..a17c90aeb10 100644 --- a/sdk/python/v1beta1/docs/V1beta1Suggestion.md +++ b/sdk/python/v1beta1/docs/V1beta1Suggestion.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] **spec** | [**V1beta1SuggestionSpec**](V1beta1SuggestionSpec.md) | | [optional] **status** | [**V1beta1SuggestionStatus**](V1beta1SuggestionStatus.md) | | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md index e1505908738..81e3699dd77 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionCondition.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | [**V1Time**](V1Time.md) | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | [**V1Time**](V1Time.md) | The last time this condition was updated. | [optional] +**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] **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. | diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionList.md b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md index 34df986abb7..0f434d5bd53 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionList.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **items** | [**list[V1beta1Suggestion]**](V1beta1Suggestion.md) | | **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md index 6061ca199e3..9d725aa3670 100644 --- a/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1SuggestionStatus.md @@ -4,10 +4,10 @@ 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** | [**V1Time**](V1Time.md) | Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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] **conditions** | [**list[V1beta1SuggestionCondition]**](V1beta1SuggestionCondition.md) | List of observed runtime conditions for this Suggestion. | [optional] -**last_reconcile_time** | [**V1Time**](V1Time.md) | Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] -**start_time** | [**V1Time**](V1Time.md) | Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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] **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 2695b930ca0..c55a7ae377e 100644 --- a/sdk/python/v1beta1/docs/V1beta1Trial.md +++ b/sdk/python/v1beta1/docs/V1beta1Trial.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ObjectMeta**](V1ObjectMeta.md) | | [optional] +**metadata** | [**V1ObjectMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ObjectMeta.md) | | [optional] **spec** | [**V1beta1TrialSpec**](V1beta1TrialSpec.md) | | [optional] **status** | [**V1beta1TrialStatus**](V1beta1TrialStatus.md) | | [optional] diff --git a/sdk/python/v1beta1/docs/V1beta1TrialCondition.md b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md index 5bb504ca331..523b81d21b4 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialCondition.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialCondition.md @@ -3,8 +3,8 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**last_transition_time** | [**V1Time**](V1Time.md) | Last time the condition transitioned from one status to another. | [optional] -**last_update_time** | [**V1Time**](V1Time.md) | The last time this condition was updated. | [optional] +**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] **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. | diff --git a/sdk/python/v1beta1/docs/V1beta1TrialList.md b/sdk/python/v1beta1/docs/V1beta1TrialList.md index 383008b87fe..172ed28d409 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialList.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialList.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes **api_version** | **str** | APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#resources | [optional] **items** | [**list[V1beta1Trial]**](V1beta1Trial.md) | | **kind** | **str** | Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds | [optional] -**metadata** | [**V1ListMeta**](V1ListMeta.md) | | [optional] +**metadata** | [**V1ListMeta**](https://github.com/kubernetes-client/python/blob/master/kubernetes/docs/V1ListMeta.md) | | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1TrialSource.md b/sdk/python/v1beta1/docs/V1beta1TrialSource.md index ea9206332c8..784b190ba78 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialSource.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialSource.md @@ -4,7 +4,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **config_map** | [**V1beta1ConfigMapSource**](V1beta1ConfigMapSource.md) | ConfigMap spec represents a reference to ConfigMap | [optional] -**trial_spec** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | TrialSpec represents trial template in unstructured format | [optional] +**trial_spec** | **dict()** | TrialSpec represents trial template in unstructured format | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/docs/V1beta1TrialSpec.md b/sdk/python/v1beta1/docs/V1beta1TrialSpec.md index a5cda13bcb3..9d0b613c921 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialSpec.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialSpec.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **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** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. | [optional] +**run_spec** | **dict()** | 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] **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 42f9f94eef2..074ec07642d 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialStatus.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialStatus.md @@ -3,11 +3,11 @@ ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**completion_time** | [**V1Time**](V1Time.md) | Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC | [optional] +**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] **conditions** | [**list[V1beta1TrialCondition]**](V1beta1TrialCondition.md) | List of observed runtime conditions for this Trial. | [optional] -**last_reconcile_time** | [**V1Time**](V1Time.md) | Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. | [optional] +**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** | [**V1Time**](V1Time.md) | Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC | [optional] +**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] [[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 2a1bc06f6e6..c041141b32e 100644 --- a/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md +++ b/sdk/python/v1beta1/docs/V1beta1TrialTemplate.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **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** | [**V1UnstructuredUnstructured**](V1UnstructuredUnstructured.md) | TrialSpec represents trial template in unstructured format | [optional] +**trial_spec** | **dict()** | TrialSpec represents trial template in unstructured format | [optional] [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py index 45416c2af60..89ef0ef2e5d 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_condition.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 class V1beta1ExperimentCondition(object): @@ -33,8 +32,8 @@ class V1beta1ExperimentCondition(object): and the value is json key in definition. """ swagger_types = { - 'last_transition_time': 'V1Time', - 'last_update_time': 'V1Time', + 'last_transition_time': 'datetime', + 'last_update_time': 'datetime', 'message': 'str', 'reason': 'str', 'status': 'str', @@ -79,7 +78,7 @@ def last_transition_time(self): Last time the condition transitioned from one status to another. # noqa: E501 :return: The last_transition_time of this V1beta1ExperimentCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_transition_time @@ -90,7 +89,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1beta1ExperimentCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_transition_time = last_transition_time @@ -102,7 +101,7 @@ def last_update_time(self): The last time this condition was updated. # noqa: E501 :return: The last_update_time of this V1beta1ExperimentCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_update_time @@ -113,7 +112,7 @@ def last_update_time(self, last_update_time): The last time this condition was updated. # noqa: E501 :param last_update_time: The last_update_time of this V1beta1ExperimentCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_update_time = last_update_time 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 45220c85ce9..3f3d8bd68fe 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_experiment_status.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 from kubeflow.katib.models.v1beta1_experiment_condition import V1beta1ExperimentCondition # noqa: F401,E501 from kubeflow.katib.models.v1beta1_optimal_trial import V1beta1OptimalTrial # noqa: F401,E501 @@ -35,16 +34,16 @@ class V1beta1ExperimentStatus(object): and the value is json key in definition. """ swagger_types = { - 'completion_time': 'V1Time', + 'completion_time': 'datetime', 'conditions': 'list[V1beta1ExperimentCondition]', 'current_optimal_trial': 'V1beta1OptimalTrial', 'early_stopped_trial_list': 'list[str]', 'failed_trial_list': 'list[str]', 'killed_trial_list': 'list[str]', - 'last_reconcile_time': 'V1Time', + 'last_reconcile_time': 'datetime', 'pending_trial_list': 'list[str]', 'running_trial_list': 'list[str]', - 'start_time': 'V1Time', + 'start_time': 'datetime', 'succeeded_trial_list': 'list[str]', 'trials': 'int', 'trials_early_stopped': 'int', @@ -143,7 +142,7 @@ def completion_time(self): Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The completion_time of this V1beta1ExperimentStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._completion_time @@ -154,7 +153,7 @@ def completion_time(self, completion_time): Represents time when the Experiment was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param completion_time: The completion_time of this V1beta1ExperimentStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._completion_time = completion_time @@ -281,7 +280,7 @@ def last_reconcile_time(self): Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The last_reconcile_time of this V1beta1ExperimentStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_reconcile_time @@ -292,7 +291,7 @@ def last_reconcile_time(self, last_reconcile_time): Represents last time when the Experiment was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param last_reconcile_time: The last_reconcile_time of this V1beta1ExperimentStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_reconcile_time = last_reconcile_time @@ -350,7 +349,7 @@ def start_time(self): Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The start_time of this V1beta1ExperimentStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._start_time @@ -361,7 +360,7 @@ def start_time(self, start_time): Represents time when the Experiment was acknowledged by the Experiment controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param start_time: The start_time of this V1beta1ExperimentStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._start_time = start_time 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 168ecca19c4..93e3eb63c50 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_condition.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 class V1beta1SuggestionCondition(object): @@ -33,8 +32,8 @@ class V1beta1SuggestionCondition(object): and the value is json key in definition. """ swagger_types = { - 'last_transition_time': 'V1Time', - 'last_update_time': 'V1Time', + 'last_transition_time': 'datetime', + 'last_update_time': 'datetime', 'message': 'str', 'reason': 'str', 'status': 'str', @@ -79,7 +78,7 @@ def last_transition_time(self): Last time the condition transitioned from one status to another. # noqa: E501 :return: The last_transition_time of this V1beta1SuggestionCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_transition_time @@ -90,7 +89,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1beta1SuggestionCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_transition_time = last_transition_time @@ -102,7 +101,7 @@ def last_update_time(self): The last time this condition was updated. # noqa: E501 :return: The last_update_time of this V1beta1SuggestionCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_update_time @@ -113,7 +112,7 @@ def last_update_time(self, last_update_time): The last time this condition was updated. # noqa: E501 :param last_update_time: The last_update_time of this V1beta1SuggestionCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_update_time = last_update_time 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 82dc773d54c..b5bb1ecb1d6 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_suggestion_status.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 from kubeflow.katib.models.v1beta1_algorithm_setting import V1beta1AlgorithmSetting # noqa: F401,E501 from kubeflow.katib.models.v1beta1_suggestion_condition import V1beta1SuggestionCondition # noqa: F401,E501 from kubeflow.katib.models.v1beta1_trial_assignment import V1beta1TrialAssignment # noqa: F401,E501 @@ -37,10 +36,10 @@ class V1beta1SuggestionStatus(object): """ swagger_types = { 'algorithm_settings': 'list[V1beta1AlgorithmSetting]', - 'completion_time': 'V1Time', + 'completion_time': 'datetime', 'conditions': 'list[V1beta1SuggestionCondition]', - 'last_reconcile_time': 'V1Time', - 'start_time': 'V1Time', + 'last_reconcile_time': 'datetime', + 'start_time': 'datetime', 'suggestion_count': 'int', 'suggestions': 'list[V1beta1TrialAssignment]' } @@ -112,7 +111,7 @@ def completion_time(self): Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The completion_time of this V1beta1SuggestionStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._completion_time @@ -123,7 +122,7 @@ def completion_time(self, completion_time): Represents time when the Suggestion was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param completion_time: The completion_time of this V1beta1SuggestionStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._completion_time = completion_time @@ -158,7 +157,7 @@ def last_reconcile_time(self): Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The last_reconcile_time of this V1beta1SuggestionStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_reconcile_time @@ -169,7 +168,7 @@ def last_reconcile_time(self, last_reconcile_time): Represents last time when the Suggestion was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param last_reconcile_time: The last_reconcile_time of this V1beta1SuggestionStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_reconcile_time = last_reconcile_time @@ -181,7 +180,7 @@ def start_time(self): Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The start_time of this V1beta1SuggestionStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._start_time @@ -192,7 +191,7 @@ def start_time(self, start_time): Represents time when the Suggestion was acknowledged by the Suggestion controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param start_time: The start_time of this V1beta1SuggestionStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._start_time = start_time 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 bfc030a0923..df95718d620 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_condition.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 class V1beta1TrialCondition(object): @@ -33,8 +32,8 @@ class V1beta1TrialCondition(object): and the value is json key in definition. """ swagger_types = { - 'last_transition_time': 'V1Time', - 'last_update_time': 'V1Time', + 'last_transition_time': 'datetime', + 'last_update_time': 'datetime', 'message': 'str', 'reason': 'str', 'status': 'str', @@ -79,7 +78,7 @@ def last_transition_time(self): Last time the condition transitioned from one status to another. # noqa: E501 :return: The last_transition_time of this V1beta1TrialCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_transition_time @@ -90,7 +89,7 @@ def last_transition_time(self, last_transition_time): Last time the condition transitioned from one status to another. # noqa: E501 :param last_transition_time: The last_transition_time of this V1beta1TrialCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_transition_time = last_transition_time @@ -102,7 +101,7 @@ def last_update_time(self): The last time this condition was updated. # noqa: E501 :return: The last_update_time of this V1beta1TrialCondition. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_update_time @@ -113,7 +112,7 @@ def last_update_time(self, last_update_time): The last time this condition was updated. # noqa: E501 :param last_update_time: The last_update_time of this V1beta1TrialCondition. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_update_time = last_update_time 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 9c4f45432d2..10ca5a1baf6 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_source.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: F401,E501 @@ -35,7 +34,7 @@ class V1beta1TrialSource(object): """ swagger_types = { 'config_map': 'V1beta1ConfigMapSource', - 'trial_spec': 'V1UnstructuredUnstructured' + 'trial_spec': 'dict()' } attribute_map = { @@ -85,7 +84,7 @@ def trial_spec(self): TrialSpec represents trial template in unstructured format # noqa: E501 :return: The trial_spec of this V1beta1TrialSource. # noqa: E501 - :rtype: V1UnstructuredUnstructured + :rtype: dict() """ return self._trial_spec @@ -96,7 +95,7 @@ def trial_spec(self, trial_spec): TrialSpec represents trial template in unstructured format # noqa: E501 :param trial_spec: The trial_spec of this V1beta1TrialSource. # noqa: E501 - :type: V1UnstructuredUnstructured + :type: dict() """ self._trial_spec = trial_spec 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 a3dbfd8a205..e929e70291b 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_spec.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 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 @@ -45,7 +44,7 @@ class V1beta1TrialSpec(object): 'primary_container_name': 'str', 'primary_pod_labels': 'dict(str, str)', 'retain_run': 'bool', - 'run_spec': 'V1UnstructuredUnstructured', + 'run_spec': 'dict()', 'success_condition': 'str' } @@ -290,7 +289,7 @@ def run_spec(self): Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. # noqa: E501 :return: The run_spec of this V1beta1TrialSpec. # noqa: E501 - :rtype: V1UnstructuredUnstructured + :rtype: dict() """ return self._run_spec @@ -301,7 +300,7 @@ def run_spec(self, run_spec): Raw text for the trial run spec. This can be any generic Kubernetes runtime object. The trial operator should create the resource as written, and let the corresponding resource controller (e.g. tf-operator) handle the rest. # noqa: E501 :param run_spec: The run_spec of this V1beta1TrialSpec. # noqa: E501 - :type: V1UnstructuredUnstructured + :type: dict() """ self._run_spec = run_spec 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 bae2c39a461..5d7145ff758 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_status.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_time import V1Time # noqa: F401,E501 from kubeflow.katib.models.v1beta1_observation import V1beta1Observation # noqa: F401,E501 from kubeflow.katib.models.v1beta1_trial_condition import V1beta1TrialCondition # noqa: F401,E501 @@ -35,11 +34,11 @@ class V1beta1TrialStatus(object): and the value is json key in definition. """ swagger_types = { - 'completion_time': 'V1Time', + 'completion_time': 'datetime', 'conditions': 'list[V1beta1TrialCondition]', - 'last_reconcile_time': 'V1Time', + 'last_reconcile_time': 'datetime', 'observation': 'V1beta1Observation', - 'start_time': 'V1Time' + 'start_time': 'datetime' } attribute_map = { @@ -78,7 +77,7 @@ def completion_time(self): Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC # noqa: E501 :return: The completion_time of this V1beta1TrialStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._completion_time @@ -89,7 +88,7 @@ def completion_time(self, completion_time): Represents time when the Trial was completed. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC # noqa: E501 :param completion_time: The completion_time of this V1beta1TrialStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._completion_time = completion_time @@ -124,7 +123,7 @@ def last_reconcile_time(self): Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :return: The last_reconcile_time of this V1beta1TrialStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._last_reconcile_time @@ -135,7 +134,7 @@ def last_reconcile_time(self, last_reconcile_time): Represents last time when the Trial was reconciled. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC. # noqa: E501 :param last_reconcile_time: The last_reconcile_time of this V1beta1TrialStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._last_reconcile_time = last_reconcile_time @@ -170,7 +169,7 @@ def start_time(self): Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC # noqa: E501 :return: The start_time of this V1beta1TrialStatus. # noqa: E501 - :rtype: V1Time + :rtype: datetime """ return self._start_time @@ -181,7 +180,7 @@ def start_time(self, start_time): Represents time when the Trial was acknowledged by the Trial controller. It is not guaranteed to be set in happens-before order across separate operations. It is represented in RFC3339 form and is in UTC # noqa: E501 :param start_time: The start_time of this V1beta1TrialStatus. # noqa: E501 - :type: V1Time + :type: datetime """ self._start_time = start_time 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 4402c7b3a67..a1b3a682e69 100644 --- a/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py +++ b/sdk/python/v1beta1/kubeflow/katib/models/v1beta1_trial_template.py @@ -16,7 +16,6 @@ import six -from kubeflow.katib.models.v1_unstructured_unstructured import V1UnstructuredUnstructured # noqa: F401,E501 from kubeflow.katib.models.v1beta1_config_map_source import V1beta1ConfigMapSource # noqa: F401,E501 from kubeflow.katib.models.v1beta1_trial_parameter_spec import V1beta1TrialParameterSpec # noqa: F401,E501 @@ -42,7 +41,7 @@ class V1beta1TrialTemplate(object): 'retain': 'bool', 'success_condition': 'str', 'trial_parameters': 'list[V1beta1TrialParameterSpec]', - 'trial_spec': 'V1UnstructuredUnstructured' + 'trial_spec': 'dict()' } attribute_map = { @@ -254,7 +253,7 @@ def trial_spec(self): TrialSpec represents trial template in unstructured format # noqa: E501 :return: The trial_spec of this V1beta1TrialTemplate. # noqa: E501 - :rtype: V1UnstructuredUnstructured + :rtype: dict() """ return self._trial_spec @@ -265,7 +264,7 @@ def trial_spec(self, trial_spec): TrialSpec represents trial template in unstructured format # noqa: E501 :param trial_spec: The trial_spec of this V1beta1TrialTemplate. # noqa: E501 - :type: V1UnstructuredUnstructured + :type: dict() """ self._trial_spec = trial_spec diff --git a/sdk/python/v1beta1/setup.py b/sdk/python/v1beta1/setup.py index 98060e4c9cb..48e22900327 100644 --- a/sdk/python/v1beta1/setup.py +++ b/sdk/python/v1beta1/setup.py @@ -19,7 +19,7 @@ setuptools.setup( name='kubeflow-katib', - version='0.10.0', + version='0.10.1', author="Kubeflow Authors", author_email='premnath.vel@gmail.com', license="Apache License Version 2.0",