|
| 1 | +# -*- coding: utf-8 -*- |
| 2 | + |
| 3 | +# Copyright 2021 Google LLC |
| 4 | +# |
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +# you may not use this file except in compliance with the License. |
| 7 | +# You may obtain a copy of the License at |
| 8 | +# |
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +# |
| 11 | +# Unless required by applicable law or agreed to in writing, software |
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +# See the License for the specific language governing permissions and |
| 15 | +# limitations under the License. |
| 16 | +# |
| 17 | + |
| 18 | +from google.cloud.aiplatform.compat import services |
| 19 | +from google.cloud.aiplatform.compat import types |
| 20 | + |
| 21 | +V1BETA1 = "v1beta1" |
| 22 | +V1 = "v1" |
| 23 | + |
| 24 | +DEFAULT_VERSION = V1 |
| 25 | + |
| 26 | +if DEFAULT_VERSION == V1BETA1: |
| 27 | + |
| 28 | + services.dataset_service_client = services.dataset_service_client_v1beta1 |
| 29 | + services.endpoint_service_client = services.endpoint_service_client_v1beta1 |
| 30 | + services.job_service_client = services.job_service_client_v1beta1 |
| 31 | + services.model_service_client = services.model_service_client_v1beta1 |
| 32 | + services.pipeline_service_client = services.pipeline_service_client_v1beta1 |
| 33 | + services.prediction_service_client = services.prediction_service_client_v1beta1 |
| 34 | + services.specialist_pool_service_client = ( |
| 35 | + services.specialist_pool_service_client_v1beta1 |
| 36 | + ) |
| 37 | + |
| 38 | + types.accelerator_type = types.accelerator_type_v1beta1 |
| 39 | + types.annotation = types.annotation_v1beta1 |
| 40 | + types.annotation_spec = types.annotation_spec_v1beta1 |
| 41 | + types.batch_prediction_job = types.batch_prediction_job_v1beta1 |
| 42 | + types.completion_stats = types.completion_stats_v1beta1 |
| 43 | + types.custom_job = types.custom_job_v1beta1 |
| 44 | + types.data_item = types.data_item_v1beta1 |
| 45 | + types.data_labeling_job = types.data_labeling_job_v1beta1 |
| 46 | + types.dataset = types.dataset_v1beta1 |
| 47 | + types.dataset_service = types.dataset_service_v1beta1 |
| 48 | + types.deployed_model_ref = types.deployed_model_ref_v1beta1 |
| 49 | + types.encryption_spec = types.encryption_spec_v1beta1 |
| 50 | + types.endpoint = types.endpoint_v1beta1 |
| 51 | + types.endpoint_service = types.endpoint_service_v1beta1 |
| 52 | + types.env_var = types.env_var_v1beta1 |
| 53 | + types.explanation = types.explanation_v1beta1 |
| 54 | + types.explanation_metadata = types.explanation_metadata_v1beta1 |
| 55 | + types.hyperparameter_tuning_job = types.hyperparameter_tuning_job_v1beta1 |
| 56 | + types.io = types.io_v1beta1 |
| 57 | + types.job_service = types.job_service_v1beta1 |
| 58 | + types.job_state = types.job_state_v1beta1 |
| 59 | + types.machine_resources = types.machine_resources_v1beta1 |
| 60 | + types.manual_batch_tuning_parameters = types.manual_batch_tuning_parameters_v1beta1 |
| 61 | + types.model = types.model_v1beta1 |
| 62 | + types.model_evaluation = types.model_evaluation_v1beta1 |
| 63 | + types.model_evaluation_slice = types.model_evaluation_slice_v1beta1 |
| 64 | + types.model_service = types.model_service_v1beta1 |
| 65 | + types.operation = types.operation_v1beta1 |
| 66 | + types.pipeline_service = types.pipeline_service_v1beta1 |
| 67 | + types.pipeline_state = types.pipeline_state_v1beta1 |
| 68 | + types.prediction_service = types.prediction_service_v1beta1 |
| 69 | + types.specialist_pool = types.specialist_pool_v1beta1 |
| 70 | + types.specialist_pool_service = types.specialist_pool_service_v1beta1 |
| 71 | + types.training_pipeline = types.training_pipeline_v1beta1 |
| 72 | + |
| 73 | +if DEFAULT_VERSION == V1: |
| 74 | + |
| 75 | + services.dataset_service_client = services.dataset_service_client_v1 |
| 76 | + services.endpoint_service_client = services.endpoint_service_client_v1 |
| 77 | + services.job_service_client = services.job_service_client_v1 |
| 78 | + services.model_service_client = services.model_service_client_v1 |
| 79 | + services.pipeline_service_client = services.pipeline_service_client_v1 |
| 80 | + services.prediction_service_client = services.prediction_service_client_v1 |
| 81 | + services.specialist_pool_service_client = services.specialist_pool_service_client_v1 |
| 82 | + |
| 83 | + types.accelerator_type = types.accelerator_type_v1 |
| 84 | + types.annotation = types.annotation_v1 |
| 85 | + types.annotation_spec = types.annotation_spec_v1 |
| 86 | + types.batch_prediction_job = types.batch_prediction_job_v1 |
| 87 | + types.completion_stats = types.completion_stats_v1 |
| 88 | + types.custom_job = types.custom_job_v1 |
| 89 | + types.data_item = types.data_item_v1 |
| 90 | + types.data_labeling_job = types.data_labeling_job_v1 |
| 91 | + types.dataset = types.dataset_v1 |
| 92 | + types.dataset_service = types.dataset_service_v1 |
| 93 | + types.deployed_model_ref = types.deployed_model_ref_v1 |
| 94 | + types.encryption_spec = types.encryption_spec_v1 |
| 95 | + types.endpoint = types.endpoint_v1 |
| 96 | + types.endpoint_service = types.endpoint_service_v1 |
| 97 | + types.env_var = types.env_var_v1 |
| 98 | + types.hyperparameter_tuning_job = types.hyperparameter_tuning_job_v1 |
| 99 | + types.io = types.io_v1 |
| 100 | + types.job_service = types.job_service_v1 |
| 101 | + types.job_state = types.job_state_v1 |
| 102 | + types.machine_resources = types.machine_resources_v1 |
| 103 | + types.manual_batch_tuning_parameters = types.manual_batch_tuning_parameters_v1 |
| 104 | + types.model = types.model_v1 |
| 105 | + types.model_evaluation = types.model_evaluation_v1 |
| 106 | + types.model_evaluation_slice = types.model_evaluation_slice_v1 |
| 107 | + types.model_service = types.model_service_v1 |
| 108 | + types.operation = types.operation_v1 |
| 109 | + types.pipeline_service = types.pipeline_service_v1 |
| 110 | + types.pipeline_state = types.pipeline_state_v1 |
| 111 | + types.prediction_service = types.prediction_service_v1 |
| 112 | + types.specialist_pool = types.specialist_pool_v1 |
| 113 | + types.specialist_pool_service = types.specialist_pool_service_v1 |
| 114 | + types.training_pipeline = types.training_pipeline_v1 |
| 115 | + |
| 116 | +__all__ = ( |
| 117 | + DEFAULT_VERSION, |
| 118 | + V1BETA1, |
| 119 | + V1, |
| 120 | + services, |
| 121 | + types, |
| 122 | +) |
0 commit comments