google-cloud-ai_platform-v1 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.yardopts +12 -0
- data/AUTHENTICATION.md +149 -0
- data/LICENSE.md +201 -0
- data/README.md +139 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/client.rb +1364 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service/paths.rb +111 -0
- data/lib/google/cloud/ai_platform/v1/dataset_service.rb +51 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/client.rb +1076 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service/paths.rb +124 -0
- data/lib/google/cloud/ai_platform/v1/endpoint_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/client.rb +508 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service/paths.rb +54 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_online_serving_service.rb +49 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/client.rb +2707 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service/paths.rb +113 -0
- data/lib/google/cloud/ai_platform/v1/featurestore_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/client.rb +1146 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service/paths.rb +88 -0
- data/lib/google/cloud/ai_platform/v1/index_endpoint_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/index_service/client.rb +823 -0
- data/lib/google/cloud/ai_platform/v1/index_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/index_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/index_service/paths.rb +88 -0
- data/lib/google/cloud/ai_platform/v1/index_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/job_service/client.rb +3236 -0
- data/lib/google/cloud/ai_platform/v1/job_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/job_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/job_service/paths.rb +259 -0
- data/lib/google/cloud/ai_platform/v1/job_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/client.rb +3654 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service/paths.rb +153 -0
- data/lib/google/cloud/ai_platform/v1/metadata_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/client.rb +538 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/migration_service/paths.rb +148 -0
- data/lib/google/cloud/ai_platform/v1/migration_service.rb +51 -0
- data/lib/google/cloud/ai_platform/v1/model_service/client.rb +1355 -0
- data/lib/google/cloud/ai_platform/v1/model_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/model_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/model_service/paths.rb +151 -0
- data/lib/google/cloud/ai_platform/v1/model_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/client.rb +1384 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service/paths.rb +225 -0
- data/lib/google/cloud/ai_platform/v1/pipeline_service.rb +52 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/client.rb +650 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service/paths.rb +52 -0
- data/lib/google/cloud/ai_platform/v1/prediction_service.rb +49 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/client.rb +826 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service/paths.rb +69 -0
- data/lib/google/cloud/ai_platform/v1/specialist_pool_service.rb +55 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/client.rb +3224 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/credentials.rb +48 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service/paths.rb +138 -0
- data/lib/google/cloud/ai_platform/v1/tensorboard_service.rb +50 -0
- data/lib/google/cloud/ai_platform/v1/version.rb +28 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/client.rb +1793 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/credentials.rb +47 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/operations.rb +767 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service/paths.rb +109 -0
- data/lib/google/cloud/ai_platform/v1/vizier_service.rb +54 -0
- data/lib/google/cloud/ai_platform/v1.rb +52 -0
- data/lib/google/cloud/aiplatform/v1/accelerator_type_pb.rb +29 -0
- data/lib/google/cloud/aiplatform/v1/annotation_pb.rb +35 -0
- data/lib/google/cloud/aiplatform/v1/annotation_spec_pb.rb +30 -0
- data/lib/google/cloud/aiplatform/v1/artifact_pb.rb +45 -0
- data/lib/google/cloud/aiplatform/v1/batch_prediction_job_pb.rb +83 -0
- data/lib/google/cloud/aiplatform/v1/completion_stats_pb.rb +27 -0
- data/lib/google/cloud/aiplatform/v1/context_pb.rb +38 -0
- data/lib/google/cloud/aiplatform/v1/custom_job_pb.rb +84 -0
- data/lib/google/cloud/aiplatform/v1/data_item_pb.rb +32 -0
- data/lib/google/cloud/aiplatform/v1/data_labeling_job_pb.rb +78 -0
- data/lib/google/cloud/aiplatform/v1/dataset_pb.rb +53 -0
- data/lib/google/cloud/aiplatform/v1/dataset_service_pb.rb +126 -0
- data/lib/google/cloud/aiplatform/v1/dataset_service_services_pb.rb +64 -0
- data/lib/google/cloud/aiplatform/v1/deployed_index_ref_pb.rb +26 -0
- data/lib/google/cloud/aiplatform/v1/deployed_model_ref_pb.rb +26 -0
- data/lib/google/cloud/aiplatform/v1/encryption_spec_pb.rb +24 -0
- data/lib/google/cloud/aiplatform/v1/endpoint_pb.rb +67 -0
- data/lib/google/cloud/aiplatform/v1/endpoint_service_pb.rb +90 -0
- data/lib/google/cloud/aiplatform/v1/endpoint_service_services_pb.rb +58 -0
- data/lib/google/cloud/aiplatform/v1/entity_type_pb.rb +32 -0
- data/lib/google/cloud/aiplatform/v1/env_var_pb.rb +25 -0
- data/lib/google/cloud/aiplatform/v1/event_pb.rb +36 -0
- data/lib/google/cloud/aiplatform/v1/execution_pb.rb +48 -0
- data/lib/google/cloud/aiplatform/v1/explanation_metadata_pb.rb +107 -0
- data/lib/google/cloud/aiplatform/v1/explanation_pb.rb +106 -0
- data/lib/google/cloud/aiplatform/v1/feature_monitoring_stats_pb.rb +30 -0
- data/lib/google/cloud/aiplatform/v1/feature_pb.rb +46 -0
- data/lib/google/cloud/aiplatform/v1/feature_selector_pb.rb +28 -0
- data/lib/google/cloud/aiplatform/v1/featurestore_online_service_pb.rb +86 -0
- data/lib/google/cloud/aiplatform/v1/featurestore_online_service_services_pb.rb +51 -0
- data/lib/google/cloud/aiplatform/v1/featurestore_pb.rb +44 -0
- data/lib/google/cloud/aiplatform/v1/featurestore_service_pb.rb +280 -0
- data/lib/google/cloud/aiplatform/v1/featurestore_service_services_pb.rb +109 -0
- data/lib/google/cloud/aiplatform/v1/hyperparameter_tuning_job_pb.rb +46 -0
- data/lib/google/cloud/aiplatform/v1/index_endpoint_pb.rb +66 -0
- data/lib/google/cloud/aiplatform/v1/index_endpoint_service_pb.rb +101 -0
- data/lib/google/cloud/aiplatform/v1/index_endpoint_service_services_pb.rb +62 -0
- data/lib/google/cloud/aiplatform/v1/index_pb.rb +38 -0
- data/lib/google/cloud/aiplatform/v1/index_service_pb.rb +98 -0
- data/lib/google/cloud/aiplatform/v1/index_service_services_pb.rb +55 -0
- data/lib/google/cloud/aiplatform/v1/io_pb.rb +56 -0
- data/lib/google/cloud/aiplatform/v1/job_service_pb.rb +217 -0
- data/lib/google/cloud/aiplatform/v1/job_service_services_pb.rb +134 -0
- data/lib/google/cloud/aiplatform/v1/job_state_pb.rb +32 -0
- data/lib/google/cloud/aiplatform/v1/lineage_subgraph_pb.rb +28 -0
- data/lib/google/cloud/aiplatform/v1/machine_resources_pb.rb +59 -0
- data/lib/google/cloud/aiplatform/v1/manual_batch_tuning_parameters_pb.rb +24 -0
- data/lib/google/cloud/aiplatform/v1/metadata_schema_pb.rb +38 -0
- data/lib/google/cloud/aiplatform/v1/metadata_service_pb.rb +272 -0
- data/lib/google/cloud/aiplatform/v1/metadata_service_services_pb.rb +119 -0
- data/lib/google/cloud/aiplatform/v1/metadata_store_pb.rb +36 -0
- data/lib/google/cloud/aiplatform/v1/migratable_resource_pb.rb +59 -0
- data/lib/google/cloud/aiplatform/v1/migration_service_pb.rb +106 -0
- data/lib/google/cloud/aiplatform/v1/migration_service_services_pb.rb +51 -0
- data/lib/google/cloud/aiplatform/v1/model_deployment_monitoring_job_pb.rb +111 -0
- data/lib/google/cloud/aiplatform/v1/model_evaluation_pb.rb +33 -0
- data/lib/google/cloud/aiplatform/v1/model_evaluation_slice_pb.rb +36 -0
- data/lib/google/cloud/aiplatform/v1/model_monitoring_pb.rb +93 -0
- data/lib/google/cloud/aiplatform/v1/model_pb.rb +88 -0
- data/lib/google/cloud/aiplatform/v1/model_service_pb.rb +129 -0
- data/lib/google/cloud/aiplatform/v1/model_service_services_pb.rb +69 -0
- data/lib/google/cloud/aiplatform/v1/operation_pb.rb +32 -0
- data/lib/google/cloud/aiplatform/v1/pipeline_job_pb.rb +115 -0
- data/lib/google/cloud/aiplatform/v1/pipeline_service_pb.rb +88 -0
- data/lib/google/cloud/aiplatform/v1/pipeline_service_services_pb.rb +84 -0
- data/lib/google/cloud/aiplatform/v1/pipeline_state_pb.rb +31 -0
- data/lib/google/cloud/aiplatform/v1/prediction_service_pb.rb +57 -0
- data/lib/google/cloud/aiplatform/v1/prediction_service_services_pb.rb +66 -0
- data/lib/google/cloud/aiplatform/v1/specialist_pool_pb.rb +30 -0
- data/lib/google/cloud/aiplatform/v1/specialist_pool_service_pb.rb +66 -0
- data/lib/google/cloud/aiplatform/v1/specialist_pool_service_services_pb.rb +58 -0
- data/lib/google/cloud/aiplatform/v1/study_pb.rb +191 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_data_pb.rb +56 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_experiment_pb.rb +33 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_pb.rb +36 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_run_pb.rb +32 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_service_pb.rb +244 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_service_services_pb.rb +115 -0
- data/lib/google/cloud/aiplatform/v1/tensorboard_time_series_pb.rb +48 -0
- data/lib/google/cloud/aiplatform/v1/training_pipeline_pb.rb +95 -0
- data/lib/google/cloud/aiplatform/v1/types_pb.rb +35 -0
- data/lib/google/cloud/aiplatform/v1/unmanaged_container_model_pb.rb +27 -0
- data/lib/google/cloud/aiplatform/v1/user_action_reference_pb.rb +27 -0
- data/lib/google/cloud/aiplatform/v1/value_pb.rb +27 -0
- data/lib/google/cloud/aiplatform/v1/vizier_service_pb.rb +136 -0
- data/lib/google/cloud/aiplatform/v1/vizier_service_services_pb.rb +90 -0
- data/lib/google-cloud-ai_platform-v1.rb +21 -0
- data/proto_docs/README.md +4 -0
- data/proto_docs/google/api/field_behavior.rb +71 -0
- data/proto_docs/google/api/httpbody.rb +80 -0
- data/proto_docs/google/api/resource.rb +222 -0
- data/proto_docs/google/cloud/aiplatform/v1/accelerator_type.rb +50 -0
- data/proto_docs/google/cloud/aiplatform/v1/annotation.rb +92 -0
- data/proto_docs/google/cloud/aiplatform/v1/annotation_spec.rb +50 -0
- data/proto_docs/google/cloud/aiplatform/v1/artifact.rb +112 -0
- data/proto_docs/google/cloud/aiplatform/v1/batch_prediction_job.rb +278 -0
- data/proto_docs/google/cloud/aiplatform/v1/completion_stats.rb +46 -0
- data/proto_docs/google/cloud/aiplatform/v1/context.rb +92 -0
- data/proto_docs/google/cloud/aiplatform/v1/custom_job.rb +272 -0
- data/proto_docs/google/cloud/aiplatform/v1/data_item.rb +73 -0
- data/proto_docs/google/cloud/aiplatform/v1/data_labeling_job.rb +207 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset.rb +154 -0
- data/proto_docs/google/cloud/aiplatform/v1/dataset_service.rb +301 -0
- data/proto_docs/google/cloud/aiplatform/v1/deployed_index_ref.rb +38 -0
- data/proto_docs/google/cloud/aiplatform/v1/deployed_model_ref.rb +38 -0
- data/proto_docs/google/cloud/aiplatform/v1/encryption_spec.rb +40 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint.rb +227 -0
- data/proto_docs/google/cloud/aiplatform/v1/endpoint_service.rb +258 -0
- data/proto_docs/google/cloud/aiplatform/v1/entity_type.rb +79 -0
- data/proto_docs/google/cloud/aiplatform/v1/env_var.rb +44 -0
- data/proto_docs/google/cloud/aiplatform/v1/event.rb +79 -0
- data/proto_docs/google/cloud/aiplatform/v1/execution.rb +118 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation.rb +445 -0
- data/proto_docs/google/cloud/aiplatform/v1/explanation_metadata.rb +419 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature.rb +115 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_monitoring_stats.rb +88 -0
- data/proto_docs/google/cloud/aiplatform/v1/feature_selector.rb +49 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore.rb +115 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_online_service.rb +203 -0
- data/proto_docs/google/cloud/aiplatform/v1/featurestore_service.rb +978 -0
- data/proto_docs/google/cloud/aiplatform/v1/hyperparameter_tuning_job.rb +109 -0
- data/proto_docs/google/cloud/aiplatform/v1/index.rb +98 -0
- data/proto_docs/google/cloud/aiplatform/v1/index_endpoint.rb +252 -0
- data/proto_docs/google/cloud/aiplatform/v1/index_endpoint_service.rb +240 -0
- data/proto_docs/google/cloud/aiplatform/v1/index_service.rb +220 -0
- data/proto_docs/google/cloud/aiplatform/v1/io.rb +134 -0
- data/proto_docs/google/cloud/aiplatform/v1/job_service.rb +660 -0
- data/proto_docs/google/cloud/aiplatform/v1/job_state.rb +60 -0
- data/proto_docs/google/cloud/aiplatform/v1/lineage_subgraph.rb +42 -0
- data/proto_docs/google/cloud/aiplatform/v1/machine_resources.rb +194 -0
- data/proto_docs/google/cloud/aiplatform/v1/manual_batch_tuning_parameters.rb +41 -0
- data/proto_docs/google/cloud/aiplatform/v1/metadata_schema.rb +74 -0
- data/proto_docs/google/cloud/aiplatform/v1/metadata_service.rb +912 -0
- data/proto_docs/google/cloud/aiplatform/v1/metadata_store.rb +62 -0
- data/proto_docs/google/cloud/aiplatform/v1/migratable_resource.rb +133 -0
- data/proto_docs/google/cloud/aiplatform/v1/migration_service.rb +260 -0
- data/proto_docs/google/cloud/aiplatform/v1/model.rb +562 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_deployment_monitoring_job.rb +293 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_evaluation.rb +60 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_evaluation_slice.rb +68 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_monitoring.rb +257 -0
- data/proto_docs/google/cloud/aiplatform/v1/model_service.rb +329 -0
- data/proto_docs/google/cloud/aiplatform/v1/operation.rb +55 -0
- data/proto_docs/google/cloud/aiplatform/v1/pipeline_job.rb +347 -0
- data/proto_docs/google/cloud/aiplatform/v1/pipeline_service.rb +258 -0
- data/proto_docs/google/cloud/aiplatform/v1/pipeline_state.rb +59 -0
- data/proto_docs/google/cloud/aiplatform/v1/prediction_service.rb +165 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_classification.rb +52 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_object_detection.rb +52 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/image_segmentation.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_classification.rb +46 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_extraction.rb +53 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/text_sentiment.rb +46 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_action_recognition.rb +59 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_classification.rb +59 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/instance/video_object_tracking.rb +59 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_classification.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_object_detection.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/image_segmentation.rb +44 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_action_recognition.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_classification.rb +72 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/params/video_object_tracking.rb +51 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/classification.rb +49 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/image_object_detection.rb +58 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/image_segmentation.rb +53 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_classification.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/tabular_regression.rb +47 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/text_extraction.rb +60 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/text_sentiment.rb +45 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_action_recognition.rb +60 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_classification.rb +73 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/predict/prediction/video_object_tracking.rb +91 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_classification.rb +142 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_object_detection.rb +134 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_image_segmentation.rb +120 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_tables.rb +315 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_classification.rb +48 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_extraction.rb +46 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_text_sentiment.rb +55 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_action_recognition.rb +73 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_classification.rb +67 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/automl_video_object_tracking.rb +78 -0
- data/proto_docs/google/cloud/aiplatform/v1/schema/trainingjob/definition/export_evaluated_data_items_config.rb +51 -0
- data/proto_docs/google/cloud/aiplatform/v1/specialist_pool.rb +58 -0
- data/proto_docs/google/cloud/aiplatform/v1/specialist_pool_service.rb +136 -0
- data/proto_docs/google/cloud/aiplatform/v1/study.rb +543 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard.rb +89 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_data.rb +110 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_experiment.rb +82 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_run.rb +85 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_service.rb +706 -0
- data/proto_docs/google/cloud/aiplatform/v1/tensorboard_time_series.rb +101 -0
- data/proto_docs/google/cloud/aiplatform/v1/training_pipeline.rb +381 -0
- data/proto_docs/google/cloud/aiplatform/v1/types.rb +62 -0
- data/proto_docs/google/cloud/aiplatform/v1/unmanaged_container_model.rb +44 -0
- data/proto_docs/google/cloud/aiplatform/v1/user_action_reference.rb +49 -0
- data/proto_docs/google/cloud/aiplatform/v1/value.rb +41 -0
- data/proto_docs/google/cloud/aiplatform/v1/vizier_service.rb +332 -0
- data/proto_docs/google/longrunning/operations.rb +164 -0
- data/proto_docs/google/protobuf/any.rb +141 -0
- data/proto_docs/google/protobuf/duration.rb +98 -0
- data/proto_docs/google/protobuf/empty.rb +36 -0
- data/proto_docs/google/protobuf/field_mask.rb +229 -0
- data/proto_docs/google/protobuf/struct.rb +96 -0
- data/proto_docs/google/protobuf/timestamp.rb +129 -0
- data/proto_docs/google/protobuf/wrappers.rb +121 -0
- data/proto_docs/google/rpc/status.rb +46 -0
- data/proto_docs/google/type/money.rb +43 -0
- metadata +479 -0
|
@@ -0,0 +1,1355 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Copyright 2022 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
|
+
# https://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
|
+
# Auto-generated by gapic-generator-ruby. DO NOT EDIT!
|
|
18
|
+
|
|
19
|
+
require "google/cloud/errors"
|
|
20
|
+
require "google/cloud/aiplatform/v1/model_service_pb"
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module AIPlatform
|
|
25
|
+
module V1
|
|
26
|
+
module ModelService
|
|
27
|
+
##
|
|
28
|
+
# Client for the ModelService service.
|
|
29
|
+
#
|
|
30
|
+
# A service for managing Vertex AI's machine learning Models.
|
|
31
|
+
#
|
|
32
|
+
class Client
|
|
33
|
+
include Paths
|
|
34
|
+
|
|
35
|
+
# @private
|
|
36
|
+
attr_reader :model_service_stub
|
|
37
|
+
|
|
38
|
+
##
|
|
39
|
+
# Configure the ModelService Client class.
|
|
40
|
+
#
|
|
41
|
+
# See {::Google::Cloud::AIPlatform::V1::ModelService::Client::Configuration}
|
|
42
|
+
# for a description of the configuration fields.
|
|
43
|
+
#
|
|
44
|
+
# @example
|
|
45
|
+
#
|
|
46
|
+
# # Modify the configuration for all ModelService clients
|
|
47
|
+
# ::Google::Cloud::AIPlatform::V1::ModelService::Client.configure do |config|
|
|
48
|
+
# config.timeout = 10.0
|
|
49
|
+
# end
|
|
50
|
+
#
|
|
51
|
+
# @yield [config] Configure the Client client.
|
|
52
|
+
# @yieldparam config [Client::Configuration]
|
|
53
|
+
#
|
|
54
|
+
# @return [Client::Configuration]
|
|
55
|
+
#
|
|
56
|
+
def self.configure
|
|
57
|
+
@configure ||= begin
|
|
58
|
+
namespace = ["Google", "Cloud", "AIPlatform", "V1"]
|
|
59
|
+
parent_config = while namespace.any?
|
|
60
|
+
parent_name = namespace.join "::"
|
|
61
|
+
parent_const = const_get parent_name
|
|
62
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
63
|
+
namespace.pop
|
|
64
|
+
end
|
|
65
|
+
default_config = Client::Configuration.new parent_config
|
|
66
|
+
|
|
67
|
+
default_config
|
|
68
|
+
end
|
|
69
|
+
yield @configure if block_given?
|
|
70
|
+
@configure
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
##
|
|
74
|
+
# Configure the ModelService Client instance.
|
|
75
|
+
#
|
|
76
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
77
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
78
|
+
# should be made on {Client.configure}.
|
|
79
|
+
#
|
|
80
|
+
# See {::Google::Cloud::AIPlatform::V1::ModelService::Client::Configuration}
|
|
81
|
+
# for a description of the configuration fields.
|
|
82
|
+
#
|
|
83
|
+
# @yield [config] Configure the Client client.
|
|
84
|
+
# @yieldparam config [Client::Configuration]
|
|
85
|
+
#
|
|
86
|
+
# @return [Client::Configuration]
|
|
87
|
+
#
|
|
88
|
+
def configure
|
|
89
|
+
yield @config if block_given?
|
|
90
|
+
@config
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
##
|
|
94
|
+
# Create a new ModelService client object.
|
|
95
|
+
#
|
|
96
|
+
# @example
|
|
97
|
+
#
|
|
98
|
+
# # Create a client using the default configuration
|
|
99
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
100
|
+
#
|
|
101
|
+
# # Create a client using a custom configuration
|
|
102
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new do |config|
|
|
103
|
+
# config.timeout = 10.0
|
|
104
|
+
# end
|
|
105
|
+
#
|
|
106
|
+
# @yield [config] Configure the ModelService client.
|
|
107
|
+
# @yieldparam config [Client::Configuration]
|
|
108
|
+
#
|
|
109
|
+
def initialize
|
|
110
|
+
# These require statements are intentionally placed here to initialize
|
|
111
|
+
# the gRPC module only when it's required.
|
|
112
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
113
|
+
require "gapic/grpc"
|
|
114
|
+
require "google/cloud/aiplatform/v1/model_service_services_pb"
|
|
115
|
+
|
|
116
|
+
# Create the configuration object
|
|
117
|
+
@config = Configuration.new Client.configure
|
|
118
|
+
|
|
119
|
+
# Yield the configuration if needed
|
|
120
|
+
yield @config if block_given?
|
|
121
|
+
|
|
122
|
+
# Create credentials
|
|
123
|
+
credentials = @config.credentials
|
|
124
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
125
|
+
# but only if the default endpoint does not have a region prefix.
|
|
126
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
|
127
|
+
!@config.endpoint.split(".").first.include?("-")
|
|
128
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
129
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
130
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
131
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
132
|
+
end
|
|
133
|
+
@quota_project_id = @config.quota_project
|
|
134
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
135
|
+
|
|
136
|
+
@operations_client = Operations.new do |config|
|
|
137
|
+
config.credentials = credentials
|
|
138
|
+
config.quota_project = @quota_project_id
|
|
139
|
+
config.endpoint = @config.endpoint
|
|
140
|
+
end
|
|
141
|
+
|
|
142
|
+
@model_service_stub = ::Gapic::ServiceStub.new(
|
|
143
|
+
::Google::Cloud::AIPlatform::V1::ModelService::Stub,
|
|
144
|
+
credentials: credentials,
|
|
145
|
+
endpoint: @config.endpoint,
|
|
146
|
+
channel_args: @config.channel_args,
|
|
147
|
+
interceptors: @config.interceptors
|
|
148
|
+
)
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
##
|
|
152
|
+
# Get the associated client for long-running operations.
|
|
153
|
+
#
|
|
154
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelService::Operations]
|
|
155
|
+
#
|
|
156
|
+
attr_reader :operations_client
|
|
157
|
+
|
|
158
|
+
# Service calls
|
|
159
|
+
|
|
160
|
+
##
|
|
161
|
+
# Uploads a Model artifact into Vertex AI.
|
|
162
|
+
#
|
|
163
|
+
# @overload upload_model(request, options = nil)
|
|
164
|
+
# Pass arguments to `upload_model` via a request object, either of type
|
|
165
|
+
# {::Google::Cloud::AIPlatform::V1::UploadModelRequest} or an equivalent Hash.
|
|
166
|
+
#
|
|
167
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UploadModelRequest, ::Hash]
|
|
168
|
+
# A request object representing the call parameters. Required. To specify no
|
|
169
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
170
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
171
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
172
|
+
#
|
|
173
|
+
# @overload upload_model(parent: nil, model: nil)
|
|
174
|
+
# Pass arguments to `upload_model` via keyword arguments. Note that at
|
|
175
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
176
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
177
|
+
#
|
|
178
|
+
# @param parent [::String]
|
|
179
|
+
# Required. The resource name of the Location into which to upload the Model.
|
|
180
|
+
# Format: `projects/{project}/locations/{location}`
|
|
181
|
+
# @param model [::Google::Cloud::AIPlatform::V1::Model, ::Hash]
|
|
182
|
+
# Required. The Model to create.
|
|
183
|
+
#
|
|
184
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
185
|
+
# @yieldparam response [::Gapic::Operation]
|
|
186
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
187
|
+
#
|
|
188
|
+
# @return [::Gapic::Operation]
|
|
189
|
+
#
|
|
190
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
191
|
+
#
|
|
192
|
+
# @example Basic example
|
|
193
|
+
# require "google/cloud/ai_platform/v1"
|
|
194
|
+
#
|
|
195
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
196
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
197
|
+
#
|
|
198
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
199
|
+
# request = Google::Cloud::AIPlatform::V1::UploadModelRequest.new
|
|
200
|
+
#
|
|
201
|
+
# # Call the upload_model method.
|
|
202
|
+
# result = client.upload_model request
|
|
203
|
+
#
|
|
204
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
205
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
206
|
+
# # for results. Here is how to block until completion:
|
|
207
|
+
# result.wait_until_done! timeout: 60
|
|
208
|
+
# if result.response?
|
|
209
|
+
# p result.response
|
|
210
|
+
# else
|
|
211
|
+
# puts "Error!"
|
|
212
|
+
# end
|
|
213
|
+
#
|
|
214
|
+
def upload_model request, options = nil
|
|
215
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
216
|
+
|
|
217
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UploadModelRequest
|
|
218
|
+
|
|
219
|
+
# Converts hash and nil to an options object
|
|
220
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
221
|
+
|
|
222
|
+
# Customize the options with defaults
|
|
223
|
+
metadata = @config.rpcs.upload_model.metadata.to_h
|
|
224
|
+
|
|
225
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
226
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
227
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
228
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
229
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
230
|
+
|
|
231
|
+
header_params = {}
|
|
232
|
+
if request.parent
|
|
233
|
+
header_params["parent"] = request.parent
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
237
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
238
|
+
|
|
239
|
+
options.apply_defaults timeout: @config.rpcs.upload_model.timeout,
|
|
240
|
+
metadata: metadata,
|
|
241
|
+
retry_policy: @config.rpcs.upload_model.retry_policy
|
|
242
|
+
|
|
243
|
+
options.apply_defaults timeout: @config.timeout,
|
|
244
|
+
metadata: @config.metadata,
|
|
245
|
+
retry_policy: @config.retry_policy
|
|
246
|
+
|
|
247
|
+
@model_service_stub.call_rpc :upload_model, request, options: options do |response, operation|
|
|
248
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
249
|
+
yield response, operation if block_given?
|
|
250
|
+
return response
|
|
251
|
+
end
|
|
252
|
+
rescue ::GRPC::BadStatus => e
|
|
253
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
254
|
+
end
|
|
255
|
+
|
|
256
|
+
##
|
|
257
|
+
# Gets a Model.
|
|
258
|
+
#
|
|
259
|
+
# @overload get_model(request, options = nil)
|
|
260
|
+
# Pass arguments to `get_model` via a request object, either of type
|
|
261
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelRequest} or an equivalent Hash.
|
|
262
|
+
#
|
|
263
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelRequest, ::Hash]
|
|
264
|
+
# A request object representing the call parameters. Required. To specify no
|
|
265
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
266
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
267
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
268
|
+
#
|
|
269
|
+
# @overload get_model(name: nil)
|
|
270
|
+
# Pass arguments to `get_model` via keyword arguments. Note that at
|
|
271
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
272
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
273
|
+
#
|
|
274
|
+
# @param name [::String]
|
|
275
|
+
# Required. The name of the Model resource.
|
|
276
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
|
277
|
+
#
|
|
278
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
279
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Model]
|
|
280
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
281
|
+
#
|
|
282
|
+
# @return [::Google::Cloud::AIPlatform::V1::Model]
|
|
283
|
+
#
|
|
284
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
285
|
+
#
|
|
286
|
+
# @example Basic example
|
|
287
|
+
# require "google/cloud/ai_platform/v1"
|
|
288
|
+
#
|
|
289
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
290
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
291
|
+
#
|
|
292
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
293
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelRequest.new
|
|
294
|
+
#
|
|
295
|
+
# # Call the get_model method.
|
|
296
|
+
# result = client.get_model request
|
|
297
|
+
#
|
|
298
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Model.
|
|
299
|
+
# p result
|
|
300
|
+
#
|
|
301
|
+
def get_model request, options = nil
|
|
302
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
303
|
+
|
|
304
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelRequest
|
|
305
|
+
|
|
306
|
+
# Converts hash and nil to an options object
|
|
307
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
308
|
+
|
|
309
|
+
# Customize the options with defaults
|
|
310
|
+
metadata = @config.rpcs.get_model.metadata.to_h
|
|
311
|
+
|
|
312
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
313
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
314
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
315
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
316
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
317
|
+
|
|
318
|
+
header_params = {}
|
|
319
|
+
if request.name
|
|
320
|
+
header_params["name"] = request.name
|
|
321
|
+
end
|
|
322
|
+
|
|
323
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
324
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
325
|
+
|
|
326
|
+
options.apply_defaults timeout: @config.rpcs.get_model.timeout,
|
|
327
|
+
metadata: metadata,
|
|
328
|
+
retry_policy: @config.rpcs.get_model.retry_policy
|
|
329
|
+
|
|
330
|
+
options.apply_defaults timeout: @config.timeout,
|
|
331
|
+
metadata: @config.metadata,
|
|
332
|
+
retry_policy: @config.retry_policy
|
|
333
|
+
|
|
334
|
+
@model_service_stub.call_rpc :get_model, request, options: options do |response, operation|
|
|
335
|
+
yield response, operation if block_given?
|
|
336
|
+
return response
|
|
337
|
+
end
|
|
338
|
+
rescue ::GRPC::BadStatus => e
|
|
339
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
340
|
+
end
|
|
341
|
+
|
|
342
|
+
##
|
|
343
|
+
# Lists Models in a Location.
|
|
344
|
+
#
|
|
345
|
+
# @overload list_models(request, options = nil)
|
|
346
|
+
# Pass arguments to `list_models` via a request object, either of type
|
|
347
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelsRequest} or an equivalent Hash.
|
|
348
|
+
#
|
|
349
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelsRequest, ::Hash]
|
|
350
|
+
# A request object representing the call parameters. Required. To specify no
|
|
351
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
352
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
353
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
354
|
+
#
|
|
355
|
+
# @overload list_models(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil, order_by: nil)
|
|
356
|
+
# Pass arguments to `list_models` via keyword arguments. Note that at
|
|
357
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
358
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
359
|
+
#
|
|
360
|
+
# @param parent [::String]
|
|
361
|
+
# Required. The resource name of the Location to list the Models from.
|
|
362
|
+
# Format: `projects/{project}/locations/{location}`
|
|
363
|
+
# @param filter [::String]
|
|
364
|
+
# An expression for filtering the results of the request. For field names
|
|
365
|
+
# both snake_case and camelCase are supported.
|
|
366
|
+
#
|
|
367
|
+
# * `model` supports = and !=. `model` represents the Model ID,
|
|
368
|
+
# i.e. the last segment of the Model's {::Google::Cloud::AIPlatform::V1::Model#name resource name}.
|
|
369
|
+
# * `display_name` supports = and !=
|
|
370
|
+
# * `labels` supports general map functions that is:
|
|
371
|
+
# * `labels.key=value` - key:value equality
|
|
372
|
+
# * `labels.key:* or labels:key - key existence
|
|
373
|
+
# * A key including a space must be quoted. `labels."a key"`.
|
|
374
|
+
#
|
|
375
|
+
# Some examples:
|
|
376
|
+
# * `model=1234`
|
|
377
|
+
# * `displayName="myDisplayName"`
|
|
378
|
+
# * `labels.myKey="myValue"`
|
|
379
|
+
# @param page_size [::Integer]
|
|
380
|
+
# The standard list page size.
|
|
381
|
+
# @param page_token [::String]
|
|
382
|
+
# The standard list page token.
|
|
383
|
+
# Typically obtained via
|
|
384
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelsResponse#next_page_token ListModelsResponse.next_page_token} of the previous
|
|
385
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Client#list_models ModelService.ListModels} call.
|
|
386
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
387
|
+
# Mask specifying which fields to read.
|
|
388
|
+
# @param order_by [::String]
|
|
389
|
+
# A comma-separated list of fields to order by, sorted in ascending order.
|
|
390
|
+
# Use "desc" after a field name for descending.
|
|
391
|
+
# Supported fields:
|
|
392
|
+
# * `display_name`
|
|
393
|
+
# * `create_time`
|
|
394
|
+
# * `update_time`
|
|
395
|
+
#
|
|
396
|
+
# Example: `display_name, create_time desc`.
|
|
397
|
+
#
|
|
398
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
399
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
|
400
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
401
|
+
#
|
|
402
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Model>]
|
|
403
|
+
#
|
|
404
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
405
|
+
#
|
|
406
|
+
# @example Basic example
|
|
407
|
+
# require "google/cloud/ai_platform/v1"
|
|
408
|
+
#
|
|
409
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
410
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
411
|
+
#
|
|
412
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
413
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelsRequest.new
|
|
414
|
+
#
|
|
415
|
+
# # Call the list_models method.
|
|
416
|
+
# result = client.list_models request
|
|
417
|
+
#
|
|
418
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
419
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
420
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
421
|
+
# # methods are also available for managing paging directly.
|
|
422
|
+
# result.each do |response|
|
|
423
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::Model.
|
|
424
|
+
# p response
|
|
425
|
+
# end
|
|
426
|
+
#
|
|
427
|
+
def list_models request, options = nil
|
|
428
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
429
|
+
|
|
430
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelsRequest
|
|
431
|
+
|
|
432
|
+
# Converts hash and nil to an options object
|
|
433
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
434
|
+
|
|
435
|
+
# Customize the options with defaults
|
|
436
|
+
metadata = @config.rpcs.list_models.metadata.to_h
|
|
437
|
+
|
|
438
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
439
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
440
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
441
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
442
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
443
|
+
|
|
444
|
+
header_params = {}
|
|
445
|
+
if request.parent
|
|
446
|
+
header_params["parent"] = request.parent
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
450
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
451
|
+
|
|
452
|
+
options.apply_defaults timeout: @config.rpcs.list_models.timeout,
|
|
453
|
+
metadata: metadata,
|
|
454
|
+
retry_policy: @config.rpcs.list_models.retry_policy
|
|
455
|
+
|
|
456
|
+
options.apply_defaults timeout: @config.timeout,
|
|
457
|
+
metadata: @config.metadata,
|
|
458
|
+
retry_policy: @config.retry_policy
|
|
459
|
+
|
|
460
|
+
@model_service_stub.call_rpc :list_models, request, options: options do |response, operation|
|
|
461
|
+
response = ::Gapic::PagedEnumerable.new @model_service_stub, :list_models, request, response, operation, options
|
|
462
|
+
yield response, operation if block_given?
|
|
463
|
+
return response
|
|
464
|
+
end
|
|
465
|
+
rescue ::GRPC::BadStatus => e
|
|
466
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
467
|
+
end
|
|
468
|
+
|
|
469
|
+
##
|
|
470
|
+
# Updates a Model.
|
|
471
|
+
#
|
|
472
|
+
# @overload update_model(request, options = nil)
|
|
473
|
+
# Pass arguments to `update_model` via a request object, either of type
|
|
474
|
+
# {::Google::Cloud::AIPlatform::V1::UpdateModelRequest} or an equivalent Hash.
|
|
475
|
+
#
|
|
476
|
+
# @param request [::Google::Cloud::AIPlatform::V1::UpdateModelRequest, ::Hash]
|
|
477
|
+
# A request object representing the call parameters. Required. To specify no
|
|
478
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
479
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
480
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
481
|
+
#
|
|
482
|
+
# @overload update_model(model: nil, update_mask: nil)
|
|
483
|
+
# Pass arguments to `update_model` via keyword arguments. Note that at
|
|
484
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
485
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
486
|
+
#
|
|
487
|
+
# @param model [::Google::Cloud::AIPlatform::V1::Model, ::Hash]
|
|
488
|
+
# Required. The Model which replaces the resource on the server.
|
|
489
|
+
# @param update_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
490
|
+
# Required. The update mask applies to the resource.
|
|
491
|
+
# For the `FieldMask` definition, see {::Google::Protobuf::FieldMask google.protobuf.FieldMask}.
|
|
492
|
+
#
|
|
493
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
494
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Model]
|
|
495
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
496
|
+
#
|
|
497
|
+
# @return [::Google::Cloud::AIPlatform::V1::Model]
|
|
498
|
+
#
|
|
499
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
500
|
+
#
|
|
501
|
+
# @example Basic example
|
|
502
|
+
# require "google/cloud/ai_platform/v1"
|
|
503
|
+
#
|
|
504
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
505
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
506
|
+
#
|
|
507
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
508
|
+
# request = Google::Cloud::AIPlatform::V1::UpdateModelRequest.new
|
|
509
|
+
#
|
|
510
|
+
# # Call the update_model method.
|
|
511
|
+
# result = client.update_model request
|
|
512
|
+
#
|
|
513
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Model.
|
|
514
|
+
# p result
|
|
515
|
+
#
|
|
516
|
+
def update_model request, options = nil
|
|
517
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
518
|
+
|
|
519
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::UpdateModelRequest
|
|
520
|
+
|
|
521
|
+
# Converts hash and nil to an options object
|
|
522
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
523
|
+
|
|
524
|
+
# Customize the options with defaults
|
|
525
|
+
metadata = @config.rpcs.update_model.metadata.to_h
|
|
526
|
+
|
|
527
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
528
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
529
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
530
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
531
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
532
|
+
|
|
533
|
+
header_params = {}
|
|
534
|
+
if request.model&.name
|
|
535
|
+
header_params["model.name"] = request.model.name
|
|
536
|
+
end
|
|
537
|
+
|
|
538
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
539
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
540
|
+
|
|
541
|
+
options.apply_defaults timeout: @config.rpcs.update_model.timeout,
|
|
542
|
+
metadata: metadata,
|
|
543
|
+
retry_policy: @config.rpcs.update_model.retry_policy
|
|
544
|
+
|
|
545
|
+
options.apply_defaults timeout: @config.timeout,
|
|
546
|
+
metadata: @config.metadata,
|
|
547
|
+
retry_policy: @config.retry_policy
|
|
548
|
+
|
|
549
|
+
@model_service_stub.call_rpc :update_model, request, options: options do |response, operation|
|
|
550
|
+
yield response, operation if block_given?
|
|
551
|
+
return response
|
|
552
|
+
end
|
|
553
|
+
rescue ::GRPC::BadStatus => e
|
|
554
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
555
|
+
end
|
|
556
|
+
|
|
557
|
+
##
|
|
558
|
+
# Deletes a Model.
|
|
559
|
+
#
|
|
560
|
+
# A model cannot be deleted if any {::Google::Cloud::AIPlatform::V1::Endpoint Endpoint} resource has a
|
|
561
|
+
# {::Google::Cloud::AIPlatform::V1::DeployedModel DeployedModel} based on the model in its
|
|
562
|
+
# {::Google::Cloud::AIPlatform::V1::Endpoint#deployed_models deployed_models} field.
|
|
563
|
+
#
|
|
564
|
+
# @overload delete_model(request, options = nil)
|
|
565
|
+
# Pass arguments to `delete_model` via a request object, either of type
|
|
566
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteModelRequest} or an equivalent Hash.
|
|
567
|
+
#
|
|
568
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteModelRequest, ::Hash]
|
|
569
|
+
# A request object representing the call parameters. Required. To specify no
|
|
570
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
571
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
572
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
573
|
+
#
|
|
574
|
+
# @overload delete_model(name: nil)
|
|
575
|
+
# Pass arguments to `delete_model` via keyword arguments. Note that at
|
|
576
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
577
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
578
|
+
#
|
|
579
|
+
# @param name [::String]
|
|
580
|
+
# Required. The name of the Model resource to be deleted.
|
|
581
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
|
582
|
+
#
|
|
583
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
584
|
+
# @yieldparam response [::Gapic::Operation]
|
|
585
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
586
|
+
#
|
|
587
|
+
# @return [::Gapic::Operation]
|
|
588
|
+
#
|
|
589
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
590
|
+
#
|
|
591
|
+
# @example Basic example
|
|
592
|
+
# require "google/cloud/ai_platform/v1"
|
|
593
|
+
#
|
|
594
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
595
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
596
|
+
#
|
|
597
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
598
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteModelRequest.new
|
|
599
|
+
#
|
|
600
|
+
# # Call the delete_model method.
|
|
601
|
+
# result = client.delete_model request
|
|
602
|
+
#
|
|
603
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
604
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
605
|
+
# # for results. Here is how to block until completion:
|
|
606
|
+
# result.wait_until_done! timeout: 60
|
|
607
|
+
# if result.response?
|
|
608
|
+
# p result.response
|
|
609
|
+
# else
|
|
610
|
+
# puts "Error!"
|
|
611
|
+
# end
|
|
612
|
+
#
|
|
613
|
+
def delete_model request, options = nil
|
|
614
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
615
|
+
|
|
616
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteModelRequest
|
|
617
|
+
|
|
618
|
+
# Converts hash and nil to an options object
|
|
619
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
620
|
+
|
|
621
|
+
# Customize the options with defaults
|
|
622
|
+
metadata = @config.rpcs.delete_model.metadata.to_h
|
|
623
|
+
|
|
624
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
625
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
626
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
627
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
628
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
629
|
+
|
|
630
|
+
header_params = {}
|
|
631
|
+
if request.name
|
|
632
|
+
header_params["name"] = request.name
|
|
633
|
+
end
|
|
634
|
+
|
|
635
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
636
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
637
|
+
|
|
638
|
+
options.apply_defaults timeout: @config.rpcs.delete_model.timeout,
|
|
639
|
+
metadata: metadata,
|
|
640
|
+
retry_policy: @config.rpcs.delete_model.retry_policy
|
|
641
|
+
|
|
642
|
+
options.apply_defaults timeout: @config.timeout,
|
|
643
|
+
metadata: @config.metadata,
|
|
644
|
+
retry_policy: @config.retry_policy
|
|
645
|
+
|
|
646
|
+
@model_service_stub.call_rpc :delete_model, request, options: options do |response, operation|
|
|
647
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
648
|
+
yield response, operation if block_given?
|
|
649
|
+
return response
|
|
650
|
+
end
|
|
651
|
+
rescue ::GRPC::BadStatus => e
|
|
652
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
653
|
+
end
|
|
654
|
+
|
|
655
|
+
##
|
|
656
|
+
# Exports a trained, exportable Model to a location specified by the
|
|
657
|
+
# user. A Model is considered to be exportable if it has at least one
|
|
658
|
+
# {::Google::Cloud::AIPlatform::V1::Model#supported_export_formats supported export format}.
|
|
659
|
+
#
|
|
660
|
+
# @overload export_model(request, options = nil)
|
|
661
|
+
# Pass arguments to `export_model` via a request object, either of type
|
|
662
|
+
# {::Google::Cloud::AIPlatform::V1::ExportModelRequest} or an equivalent Hash.
|
|
663
|
+
#
|
|
664
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ExportModelRequest, ::Hash]
|
|
665
|
+
# A request object representing the call parameters. Required. To specify no
|
|
666
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
667
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
668
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
669
|
+
#
|
|
670
|
+
# @overload export_model(name: nil, output_config: nil)
|
|
671
|
+
# Pass arguments to `export_model` via keyword arguments. Note that at
|
|
672
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
673
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
674
|
+
#
|
|
675
|
+
# @param name [::String]
|
|
676
|
+
# Required. The resource name of the Model to export.
|
|
677
|
+
# @param output_config [::Google::Cloud::AIPlatform::V1::ExportModelRequest::OutputConfig, ::Hash]
|
|
678
|
+
# Required. The desired output location and configuration.
|
|
679
|
+
#
|
|
680
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
681
|
+
# @yieldparam response [::Gapic::Operation]
|
|
682
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
683
|
+
#
|
|
684
|
+
# @return [::Gapic::Operation]
|
|
685
|
+
#
|
|
686
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
687
|
+
#
|
|
688
|
+
# @example Basic example
|
|
689
|
+
# require "google/cloud/ai_platform/v1"
|
|
690
|
+
#
|
|
691
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
692
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
693
|
+
#
|
|
694
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
695
|
+
# request = Google::Cloud::AIPlatform::V1::ExportModelRequest.new
|
|
696
|
+
#
|
|
697
|
+
# # Call the export_model method.
|
|
698
|
+
# result = client.export_model request
|
|
699
|
+
#
|
|
700
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
701
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
702
|
+
# # for results. Here is how to block until completion:
|
|
703
|
+
# result.wait_until_done! timeout: 60
|
|
704
|
+
# if result.response?
|
|
705
|
+
# p result.response
|
|
706
|
+
# else
|
|
707
|
+
# puts "Error!"
|
|
708
|
+
# end
|
|
709
|
+
#
|
|
710
|
+
def export_model request, options = nil
|
|
711
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
712
|
+
|
|
713
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ExportModelRequest
|
|
714
|
+
|
|
715
|
+
# Converts hash and nil to an options object
|
|
716
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
717
|
+
|
|
718
|
+
# Customize the options with defaults
|
|
719
|
+
metadata = @config.rpcs.export_model.metadata.to_h
|
|
720
|
+
|
|
721
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
722
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
723
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
724
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
725
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
726
|
+
|
|
727
|
+
header_params = {}
|
|
728
|
+
if request.name
|
|
729
|
+
header_params["name"] = request.name
|
|
730
|
+
end
|
|
731
|
+
|
|
732
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
733
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
734
|
+
|
|
735
|
+
options.apply_defaults timeout: @config.rpcs.export_model.timeout,
|
|
736
|
+
metadata: metadata,
|
|
737
|
+
retry_policy: @config.rpcs.export_model.retry_policy
|
|
738
|
+
|
|
739
|
+
options.apply_defaults timeout: @config.timeout,
|
|
740
|
+
metadata: @config.metadata,
|
|
741
|
+
retry_policy: @config.retry_policy
|
|
742
|
+
|
|
743
|
+
@model_service_stub.call_rpc :export_model, request, options: options do |response, operation|
|
|
744
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
745
|
+
yield response, operation if block_given?
|
|
746
|
+
return response
|
|
747
|
+
end
|
|
748
|
+
rescue ::GRPC::BadStatus => e
|
|
749
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
750
|
+
end
|
|
751
|
+
|
|
752
|
+
##
|
|
753
|
+
# Gets a ModelEvaluation.
|
|
754
|
+
#
|
|
755
|
+
# @overload get_model_evaluation(request, options = nil)
|
|
756
|
+
# Pass arguments to `get_model_evaluation` via a request object, either of type
|
|
757
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest} or an equivalent Hash.
|
|
758
|
+
#
|
|
759
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest, ::Hash]
|
|
760
|
+
# A request object representing the call parameters. Required. To specify no
|
|
761
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
762
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
763
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
764
|
+
#
|
|
765
|
+
# @overload get_model_evaluation(name: nil)
|
|
766
|
+
# Pass arguments to `get_model_evaluation` via keyword arguments. Note that at
|
|
767
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
768
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
769
|
+
#
|
|
770
|
+
# @param name [::String]
|
|
771
|
+
# Required. The name of the ModelEvaluation resource.
|
|
772
|
+
# Format:
|
|
773
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
|
|
774
|
+
#
|
|
775
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
776
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
|
777
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
778
|
+
#
|
|
779
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelEvaluation]
|
|
780
|
+
#
|
|
781
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
782
|
+
#
|
|
783
|
+
# @example Basic example
|
|
784
|
+
# require "google/cloud/ai_platform/v1"
|
|
785
|
+
#
|
|
786
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
787
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
788
|
+
#
|
|
789
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
790
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest.new
|
|
791
|
+
#
|
|
792
|
+
# # Call the get_model_evaluation method.
|
|
793
|
+
# result = client.get_model_evaluation request
|
|
794
|
+
#
|
|
795
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluation.
|
|
796
|
+
# p result
|
|
797
|
+
#
|
|
798
|
+
def get_model_evaluation request, options = nil
|
|
799
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
800
|
+
|
|
801
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelEvaluationRequest
|
|
802
|
+
|
|
803
|
+
# Converts hash and nil to an options object
|
|
804
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
805
|
+
|
|
806
|
+
# Customize the options with defaults
|
|
807
|
+
metadata = @config.rpcs.get_model_evaluation.metadata.to_h
|
|
808
|
+
|
|
809
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
810
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
811
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
812
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
813
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
814
|
+
|
|
815
|
+
header_params = {}
|
|
816
|
+
if request.name
|
|
817
|
+
header_params["name"] = request.name
|
|
818
|
+
end
|
|
819
|
+
|
|
820
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
821
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
822
|
+
|
|
823
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation.timeout,
|
|
824
|
+
metadata: metadata,
|
|
825
|
+
retry_policy: @config.rpcs.get_model_evaluation.retry_policy
|
|
826
|
+
|
|
827
|
+
options.apply_defaults timeout: @config.timeout,
|
|
828
|
+
metadata: @config.metadata,
|
|
829
|
+
retry_policy: @config.retry_policy
|
|
830
|
+
|
|
831
|
+
@model_service_stub.call_rpc :get_model_evaluation, request, options: options do |response, operation|
|
|
832
|
+
yield response, operation if block_given?
|
|
833
|
+
return response
|
|
834
|
+
end
|
|
835
|
+
rescue ::GRPC::BadStatus => e
|
|
836
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
837
|
+
end
|
|
838
|
+
|
|
839
|
+
##
|
|
840
|
+
# Lists ModelEvaluations in a Model.
|
|
841
|
+
#
|
|
842
|
+
# @overload list_model_evaluations(request, options = nil)
|
|
843
|
+
# Pass arguments to `list_model_evaluations` via a request object, either of type
|
|
844
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest} or an equivalent Hash.
|
|
845
|
+
#
|
|
846
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest, ::Hash]
|
|
847
|
+
# A request object representing the call parameters. Required. To specify no
|
|
848
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
849
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
850
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
851
|
+
#
|
|
852
|
+
# @overload list_model_evaluations(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
|
|
853
|
+
# Pass arguments to `list_model_evaluations` via keyword arguments. Note that at
|
|
854
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
855
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
856
|
+
#
|
|
857
|
+
# @param parent [::String]
|
|
858
|
+
# Required. The resource name of the Model to list the ModelEvaluations from.
|
|
859
|
+
# Format: `projects/{project}/locations/{location}/models/{model}`
|
|
860
|
+
# @param filter [::String]
|
|
861
|
+
# The standard list filter.
|
|
862
|
+
# @param page_size [::Integer]
|
|
863
|
+
# The standard list page size.
|
|
864
|
+
# @param page_token [::String]
|
|
865
|
+
# The standard list page token.
|
|
866
|
+
# Typically obtained via
|
|
867
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationsResponse#next_page_token ListModelEvaluationsResponse.next_page_token} of the previous
|
|
868
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_evaluations ModelService.ListModelEvaluations} call.
|
|
869
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
870
|
+
# Mask specifying which fields to read.
|
|
871
|
+
#
|
|
872
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
873
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>]
|
|
874
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
875
|
+
#
|
|
876
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluation>]
|
|
877
|
+
#
|
|
878
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
879
|
+
#
|
|
880
|
+
# @example Basic example
|
|
881
|
+
# require "google/cloud/ai_platform/v1"
|
|
882
|
+
#
|
|
883
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
884
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
885
|
+
#
|
|
886
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
887
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest.new
|
|
888
|
+
#
|
|
889
|
+
# # Call the list_model_evaluations method.
|
|
890
|
+
# result = client.list_model_evaluations request
|
|
891
|
+
#
|
|
892
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
893
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
894
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
895
|
+
# # methods are also available for managing paging directly.
|
|
896
|
+
# result.each do |response|
|
|
897
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluation.
|
|
898
|
+
# p response
|
|
899
|
+
# end
|
|
900
|
+
#
|
|
901
|
+
def list_model_evaluations request, options = nil
|
|
902
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
903
|
+
|
|
904
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelEvaluationsRequest
|
|
905
|
+
|
|
906
|
+
# Converts hash and nil to an options object
|
|
907
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
908
|
+
|
|
909
|
+
# Customize the options with defaults
|
|
910
|
+
metadata = @config.rpcs.list_model_evaluations.metadata.to_h
|
|
911
|
+
|
|
912
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
913
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
914
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
915
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
916
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
917
|
+
|
|
918
|
+
header_params = {}
|
|
919
|
+
if request.parent
|
|
920
|
+
header_params["parent"] = request.parent
|
|
921
|
+
end
|
|
922
|
+
|
|
923
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
924
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
925
|
+
|
|
926
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluations.timeout,
|
|
927
|
+
metadata: metadata,
|
|
928
|
+
retry_policy: @config.rpcs.list_model_evaluations.retry_policy
|
|
929
|
+
|
|
930
|
+
options.apply_defaults timeout: @config.timeout,
|
|
931
|
+
metadata: @config.metadata,
|
|
932
|
+
retry_policy: @config.retry_policy
|
|
933
|
+
|
|
934
|
+
@model_service_stub.call_rpc :list_model_evaluations, request, options: options do |response, operation|
|
|
935
|
+
response = ::Gapic::PagedEnumerable.new @model_service_stub, :list_model_evaluations, request, response, operation, options
|
|
936
|
+
yield response, operation if block_given?
|
|
937
|
+
return response
|
|
938
|
+
end
|
|
939
|
+
rescue ::GRPC::BadStatus => e
|
|
940
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
941
|
+
end
|
|
942
|
+
|
|
943
|
+
##
|
|
944
|
+
# Gets a ModelEvaluationSlice.
|
|
945
|
+
#
|
|
946
|
+
# @overload get_model_evaluation_slice(request, options = nil)
|
|
947
|
+
# Pass arguments to `get_model_evaluation_slice` via a request object, either of type
|
|
948
|
+
# {::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest} or an equivalent Hash.
|
|
949
|
+
#
|
|
950
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest, ::Hash]
|
|
951
|
+
# A request object representing the call parameters. Required. To specify no
|
|
952
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
953
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
954
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
955
|
+
#
|
|
956
|
+
# @overload get_model_evaluation_slice(name: nil)
|
|
957
|
+
# Pass arguments to `get_model_evaluation_slice` via keyword arguments. Note that at
|
|
958
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
959
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
960
|
+
#
|
|
961
|
+
# @param name [::String]
|
|
962
|
+
# Required. The name of the ModelEvaluationSlice resource.
|
|
963
|
+
# Format:
|
|
964
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}/slices/{slice}`
|
|
965
|
+
#
|
|
966
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
967
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice]
|
|
968
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
969
|
+
#
|
|
970
|
+
# @return [::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice]
|
|
971
|
+
#
|
|
972
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
973
|
+
#
|
|
974
|
+
# @example Basic example
|
|
975
|
+
# require "google/cloud/ai_platform/v1"
|
|
976
|
+
#
|
|
977
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
978
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
979
|
+
#
|
|
980
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
981
|
+
# request = Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest.new
|
|
982
|
+
#
|
|
983
|
+
# # Call the get_model_evaluation_slice method.
|
|
984
|
+
# result = client.get_model_evaluation_slice request
|
|
985
|
+
#
|
|
986
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
|
|
987
|
+
# p result
|
|
988
|
+
#
|
|
989
|
+
def get_model_evaluation_slice request, options = nil
|
|
990
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
991
|
+
|
|
992
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetModelEvaluationSliceRequest
|
|
993
|
+
|
|
994
|
+
# Converts hash and nil to an options object
|
|
995
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
996
|
+
|
|
997
|
+
# Customize the options with defaults
|
|
998
|
+
metadata = @config.rpcs.get_model_evaluation_slice.metadata.to_h
|
|
999
|
+
|
|
1000
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1001
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1002
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1003
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1004
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1005
|
+
|
|
1006
|
+
header_params = {}
|
|
1007
|
+
if request.name
|
|
1008
|
+
header_params["name"] = request.name
|
|
1009
|
+
end
|
|
1010
|
+
|
|
1011
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1012
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1013
|
+
|
|
1014
|
+
options.apply_defaults timeout: @config.rpcs.get_model_evaluation_slice.timeout,
|
|
1015
|
+
metadata: metadata,
|
|
1016
|
+
retry_policy: @config.rpcs.get_model_evaluation_slice.retry_policy
|
|
1017
|
+
|
|
1018
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1019
|
+
metadata: @config.metadata,
|
|
1020
|
+
retry_policy: @config.retry_policy
|
|
1021
|
+
|
|
1022
|
+
@model_service_stub.call_rpc :get_model_evaluation_slice, request, options: options do |response, operation|
|
|
1023
|
+
yield response, operation if block_given?
|
|
1024
|
+
return response
|
|
1025
|
+
end
|
|
1026
|
+
rescue ::GRPC::BadStatus => e
|
|
1027
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1028
|
+
end
|
|
1029
|
+
|
|
1030
|
+
##
|
|
1031
|
+
# Lists ModelEvaluationSlices in a ModelEvaluation.
|
|
1032
|
+
#
|
|
1033
|
+
# @overload list_model_evaluation_slices(request, options = nil)
|
|
1034
|
+
# Pass arguments to `list_model_evaluation_slices` via a request object, either of type
|
|
1035
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest} or an equivalent Hash.
|
|
1036
|
+
#
|
|
1037
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest, ::Hash]
|
|
1038
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1039
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1040
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1041
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1042
|
+
#
|
|
1043
|
+
# @overload list_model_evaluation_slices(parent: nil, filter: nil, page_size: nil, page_token: nil, read_mask: nil)
|
|
1044
|
+
# Pass arguments to `list_model_evaluation_slices` via keyword arguments. Note that at
|
|
1045
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1046
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1047
|
+
#
|
|
1048
|
+
# @param parent [::String]
|
|
1049
|
+
# Required. The resource name of the ModelEvaluation to list the ModelEvaluationSlices
|
|
1050
|
+
# from. Format:
|
|
1051
|
+
# `projects/{project}/locations/{location}/models/{model}/evaluations/{evaluation}`
|
|
1052
|
+
# @param filter [::String]
|
|
1053
|
+
# The standard list filter.
|
|
1054
|
+
#
|
|
1055
|
+
# * `slice.dimension` - for =.
|
|
1056
|
+
# @param page_size [::Integer]
|
|
1057
|
+
# The standard list page size.
|
|
1058
|
+
# @param page_token [::String]
|
|
1059
|
+
# The standard list page token.
|
|
1060
|
+
# Typically obtained via
|
|
1061
|
+
# {::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesResponse#next_page_token ListModelEvaluationSlicesResponse.next_page_token} of the previous
|
|
1062
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Client#list_model_evaluation_slices ModelService.ListModelEvaluationSlices} call.
|
|
1063
|
+
# @param read_mask [::Google::Protobuf::FieldMask, ::Hash]
|
|
1064
|
+
# Mask specifying which fields to read.
|
|
1065
|
+
#
|
|
1066
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1067
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>]
|
|
1068
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1069
|
+
#
|
|
1070
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice>]
|
|
1071
|
+
#
|
|
1072
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1073
|
+
#
|
|
1074
|
+
# @example Basic example
|
|
1075
|
+
# require "google/cloud/ai_platform/v1"
|
|
1076
|
+
#
|
|
1077
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1078
|
+
# client = Google::Cloud::AIPlatform::V1::ModelService::Client.new
|
|
1079
|
+
#
|
|
1080
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1081
|
+
# request = Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest.new
|
|
1082
|
+
#
|
|
1083
|
+
# # Call the list_model_evaluation_slices method.
|
|
1084
|
+
# result = client.list_model_evaluation_slices request
|
|
1085
|
+
#
|
|
1086
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
1087
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
1088
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
1089
|
+
# # methods are also available for managing paging directly.
|
|
1090
|
+
# result.each do |response|
|
|
1091
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::ModelEvaluationSlice.
|
|
1092
|
+
# p response
|
|
1093
|
+
# end
|
|
1094
|
+
#
|
|
1095
|
+
def list_model_evaluation_slices request, options = nil
|
|
1096
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1097
|
+
|
|
1098
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListModelEvaluationSlicesRequest
|
|
1099
|
+
|
|
1100
|
+
# Converts hash and nil to an options object
|
|
1101
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1102
|
+
|
|
1103
|
+
# Customize the options with defaults
|
|
1104
|
+
metadata = @config.rpcs.list_model_evaluation_slices.metadata.to_h
|
|
1105
|
+
|
|
1106
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1107
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1108
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1109
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1110
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1111
|
+
|
|
1112
|
+
header_params = {}
|
|
1113
|
+
if request.parent
|
|
1114
|
+
header_params["parent"] = request.parent
|
|
1115
|
+
end
|
|
1116
|
+
|
|
1117
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1118
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1119
|
+
|
|
1120
|
+
options.apply_defaults timeout: @config.rpcs.list_model_evaluation_slices.timeout,
|
|
1121
|
+
metadata: metadata,
|
|
1122
|
+
retry_policy: @config.rpcs.list_model_evaluation_slices.retry_policy
|
|
1123
|
+
|
|
1124
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1125
|
+
metadata: @config.metadata,
|
|
1126
|
+
retry_policy: @config.retry_policy
|
|
1127
|
+
|
|
1128
|
+
@model_service_stub.call_rpc :list_model_evaluation_slices, request, options: options do |response, operation|
|
|
1129
|
+
response = ::Gapic::PagedEnumerable.new @model_service_stub, :list_model_evaluation_slices, request, response, operation, options
|
|
1130
|
+
yield response, operation if block_given?
|
|
1131
|
+
return response
|
|
1132
|
+
end
|
|
1133
|
+
rescue ::GRPC::BadStatus => e
|
|
1134
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1135
|
+
end
|
|
1136
|
+
|
|
1137
|
+
##
|
|
1138
|
+
# Configuration class for the ModelService API.
|
|
1139
|
+
#
|
|
1140
|
+
# This class represents the configuration for ModelService,
|
|
1141
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1142
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1143
|
+
# applied individually to specific RPCs. See
|
|
1144
|
+
# {::Google::Cloud::AIPlatform::V1::ModelService::Client::Configuration::Rpcs}
|
|
1145
|
+
# for a list of RPCs that can be configured independently.
|
|
1146
|
+
#
|
|
1147
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1148
|
+
# on construction.
|
|
1149
|
+
#
|
|
1150
|
+
# @example
|
|
1151
|
+
#
|
|
1152
|
+
# # Modify the global config, setting the timeout for
|
|
1153
|
+
# # upload_model to 20 seconds,
|
|
1154
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1155
|
+
# ::Google::Cloud::AIPlatform::V1::ModelService::Client.configure do |config|
|
|
1156
|
+
# config.timeout = 10.0
|
|
1157
|
+
# config.rpcs.upload_model.timeout = 20.0
|
|
1158
|
+
# end
|
|
1159
|
+
#
|
|
1160
|
+
# # Apply the above configuration only to a new client.
|
|
1161
|
+
# client = ::Google::Cloud::AIPlatform::V1::ModelService::Client.new do |config|
|
|
1162
|
+
# config.timeout = 10.0
|
|
1163
|
+
# config.rpcs.upload_model.timeout = 20.0
|
|
1164
|
+
# end
|
|
1165
|
+
#
|
|
1166
|
+
# @!attribute [rw] endpoint
|
|
1167
|
+
# The hostname or hostname:port of the service endpoint.
|
|
1168
|
+
# Defaults to `"aiplatform.googleapis.com"`.
|
|
1169
|
+
# @return [::String]
|
|
1170
|
+
# @!attribute [rw] credentials
|
|
1171
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1172
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
1173
|
+
# * (`Hash`) A service account key as a Hash
|
|
1174
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1175
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
|
1176
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1177
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
|
1178
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1179
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1180
|
+
# * (`nil`) indicating no credentials
|
|
1181
|
+
# @return [::Object]
|
|
1182
|
+
# @!attribute [rw] scope
|
|
1183
|
+
# The OAuth scopes
|
|
1184
|
+
# @return [::Array<::String>]
|
|
1185
|
+
# @!attribute [rw] lib_name
|
|
1186
|
+
# The library name as recorded in instrumentation and logging
|
|
1187
|
+
# @return [::String]
|
|
1188
|
+
# @!attribute [rw] lib_version
|
|
1189
|
+
# The library version as recorded in instrumentation and logging
|
|
1190
|
+
# @return [::String]
|
|
1191
|
+
# @!attribute [rw] channel_args
|
|
1192
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1193
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1194
|
+
# @return [::Hash]
|
|
1195
|
+
# @!attribute [rw] interceptors
|
|
1196
|
+
# An array of interceptors that are run before calls are executed.
|
|
1197
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1198
|
+
# @!attribute [rw] timeout
|
|
1199
|
+
# The call timeout in seconds.
|
|
1200
|
+
# @return [::Numeric]
|
|
1201
|
+
# @!attribute [rw] metadata
|
|
1202
|
+
# Additional gRPC headers to be sent with the call.
|
|
1203
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1204
|
+
# @!attribute [rw] retry_policy
|
|
1205
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1206
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1207
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1208
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1209
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1210
|
+
# trigger a retry.
|
|
1211
|
+
# @return [::Hash]
|
|
1212
|
+
# @!attribute [rw] quota_project
|
|
1213
|
+
# A separate project against which to charge quota.
|
|
1214
|
+
# @return [::String]
|
|
1215
|
+
#
|
|
1216
|
+
class Configuration
|
|
1217
|
+
extend ::Gapic::Config
|
|
1218
|
+
|
|
1219
|
+
config_attr :endpoint, "aiplatform.googleapis.com", ::String
|
|
1220
|
+
config_attr :credentials, nil do |value|
|
|
1221
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
1222
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
|
1223
|
+
allowed.any? { |klass| klass === value }
|
|
1224
|
+
end
|
|
1225
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1226
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1227
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1228
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1229
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1230
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1231
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1232
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1233
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1234
|
+
|
|
1235
|
+
# @private
|
|
1236
|
+
def initialize parent_config = nil
|
|
1237
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1238
|
+
|
|
1239
|
+
yield self if block_given?
|
|
1240
|
+
end
|
|
1241
|
+
|
|
1242
|
+
##
|
|
1243
|
+
# Configurations for individual RPCs
|
|
1244
|
+
# @return [Rpcs]
|
|
1245
|
+
#
|
|
1246
|
+
def rpcs
|
|
1247
|
+
@rpcs ||= begin
|
|
1248
|
+
parent_rpcs = nil
|
|
1249
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1250
|
+
Rpcs.new parent_rpcs
|
|
1251
|
+
end
|
|
1252
|
+
end
|
|
1253
|
+
|
|
1254
|
+
##
|
|
1255
|
+
# Configuration RPC class for the ModelService API.
|
|
1256
|
+
#
|
|
1257
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1258
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1259
|
+
# the following configuration fields:
|
|
1260
|
+
#
|
|
1261
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1262
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1263
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1264
|
+
# include the following keys:
|
|
1265
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1266
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1267
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1268
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1269
|
+
# trigger a retry.
|
|
1270
|
+
#
|
|
1271
|
+
class Rpcs
|
|
1272
|
+
##
|
|
1273
|
+
# RPC-specific configuration for `upload_model`
|
|
1274
|
+
# @return [::Gapic::Config::Method]
|
|
1275
|
+
#
|
|
1276
|
+
attr_reader :upload_model
|
|
1277
|
+
##
|
|
1278
|
+
# RPC-specific configuration for `get_model`
|
|
1279
|
+
# @return [::Gapic::Config::Method]
|
|
1280
|
+
#
|
|
1281
|
+
attr_reader :get_model
|
|
1282
|
+
##
|
|
1283
|
+
# RPC-specific configuration for `list_models`
|
|
1284
|
+
# @return [::Gapic::Config::Method]
|
|
1285
|
+
#
|
|
1286
|
+
attr_reader :list_models
|
|
1287
|
+
##
|
|
1288
|
+
# RPC-specific configuration for `update_model`
|
|
1289
|
+
# @return [::Gapic::Config::Method]
|
|
1290
|
+
#
|
|
1291
|
+
attr_reader :update_model
|
|
1292
|
+
##
|
|
1293
|
+
# RPC-specific configuration for `delete_model`
|
|
1294
|
+
# @return [::Gapic::Config::Method]
|
|
1295
|
+
#
|
|
1296
|
+
attr_reader :delete_model
|
|
1297
|
+
##
|
|
1298
|
+
# RPC-specific configuration for `export_model`
|
|
1299
|
+
# @return [::Gapic::Config::Method]
|
|
1300
|
+
#
|
|
1301
|
+
attr_reader :export_model
|
|
1302
|
+
##
|
|
1303
|
+
# RPC-specific configuration for `get_model_evaluation`
|
|
1304
|
+
# @return [::Gapic::Config::Method]
|
|
1305
|
+
#
|
|
1306
|
+
attr_reader :get_model_evaluation
|
|
1307
|
+
##
|
|
1308
|
+
# RPC-specific configuration for `list_model_evaluations`
|
|
1309
|
+
# @return [::Gapic::Config::Method]
|
|
1310
|
+
#
|
|
1311
|
+
attr_reader :list_model_evaluations
|
|
1312
|
+
##
|
|
1313
|
+
# RPC-specific configuration for `get_model_evaluation_slice`
|
|
1314
|
+
# @return [::Gapic::Config::Method]
|
|
1315
|
+
#
|
|
1316
|
+
attr_reader :get_model_evaluation_slice
|
|
1317
|
+
##
|
|
1318
|
+
# RPC-specific configuration for `list_model_evaluation_slices`
|
|
1319
|
+
# @return [::Gapic::Config::Method]
|
|
1320
|
+
#
|
|
1321
|
+
attr_reader :list_model_evaluation_slices
|
|
1322
|
+
|
|
1323
|
+
# @private
|
|
1324
|
+
def initialize parent_rpcs = nil
|
|
1325
|
+
upload_model_config = parent_rpcs.upload_model if parent_rpcs.respond_to? :upload_model
|
|
1326
|
+
@upload_model = ::Gapic::Config::Method.new upload_model_config
|
|
1327
|
+
get_model_config = parent_rpcs.get_model if parent_rpcs.respond_to? :get_model
|
|
1328
|
+
@get_model = ::Gapic::Config::Method.new get_model_config
|
|
1329
|
+
list_models_config = parent_rpcs.list_models if parent_rpcs.respond_to? :list_models
|
|
1330
|
+
@list_models = ::Gapic::Config::Method.new list_models_config
|
|
1331
|
+
update_model_config = parent_rpcs.update_model if parent_rpcs.respond_to? :update_model
|
|
1332
|
+
@update_model = ::Gapic::Config::Method.new update_model_config
|
|
1333
|
+
delete_model_config = parent_rpcs.delete_model if parent_rpcs.respond_to? :delete_model
|
|
1334
|
+
@delete_model = ::Gapic::Config::Method.new delete_model_config
|
|
1335
|
+
export_model_config = parent_rpcs.export_model if parent_rpcs.respond_to? :export_model
|
|
1336
|
+
@export_model = ::Gapic::Config::Method.new export_model_config
|
|
1337
|
+
get_model_evaluation_config = parent_rpcs.get_model_evaluation if parent_rpcs.respond_to? :get_model_evaluation
|
|
1338
|
+
@get_model_evaluation = ::Gapic::Config::Method.new get_model_evaluation_config
|
|
1339
|
+
list_model_evaluations_config = parent_rpcs.list_model_evaluations if parent_rpcs.respond_to? :list_model_evaluations
|
|
1340
|
+
@list_model_evaluations = ::Gapic::Config::Method.new list_model_evaluations_config
|
|
1341
|
+
get_model_evaluation_slice_config = parent_rpcs.get_model_evaluation_slice if parent_rpcs.respond_to? :get_model_evaluation_slice
|
|
1342
|
+
@get_model_evaluation_slice = ::Gapic::Config::Method.new get_model_evaluation_slice_config
|
|
1343
|
+
list_model_evaluation_slices_config = parent_rpcs.list_model_evaluation_slices if parent_rpcs.respond_to? :list_model_evaluation_slices
|
|
1344
|
+
@list_model_evaluation_slices = ::Gapic::Config::Method.new list_model_evaluation_slices_config
|
|
1345
|
+
|
|
1346
|
+
yield self if block_given?
|
|
1347
|
+
end
|
|
1348
|
+
end
|
|
1349
|
+
end
|
|
1350
|
+
end
|
|
1351
|
+
end
|
|
1352
|
+
end
|
|
1353
|
+
end
|
|
1354
|
+
end
|
|
1355
|
+
end
|