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,1793 @@
|
|
|
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/vizier_service_pb"
|
|
21
|
+
|
|
22
|
+
module Google
|
|
23
|
+
module Cloud
|
|
24
|
+
module AIPlatform
|
|
25
|
+
module V1
|
|
26
|
+
module VizierService
|
|
27
|
+
##
|
|
28
|
+
# Client for the VizierService service.
|
|
29
|
+
#
|
|
30
|
+
# Vertex AI Vizier API.
|
|
31
|
+
#
|
|
32
|
+
# Vertex AI Vizier is a service to solve blackbox optimization problems,
|
|
33
|
+
# such as tuning machine learning hyperparameters and searching over deep
|
|
34
|
+
# learning architectures.
|
|
35
|
+
#
|
|
36
|
+
class Client
|
|
37
|
+
include Paths
|
|
38
|
+
|
|
39
|
+
# @private
|
|
40
|
+
attr_reader :vizier_service_stub
|
|
41
|
+
|
|
42
|
+
##
|
|
43
|
+
# Configure the VizierService Client class.
|
|
44
|
+
#
|
|
45
|
+
# See {::Google::Cloud::AIPlatform::V1::VizierService::Client::Configuration}
|
|
46
|
+
# for a description of the configuration fields.
|
|
47
|
+
#
|
|
48
|
+
# @example
|
|
49
|
+
#
|
|
50
|
+
# # Modify the configuration for all VizierService clients
|
|
51
|
+
# ::Google::Cloud::AIPlatform::V1::VizierService::Client.configure do |config|
|
|
52
|
+
# config.timeout = 10.0
|
|
53
|
+
# end
|
|
54
|
+
#
|
|
55
|
+
# @yield [config] Configure the Client client.
|
|
56
|
+
# @yieldparam config [Client::Configuration]
|
|
57
|
+
#
|
|
58
|
+
# @return [Client::Configuration]
|
|
59
|
+
#
|
|
60
|
+
def self.configure
|
|
61
|
+
@configure ||= begin
|
|
62
|
+
namespace = ["Google", "Cloud", "AIPlatform", "V1"]
|
|
63
|
+
parent_config = while namespace.any?
|
|
64
|
+
parent_name = namespace.join "::"
|
|
65
|
+
parent_const = const_get parent_name
|
|
66
|
+
break parent_const.configure if parent_const.respond_to? :configure
|
|
67
|
+
namespace.pop
|
|
68
|
+
end
|
|
69
|
+
default_config = Client::Configuration.new parent_config
|
|
70
|
+
|
|
71
|
+
default_config
|
|
72
|
+
end
|
|
73
|
+
yield @configure if block_given?
|
|
74
|
+
@configure
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
##
|
|
78
|
+
# Configure the VizierService Client instance.
|
|
79
|
+
#
|
|
80
|
+
# The configuration is set to the derived mode, meaning that values can be changed,
|
|
81
|
+
# but structural changes (adding new fields, etc.) are not allowed. Structural changes
|
|
82
|
+
# should be made on {Client.configure}.
|
|
83
|
+
#
|
|
84
|
+
# See {::Google::Cloud::AIPlatform::V1::VizierService::Client::Configuration}
|
|
85
|
+
# for a description of the configuration fields.
|
|
86
|
+
#
|
|
87
|
+
# @yield [config] Configure the Client client.
|
|
88
|
+
# @yieldparam config [Client::Configuration]
|
|
89
|
+
#
|
|
90
|
+
# @return [Client::Configuration]
|
|
91
|
+
#
|
|
92
|
+
def configure
|
|
93
|
+
yield @config if block_given?
|
|
94
|
+
@config
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
##
|
|
98
|
+
# Create a new VizierService client object.
|
|
99
|
+
#
|
|
100
|
+
# @example
|
|
101
|
+
#
|
|
102
|
+
# # Create a client using the default configuration
|
|
103
|
+
# client = ::Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
104
|
+
#
|
|
105
|
+
# # Create a client using a custom configuration
|
|
106
|
+
# client = ::Google::Cloud::AIPlatform::V1::VizierService::Client.new do |config|
|
|
107
|
+
# config.timeout = 10.0
|
|
108
|
+
# end
|
|
109
|
+
#
|
|
110
|
+
# @yield [config] Configure the VizierService client.
|
|
111
|
+
# @yieldparam config [Client::Configuration]
|
|
112
|
+
#
|
|
113
|
+
def initialize
|
|
114
|
+
# These require statements are intentionally placed here to initialize
|
|
115
|
+
# the gRPC module only when it's required.
|
|
116
|
+
# See https://github.com/googleapis/toolkit/issues/446
|
|
117
|
+
require "gapic/grpc"
|
|
118
|
+
require "google/cloud/aiplatform/v1/vizier_service_services_pb"
|
|
119
|
+
|
|
120
|
+
# Create the configuration object
|
|
121
|
+
@config = Configuration.new Client.configure
|
|
122
|
+
|
|
123
|
+
# Yield the configuration if needed
|
|
124
|
+
yield @config if block_given?
|
|
125
|
+
|
|
126
|
+
# Create credentials
|
|
127
|
+
credentials = @config.credentials
|
|
128
|
+
# Use self-signed JWT if the endpoint is unchanged from default,
|
|
129
|
+
# but only if the default endpoint does not have a region prefix.
|
|
130
|
+
enable_self_signed_jwt = @config.endpoint == Client.configure.endpoint &&
|
|
131
|
+
!@config.endpoint.split(".").first.include?("-")
|
|
132
|
+
credentials ||= Credentials.default scope: @config.scope,
|
|
133
|
+
enable_self_signed_jwt: enable_self_signed_jwt
|
|
134
|
+
if credentials.is_a?(::String) || credentials.is_a?(::Hash)
|
|
135
|
+
credentials = Credentials.new credentials, scope: @config.scope
|
|
136
|
+
end
|
|
137
|
+
@quota_project_id = @config.quota_project
|
|
138
|
+
@quota_project_id ||= credentials.quota_project_id if credentials.respond_to? :quota_project_id
|
|
139
|
+
|
|
140
|
+
@operations_client = Operations.new do |config|
|
|
141
|
+
config.credentials = credentials
|
|
142
|
+
config.quota_project = @quota_project_id
|
|
143
|
+
config.endpoint = @config.endpoint
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
@vizier_service_stub = ::Gapic::ServiceStub.new(
|
|
147
|
+
::Google::Cloud::AIPlatform::V1::VizierService::Stub,
|
|
148
|
+
credentials: credentials,
|
|
149
|
+
endpoint: @config.endpoint,
|
|
150
|
+
channel_args: @config.channel_args,
|
|
151
|
+
interceptors: @config.interceptors
|
|
152
|
+
)
|
|
153
|
+
end
|
|
154
|
+
|
|
155
|
+
##
|
|
156
|
+
# Get the associated client for long-running operations.
|
|
157
|
+
#
|
|
158
|
+
# @return [::Google::Cloud::AIPlatform::V1::VizierService::Operations]
|
|
159
|
+
#
|
|
160
|
+
attr_reader :operations_client
|
|
161
|
+
|
|
162
|
+
# Service calls
|
|
163
|
+
|
|
164
|
+
##
|
|
165
|
+
# Creates a Study. A resource name will be generated after creation of the
|
|
166
|
+
# Study.
|
|
167
|
+
#
|
|
168
|
+
# @overload create_study(request, options = nil)
|
|
169
|
+
# Pass arguments to `create_study` via a request object, either of type
|
|
170
|
+
# {::Google::Cloud::AIPlatform::V1::CreateStudyRequest} or an equivalent Hash.
|
|
171
|
+
#
|
|
172
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CreateStudyRequest, ::Hash]
|
|
173
|
+
# A request object representing the call parameters. Required. To specify no
|
|
174
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
175
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
176
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
177
|
+
#
|
|
178
|
+
# @overload create_study(parent: nil, study: nil)
|
|
179
|
+
# Pass arguments to `create_study` via keyword arguments. Note that at
|
|
180
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
181
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
182
|
+
#
|
|
183
|
+
# @param parent [::String]
|
|
184
|
+
# Required. The resource name of the Location to create the CustomJob in.
|
|
185
|
+
# Format: `projects/{project}/locations/{location}`
|
|
186
|
+
# @param study [::Google::Cloud::AIPlatform::V1::Study, ::Hash]
|
|
187
|
+
# Required. The Study configuration used to create the Study.
|
|
188
|
+
#
|
|
189
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
190
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Study]
|
|
191
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
192
|
+
#
|
|
193
|
+
# @return [::Google::Cloud::AIPlatform::V1::Study]
|
|
194
|
+
#
|
|
195
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
196
|
+
#
|
|
197
|
+
# @example Basic example
|
|
198
|
+
# require "google/cloud/ai_platform/v1"
|
|
199
|
+
#
|
|
200
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
201
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
202
|
+
#
|
|
203
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
204
|
+
# request = Google::Cloud::AIPlatform::V1::CreateStudyRequest.new
|
|
205
|
+
#
|
|
206
|
+
# # Call the create_study method.
|
|
207
|
+
# result = client.create_study request
|
|
208
|
+
#
|
|
209
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Study.
|
|
210
|
+
# p result
|
|
211
|
+
#
|
|
212
|
+
def create_study request, options = nil
|
|
213
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
214
|
+
|
|
215
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateStudyRequest
|
|
216
|
+
|
|
217
|
+
# Converts hash and nil to an options object
|
|
218
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
219
|
+
|
|
220
|
+
# Customize the options with defaults
|
|
221
|
+
metadata = @config.rpcs.create_study.metadata.to_h
|
|
222
|
+
|
|
223
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
224
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
225
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
226
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
227
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
228
|
+
|
|
229
|
+
header_params = {}
|
|
230
|
+
if request.parent
|
|
231
|
+
header_params["parent"] = request.parent
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
235
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
236
|
+
|
|
237
|
+
options.apply_defaults timeout: @config.rpcs.create_study.timeout,
|
|
238
|
+
metadata: metadata,
|
|
239
|
+
retry_policy: @config.rpcs.create_study.retry_policy
|
|
240
|
+
|
|
241
|
+
options.apply_defaults timeout: @config.timeout,
|
|
242
|
+
metadata: @config.metadata,
|
|
243
|
+
retry_policy: @config.retry_policy
|
|
244
|
+
|
|
245
|
+
@vizier_service_stub.call_rpc :create_study, request, options: options do |response, operation|
|
|
246
|
+
yield response, operation if block_given?
|
|
247
|
+
return response
|
|
248
|
+
end
|
|
249
|
+
rescue ::GRPC::BadStatus => e
|
|
250
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
##
|
|
254
|
+
# Gets a Study by name.
|
|
255
|
+
#
|
|
256
|
+
# @overload get_study(request, options = nil)
|
|
257
|
+
# Pass arguments to `get_study` via a request object, either of type
|
|
258
|
+
# {::Google::Cloud::AIPlatform::V1::GetStudyRequest} or an equivalent Hash.
|
|
259
|
+
#
|
|
260
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetStudyRequest, ::Hash]
|
|
261
|
+
# A request object representing the call parameters. Required. To specify no
|
|
262
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
263
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
264
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
265
|
+
#
|
|
266
|
+
# @overload get_study(name: nil)
|
|
267
|
+
# Pass arguments to `get_study` via keyword arguments. Note that at
|
|
268
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
269
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
270
|
+
#
|
|
271
|
+
# @param name [::String]
|
|
272
|
+
# Required. The name of the Study resource.
|
|
273
|
+
# Format: `projects/{project}/locations/{location}/studies/{study}`
|
|
274
|
+
#
|
|
275
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
276
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Study]
|
|
277
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
278
|
+
#
|
|
279
|
+
# @return [::Google::Cloud::AIPlatform::V1::Study]
|
|
280
|
+
#
|
|
281
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
282
|
+
#
|
|
283
|
+
# @example Basic example
|
|
284
|
+
# require "google/cloud/ai_platform/v1"
|
|
285
|
+
#
|
|
286
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
287
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
288
|
+
#
|
|
289
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
290
|
+
# request = Google::Cloud::AIPlatform::V1::GetStudyRequest.new
|
|
291
|
+
#
|
|
292
|
+
# # Call the get_study method.
|
|
293
|
+
# result = client.get_study request
|
|
294
|
+
#
|
|
295
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Study.
|
|
296
|
+
# p result
|
|
297
|
+
#
|
|
298
|
+
def get_study request, options = nil
|
|
299
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
300
|
+
|
|
301
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetStudyRequest
|
|
302
|
+
|
|
303
|
+
# Converts hash and nil to an options object
|
|
304
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
305
|
+
|
|
306
|
+
# Customize the options with defaults
|
|
307
|
+
metadata = @config.rpcs.get_study.metadata.to_h
|
|
308
|
+
|
|
309
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
310
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
311
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
312
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
313
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
314
|
+
|
|
315
|
+
header_params = {}
|
|
316
|
+
if request.name
|
|
317
|
+
header_params["name"] = request.name
|
|
318
|
+
end
|
|
319
|
+
|
|
320
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
321
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
322
|
+
|
|
323
|
+
options.apply_defaults timeout: @config.rpcs.get_study.timeout,
|
|
324
|
+
metadata: metadata,
|
|
325
|
+
retry_policy: @config.rpcs.get_study.retry_policy
|
|
326
|
+
|
|
327
|
+
options.apply_defaults timeout: @config.timeout,
|
|
328
|
+
metadata: @config.metadata,
|
|
329
|
+
retry_policy: @config.retry_policy
|
|
330
|
+
|
|
331
|
+
@vizier_service_stub.call_rpc :get_study, request, options: options do |response, operation|
|
|
332
|
+
yield response, operation if block_given?
|
|
333
|
+
return response
|
|
334
|
+
end
|
|
335
|
+
rescue ::GRPC::BadStatus => e
|
|
336
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
337
|
+
end
|
|
338
|
+
|
|
339
|
+
##
|
|
340
|
+
# Lists all the studies in a region for an associated project.
|
|
341
|
+
#
|
|
342
|
+
# @overload list_studies(request, options = nil)
|
|
343
|
+
# Pass arguments to `list_studies` via a request object, either of type
|
|
344
|
+
# {::Google::Cloud::AIPlatform::V1::ListStudiesRequest} or an equivalent Hash.
|
|
345
|
+
#
|
|
346
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListStudiesRequest, ::Hash]
|
|
347
|
+
# A request object representing the call parameters. Required. To specify no
|
|
348
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
349
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
350
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
351
|
+
#
|
|
352
|
+
# @overload list_studies(parent: nil, page_token: nil, page_size: nil)
|
|
353
|
+
# Pass arguments to `list_studies` via keyword arguments. Note that at
|
|
354
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
355
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
356
|
+
#
|
|
357
|
+
# @param parent [::String]
|
|
358
|
+
# Required. The resource name of the Location to list the Study from.
|
|
359
|
+
# Format: `projects/{project}/locations/{location}`
|
|
360
|
+
# @param page_token [::String]
|
|
361
|
+
# Optional. A page token to request the next page of results.
|
|
362
|
+
# If unspecified, there are no subsequent pages.
|
|
363
|
+
# @param page_size [::Integer]
|
|
364
|
+
# Optional. The maximum number of studies to return per "page" of results.
|
|
365
|
+
# If unspecified, service will pick an appropriate default.
|
|
366
|
+
#
|
|
367
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
368
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>]
|
|
369
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
370
|
+
#
|
|
371
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Study>]
|
|
372
|
+
#
|
|
373
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
374
|
+
#
|
|
375
|
+
# @example Basic example
|
|
376
|
+
# require "google/cloud/ai_platform/v1"
|
|
377
|
+
#
|
|
378
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
379
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
380
|
+
#
|
|
381
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
382
|
+
# request = Google::Cloud::AIPlatform::V1::ListStudiesRequest.new
|
|
383
|
+
#
|
|
384
|
+
# # Call the list_studies method.
|
|
385
|
+
# result = client.list_studies request
|
|
386
|
+
#
|
|
387
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
388
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
389
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
390
|
+
# # methods are also available for managing paging directly.
|
|
391
|
+
# result.each do |response|
|
|
392
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::Study.
|
|
393
|
+
# p response
|
|
394
|
+
# end
|
|
395
|
+
#
|
|
396
|
+
def list_studies request, options = nil
|
|
397
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
398
|
+
|
|
399
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListStudiesRequest
|
|
400
|
+
|
|
401
|
+
# Converts hash and nil to an options object
|
|
402
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
403
|
+
|
|
404
|
+
# Customize the options with defaults
|
|
405
|
+
metadata = @config.rpcs.list_studies.metadata.to_h
|
|
406
|
+
|
|
407
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
408
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
409
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
410
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
411
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
412
|
+
|
|
413
|
+
header_params = {}
|
|
414
|
+
if request.parent
|
|
415
|
+
header_params["parent"] = request.parent
|
|
416
|
+
end
|
|
417
|
+
|
|
418
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
419
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
420
|
+
|
|
421
|
+
options.apply_defaults timeout: @config.rpcs.list_studies.timeout,
|
|
422
|
+
metadata: metadata,
|
|
423
|
+
retry_policy: @config.rpcs.list_studies.retry_policy
|
|
424
|
+
|
|
425
|
+
options.apply_defaults timeout: @config.timeout,
|
|
426
|
+
metadata: @config.metadata,
|
|
427
|
+
retry_policy: @config.retry_policy
|
|
428
|
+
|
|
429
|
+
@vizier_service_stub.call_rpc :list_studies, request, options: options do |response, operation|
|
|
430
|
+
response = ::Gapic::PagedEnumerable.new @vizier_service_stub, :list_studies, request, response, operation, options
|
|
431
|
+
yield response, operation if block_given?
|
|
432
|
+
return response
|
|
433
|
+
end
|
|
434
|
+
rescue ::GRPC::BadStatus => e
|
|
435
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
436
|
+
end
|
|
437
|
+
|
|
438
|
+
##
|
|
439
|
+
# Deletes a Study.
|
|
440
|
+
#
|
|
441
|
+
# @overload delete_study(request, options = nil)
|
|
442
|
+
# Pass arguments to `delete_study` via a request object, either of type
|
|
443
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteStudyRequest} or an equivalent Hash.
|
|
444
|
+
#
|
|
445
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteStudyRequest, ::Hash]
|
|
446
|
+
# A request object representing the call parameters. Required. To specify no
|
|
447
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
448
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
449
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
450
|
+
#
|
|
451
|
+
# @overload delete_study(name: nil)
|
|
452
|
+
# Pass arguments to `delete_study` via keyword arguments. Note that at
|
|
453
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
454
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
455
|
+
#
|
|
456
|
+
# @param name [::String]
|
|
457
|
+
# Required. The name of the Study resource to be deleted.
|
|
458
|
+
# Format: `projects/{project}/locations/{location}/studies/{study}`
|
|
459
|
+
#
|
|
460
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
461
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
|
462
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
463
|
+
#
|
|
464
|
+
# @return [::Google::Protobuf::Empty]
|
|
465
|
+
#
|
|
466
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
467
|
+
#
|
|
468
|
+
# @example Basic example
|
|
469
|
+
# require "google/cloud/ai_platform/v1"
|
|
470
|
+
#
|
|
471
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
472
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
473
|
+
#
|
|
474
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
475
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteStudyRequest.new
|
|
476
|
+
#
|
|
477
|
+
# # Call the delete_study method.
|
|
478
|
+
# result = client.delete_study request
|
|
479
|
+
#
|
|
480
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
481
|
+
# p result
|
|
482
|
+
#
|
|
483
|
+
def delete_study request, options = nil
|
|
484
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
485
|
+
|
|
486
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteStudyRequest
|
|
487
|
+
|
|
488
|
+
# Converts hash and nil to an options object
|
|
489
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
490
|
+
|
|
491
|
+
# Customize the options with defaults
|
|
492
|
+
metadata = @config.rpcs.delete_study.metadata.to_h
|
|
493
|
+
|
|
494
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
495
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
496
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
497
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
498
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
499
|
+
|
|
500
|
+
header_params = {}
|
|
501
|
+
if request.name
|
|
502
|
+
header_params["name"] = request.name
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
506
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
507
|
+
|
|
508
|
+
options.apply_defaults timeout: @config.rpcs.delete_study.timeout,
|
|
509
|
+
metadata: metadata,
|
|
510
|
+
retry_policy: @config.rpcs.delete_study.retry_policy
|
|
511
|
+
|
|
512
|
+
options.apply_defaults timeout: @config.timeout,
|
|
513
|
+
metadata: @config.metadata,
|
|
514
|
+
retry_policy: @config.retry_policy
|
|
515
|
+
|
|
516
|
+
@vizier_service_stub.call_rpc :delete_study, request, options: options do |response, operation|
|
|
517
|
+
yield response, operation if block_given?
|
|
518
|
+
return response
|
|
519
|
+
end
|
|
520
|
+
rescue ::GRPC::BadStatus => e
|
|
521
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
522
|
+
end
|
|
523
|
+
|
|
524
|
+
##
|
|
525
|
+
# Looks a study up using the user-defined display_name field instead of the
|
|
526
|
+
# fully qualified resource name.
|
|
527
|
+
#
|
|
528
|
+
# @overload lookup_study(request, options = nil)
|
|
529
|
+
# Pass arguments to `lookup_study` via a request object, either of type
|
|
530
|
+
# {::Google::Cloud::AIPlatform::V1::LookupStudyRequest} or an equivalent Hash.
|
|
531
|
+
#
|
|
532
|
+
# @param request [::Google::Cloud::AIPlatform::V1::LookupStudyRequest, ::Hash]
|
|
533
|
+
# A request object representing the call parameters. Required. To specify no
|
|
534
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
535
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
536
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
537
|
+
#
|
|
538
|
+
# @overload lookup_study(parent: nil, display_name: nil)
|
|
539
|
+
# Pass arguments to `lookup_study` via keyword arguments. Note that at
|
|
540
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
541
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
542
|
+
#
|
|
543
|
+
# @param parent [::String]
|
|
544
|
+
# Required. The resource name of the Location to get the Study from.
|
|
545
|
+
# Format: `projects/{project}/locations/{location}`
|
|
546
|
+
# @param display_name [::String]
|
|
547
|
+
# Required. The user-defined display name of the Study
|
|
548
|
+
#
|
|
549
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
550
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Study]
|
|
551
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
552
|
+
#
|
|
553
|
+
# @return [::Google::Cloud::AIPlatform::V1::Study]
|
|
554
|
+
#
|
|
555
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
556
|
+
#
|
|
557
|
+
# @example Basic example
|
|
558
|
+
# require "google/cloud/ai_platform/v1"
|
|
559
|
+
#
|
|
560
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
561
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
562
|
+
#
|
|
563
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
564
|
+
# request = Google::Cloud::AIPlatform::V1::LookupStudyRequest.new
|
|
565
|
+
#
|
|
566
|
+
# # Call the lookup_study method.
|
|
567
|
+
# result = client.lookup_study request
|
|
568
|
+
#
|
|
569
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Study.
|
|
570
|
+
# p result
|
|
571
|
+
#
|
|
572
|
+
def lookup_study request, options = nil
|
|
573
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
574
|
+
|
|
575
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::LookupStudyRequest
|
|
576
|
+
|
|
577
|
+
# Converts hash and nil to an options object
|
|
578
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
579
|
+
|
|
580
|
+
# Customize the options with defaults
|
|
581
|
+
metadata = @config.rpcs.lookup_study.metadata.to_h
|
|
582
|
+
|
|
583
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
584
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
585
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
586
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
587
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
588
|
+
|
|
589
|
+
header_params = {}
|
|
590
|
+
if request.parent
|
|
591
|
+
header_params["parent"] = request.parent
|
|
592
|
+
end
|
|
593
|
+
|
|
594
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
595
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
596
|
+
|
|
597
|
+
options.apply_defaults timeout: @config.rpcs.lookup_study.timeout,
|
|
598
|
+
metadata: metadata,
|
|
599
|
+
retry_policy: @config.rpcs.lookup_study.retry_policy
|
|
600
|
+
|
|
601
|
+
options.apply_defaults timeout: @config.timeout,
|
|
602
|
+
metadata: @config.metadata,
|
|
603
|
+
retry_policy: @config.retry_policy
|
|
604
|
+
|
|
605
|
+
@vizier_service_stub.call_rpc :lookup_study, request, options: options do |response, operation|
|
|
606
|
+
yield response, operation if block_given?
|
|
607
|
+
return response
|
|
608
|
+
end
|
|
609
|
+
rescue ::GRPC::BadStatus => e
|
|
610
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
611
|
+
end
|
|
612
|
+
|
|
613
|
+
##
|
|
614
|
+
# Adds one or more Trials to a Study, with parameter values
|
|
615
|
+
# suggested by Vertex AI Vizier. Returns a long-running
|
|
616
|
+
# operation associated with the generation of Trial suggestions.
|
|
617
|
+
# When this long-running operation succeeds, it will contain
|
|
618
|
+
# a [SuggestTrialsResponse][google.cloud.ml.v1.SuggestTrialsResponse].
|
|
619
|
+
#
|
|
620
|
+
# @overload suggest_trials(request, options = nil)
|
|
621
|
+
# Pass arguments to `suggest_trials` via a request object, either of type
|
|
622
|
+
# {::Google::Cloud::AIPlatform::V1::SuggestTrialsRequest} or an equivalent Hash.
|
|
623
|
+
#
|
|
624
|
+
# @param request [::Google::Cloud::AIPlatform::V1::SuggestTrialsRequest, ::Hash]
|
|
625
|
+
# A request object representing the call parameters. Required. To specify no
|
|
626
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
627
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
628
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
629
|
+
#
|
|
630
|
+
# @overload suggest_trials(parent: nil, suggestion_count: nil, client_id: nil)
|
|
631
|
+
# Pass arguments to `suggest_trials` via keyword arguments. Note that at
|
|
632
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
633
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
634
|
+
#
|
|
635
|
+
# @param parent [::String]
|
|
636
|
+
# Required. The project and location that the Study belongs to.
|
|
637
|
+
# Format: `projects/{project}/locations/{location}/studies/{study}`
|
|
638
|
+
# @param suggestion_count [::Integer]
|
|
639
|
+
# Required. The number of suggestions requested.
|
|
640
|
+
# @param client_id [::String]
|
|
641
|
+
# Required. The identifier of the client that is requesting the suggestion.
|
|
642
|
+
#
|
|
643
|
+
# If multiple SuggestTrialsRequests have the same `client_id`,
|
|
644
|
+
# the service will return the identical suggested Trial if the Trial is
|
|
645
|
+
# pending, and provide a new Trial if the last suggested Trial was completed.
|
|
646
|
+
#
|
|
647
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
648
|
+
# @yieldparam response [::Gapic::Operation]
|
|
649
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
650
|
+
#
|
|
651
|
+
# @return [::Gapic::Operation]
|
|
652
|
+
#
|
|
653
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
654
|
+
#
|
|
655
|
+
# @example Basic example
|
|
656
|
+
# require "google/cloud/ai_platform/v1"
|
|
657
|
+
#
|
|
658
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
659
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
660
|
+
#
|
|
661
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
662
|
+
# request = Google::Cloud::AIPlatform::V1::SuggestTrialsRequest.new
|
|
663
|
+
#
|
|
664
|
+
# # Call the suggest_trials method.
|
|
665
|
+
# result = client.suggest_trials request
|
|
666
|
+
#
|
|
667
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
668
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
669
|
+
# # for results. Here is how to block until completion:
|
|
670
|
+
# result.wait_until_done! timeout: 60
|
|
671
|
+
# if result.response?
|
|
672
|
+
# p result.response
|
|
673
|
+
# else
|
|
674
|
+
# puts "Error!"
|
|
675
|
+
# end
|
|
676
|
+
#
|
|
677
|
+
def suggest_trials request, options = nil
|
|
678
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
679
|
+
|
|
680
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::SuggestTrialsRequest
|
|
681
|
+
|
|
682
|
+
# Converts hash and nil to an options object
|
|
683
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
684
|
+
|
|
685
|
+
# Customize the options with defaults
|
|
686
|
+
metadata = @config.rpcs.suggest_trials.metadata.to_h
|
|
687
|
+
|
|
688
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
689
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
690
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
691
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
692
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
693
|
+
|
|
694
|
+
header_params = {}
|
|
695
|
+
if request.parent
|
|
696
|
+
header_params["parent"] = request.parent
|
|
697
|
+
end
|
|
698
|
+
|
|
699
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
700
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
701
|
+
|
|
702
|
+
options.apply_defaults timeout: @config.rpcs.suggest_trials.timeout,
|
|
703
|
+
metadata: metadata,
|
|
704
|
+
retry_policy: @config.rpcs.suggest_trials.retry_policy
|
|
705
|
+
|
|
706
|
+
options.apply_defaults timeout: @config.timeout,
|
|
707
|
+
metadata: @config.metadata,
|
|
708
|
+
retry_policy: @config.retry_policy
|
|
709
|
+
|
|
710
|
+
@vizier_service_stub.call_rpc :suggest_trials, request, options: options do |response, operation|
|
|
711
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
712
|
+
yield response, operation if block_given?
|
|
713
|
+
return response
|
|
714
|
+
end
|
|
715
|
+
rescue ::GRPC::BadStatus => e
|
|
716
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
717
|
+
end
|
|
718
|
+
|
|
719
|
+
##
|
|
720
|
+
# Adds a user provided Trial to a Study.
|
|
721
|
+
#
|
|
722
|
+
# @overload create_trial(request, options = nil)
|
|
723
|
+
# Pass arguments to `create_trial` via a request object, either of type
|
|
724
|
+
# {::Google::Cloud::AIPlatform::V1::CreateTrialRequest} or an equivalent Hash.
|
|
725
|
+
#
|
|
726
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CreateTrialRequest, ::Hash]
|
|
727
|
+
# A request object representing the call parameters. Required. To specify no
|
|
728
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
729
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
730
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
731
|
+
#
|
|
732
|
+
# @overload create_trial(parent: nil, trial: nil)
|
|
733
|
+
# Pass arguments to `create_trial` via keyword arguments. Note that at
|
|
734
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
735
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
736
|
+
#
|
|
737
|
+
# @param parent [::String]
|
|
738
|
+
# Required. The resource name of the Study to create the Trial in.
|
|
739
|
+
# Format: `projects/{project}/locations/{location}/studies/{study}`
|
|
740
|
+
# @param trial [::Google::Cloud::AIPlatform::V1::Trial, ::Hash]
|
|
741
|
+
# Required. The Trial to create.
|
|
742
|
+
#
|
|
743
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
744
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Trial]
|
|
745
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
746
|
+
#
|
|
747
|
+
# @return [::Google::Cloud::AIPlatform::V1::Trial]
|
|
748
|
+
#
|
|
749
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
750
|
+
#
|
|
751
|
+
# @example Basic example
|
|
752
|
+
# require "google/cloud/ai_platform/v1"
|
|
753
|
+
#
|
|
754
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
755
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
756
|
+
#
|
|
757
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
758
|
+
# request = Google::Cloud::AIPlatform::V1::CreateTrialRequest.new
|
|
759
|
+
#
|
|
760
|
+
# # Call the create_trial method.
|
|
761
|
+
# result = client.create_trial request
|
|
762
|
+
#
|
|
763
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
|
|
764
|
+
# p result
|
|
765
|
+
#
|
|
766
|
+
def create_trial request, options = nil
|
|
767
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
768
|
+
|
|
769
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CreateTrialRequest
|
|
770
|
+
|
|
771
|
+
# Converts hash and nil to an options object
|
|
772
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
773
|
+
|
|
774
|
+
# Customize the options with defaults
|
|
775
|
+
metadata = @config.rpcs.create_trial.metadata.to_h
|
|
776
|
+
|
|
777
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
778
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
779
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
780
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
781
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
782
|
+
|
|
783
|
+
header_params = {}
|
|
784
|
+
if request.parent
|
|
785
|
+
header_params["parent"] = request.parent
|
|
786
|
+
end
|
|
787
|
+
|
|
788
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
789
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
790
|
+
|
|
791
|
+
options.apply_defaults timeout: @config.rpcs.create_trial.timeout,
|
|
792
|
+
metadata: metadata,
|
|
793
|
+
retry_policy: @config.rpcs.create_trial.retry_policy
|
|
794
|
+
|
|
795
|
+
options.apply_defaults timeout: @config.timeout,
|
|
796
|
+
metadata: @config.metadata,
|
|
797
|
+
retry_policy: @config.retry_policy
|
|
798
|
+
|
|
799
|
+
@vizier_service_stub.call_rpc :create_trial, request, options: options do |response, operation|
|
|
800
|
+
yield response, operation if block_given?
|
|
801
|
+
return response
|
|
802
|
+
end
|
|
803
|
+
rescue ::GRPC::BadStatus => e
|
|
804
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
805
|
+
end
|
|
806
|
+
|
|
807
|
+
##
|
|
808
|
+
# Gets a Trial.
|
|
809
|
+
#
|
|
810
|
+
# @overload get_trial(request, options = nil)
|
|
811
|
+
# Pass arguments to `get_trial` via a request object, either of type
|
|
812
|
+
# {::Google::Cloud::AIPlatform::V1::GetTrialRequest} or an equivalent Hash.
|
|
813
|
+
#
|
|
814
|
+
# @param request [::Google::Cloud::AIPlatform::V1::GetTrialRequest, ::Hash]
|
|
815
|
+
# A request object representing the call parameters. Required. To specify no
|
|
816
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
817
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
818
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
819
|
+
#
|
|
820
|
+
# @overload get_trial(name: nil)
|
|
821
|
+
# Pass arguments to `get_trial` via keyword arguments. Note that at
|
|
822
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
823
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
824
|
+
#
|
|
825
|
+
# @param name [::String]
|
|
826
|
+
# Required. The name of the Trial resource.
|
|
827
|
+
# Format:
|
|
828
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
829
|
+
#
|
|
830
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
831
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Trial]
|
|
832
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
833
|
+
#
|
|
834
|
+
# @return [::Google::Cloud::AIPlatform::V1::Trial]
|
|
835
|
+
#
|
|
836
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
837
|
+
#
|
|
838
|
+
# @example Basic example
|
|
839
|
+
# require "google/cloud/ai_platform/v1"
|
|
840
|
+
#
|
|
841
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
842
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
843
|
+
#
|
|
844
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
845
|
+
# request = Google::Cloud::AIPlatform::V1::GetTrialRequest.new
|
|
846
|
+
#
|
|
847
|
+
# # Call the get_trial method.
|
|
848
|
+
# result = client.get_trial request
|
|
849
|
+
#
|
|
850
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
|
|
851
|
+
# p result
|
|
852
|
+
#
|
|
853
|
+
def get_trial request, options = nil
|
|
854
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
855
|
+
|
|
856
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::GetTrialRequest
|
|
857
|
+
|
|
858
|
+
# Converts hash and nil to an options object
|
|
859
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
860
|
+
|
|
861
|
+
# Customize the options with defaults
|
|
862
|
+
metadata = @config.rpcs.get_trial.metadata.to_h
|
|
863
|
+
|
|
864
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
865
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
866
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
867
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
868
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
869
|
+
|
|
870
|
+
header_params = {}
|
|
871
|
+
if request.name
|
|
872
|
+
header_params["name"] = request.name
|
|
873
|
+
end
|
|
874
|
+
|
|
875
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
876
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
877
|
+
|
|
878
|
+
options.apply_defaults timeout: @config.rpcs.get_trial.timeout,
|
|
879
|
+
metadata: metadata,
|
|
880
|
+
retry_policy: @config.rpcs.get_trial.retry_policy
|
|
881
|
+
|
|
882
|
+
options.apply_defaults timeout: @config.timeout,
|
|
883
|
+
metadata: @config.metadata,
|
|
884
|
+
retry_policy: @config.retry_policy
|
|
885
|
+
|
|
886
|
+
@vizier_service_stub.call_rpc :get_trial, request, options: options do |response, operation|
|
|
887
|
+
yield response, operation if block_given?
|
|
888
|
+
return response
|
|
889
|
+
end
|
|
890
|
+
rescue ::GRPC::BadStatus => e
|
|
891
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
892
|
+
end
|
|
893
|
+
|
|
894
|
+
##
|
|
895
|
+
# Lists the Trials associated with a Study.
|
|
896
|
+
#
|
|
897
|
+
# @overload list_trials(request, options = nil)
|
|
898
|
+
# Pass arguments to `list_trials` via a request object, either of type
|
|
899
|
+
# {::Google::Cloud::AIPlatform::V1::ListTrialsRequest} or an equivalent Hash.
|
|
900
|
+
#
|
|
901
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListTrialsRequest, ::Hash]
|
|
902
|
+
# A request object representing the call parameters. Required. To specify no
|
|
903
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
904
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
905
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
906
|
+
#
|
|
907
|
+
# @overload list_trials(parent: nil, page_token: nil, page_size: nil)
|
|
908
|
+
# Pass arguments to `list_trials` via keyword arguments. Note that at
|
|
909
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
910
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
911
|
+
#
|
|
912
|
+
# @param parent [::String]
|
|
913
|
+
# Required. The resource name of the Study to list the Trial from.
|
|
914
|
+
# Format: `projects/{project}/locations/{location}/studies/{study}`
|
|
915
|
+
# @param page_token [::String]
|
|
916
|
+
# Optional. A page token to request the next page of results.
|
|
917
|
+
# If unspecified, there are no subsequent pages.
|
|
918
|
+
# @param page_size [::Integer]
|
|
919
|
+
# Optional. The number of Trials to retrieve per "page" of results.
|
|
920
|
+
# If unspecified, the service will pick an appropriate default.
|
|
921
|
+
#
|
|
922
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
923
|
+
# @yieldparam response [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>]
|
|
924
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
925
|
+
#
|
|
926
|
+
# @return [::Gapic::PagedEnumerable<::Google::Cloud::AIPlatform::V1::Trial>]
|
|
927
|
+
#
|
|
928
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
929
|
+
#
|
|
930
|
+
# @example Basic example
|
|
931
|
+
# require "google/cloud/ai_platform/v1"
|
|
932
|
+
#
|
|
933
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
934
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
935
|
+
#
|
|
936
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
937
|
+
# request = Google::Cloud::AIPlatform::V1::ListTrialsRequest.new
|
|
938
|
+
#
|
|
939
|
+
# # Call the list_trials method.
|
|
940
|
+
# result = client.list_trials request
|
|
941
|
+
#
|
|
942
|
+
# # The returned object is of type Gapic::PagedEnumerable. You can
|
|
943
|
+
# # iterate over all elements by calling #each, and the enumerable
|
|
944
|
+
# # will lazily make API calls to fetch subsequent pages. Other
|
|
945
|
+
# # methods are also available for managing paging directly.
|
|
946
|
+
# result.each do |response|
|
|
947
|
+
# # Each element is of type ::Google::Cloud::AIPlatform::V1::Trial.
|
|
948
|
+
# p response
|
|
949
|
+
# end
|
|
950
|
+
#
|
|
951
|
+
def list_trials request, options = nil
|
|
952
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
953
|
+
|
|
954
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListTrialsRequest
|
|
955
|
+
|
|
956
|
+
# Converts hash and nil to an options object
|
|
957
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
958
|
+
|
|
959
|
+
# Customize the options with defaults
|
|
960
|
+
metadata = @config.rpcs.list_trials.metadata.to_h
|
|
961
|
+
|
|
962
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
963
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
964
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
965
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
966
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
967
|
+
|
|
968
|
+
header_params = {}
|
|
969
|
+
if request.parent
|
|
970
|
+
header_params["parent"] = request.parent
|
|
971
|
+
end
|
|
972
|
+
|
|
973
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
974
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
975
|
+
|
|
976
|
+
options.apply_defaults timeout: @config.rpcs.list_trials.timeout,
|
|
977
|
+
metadata: metadata,
|
|
978
|
+
retry_policy: @config.rpcs.list_trials.retry_policy
|
|
979
|
+
|
|
980
|
+
options.apply_defaults timeout: @config.timeout,
|
|
981
|
+
metadata: @config.metadata,
|
|
982
|
+
retry_policy: @config.retry_policy
|
|
983
|
+
|
|
984
|
+
@vizier_service_stub.call_rpc :list_trials, request, options: options do |response, operation|
|
|
985
|
+
response = ::Gapic::PagedEnumerable.new @vizier_service_stub, :list_trials, request, response, operation, options
|
|
986
|
+
yield response, operation if block_given?
|
|
987
|
+
return response
|
|
988
|
+
end
|
|
989
|
+
rescue ::GRPC::BadStatus => e
|
|
990
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
991
|
+
end
|
|
992
|
+
|
|
993
|
+
##
|
|
994
|
+
# Adds a measurement of the objective metrics to a Trial. This measurement
|
|
995
|
+
# is assumed to have been taken before the Trial is complete.
|
|
996
|
+
#
|
|
997
|
+
# @overload add_trial_measurement(request, options = nil)
|
|
998
|
+
# Pass arguments to `add_trial_measurement` via a request object, either of type
|
|
999
|
+
# {::Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest} or an equivalent Hash.
|
|
1000
|
+
#
|
|
1001
|
+
# @param request [::Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest, ::Hash]
|
|
1002
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1003
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1004
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1005
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1006
|
+
#
|
|
1007
|
+
# @overload add_trial_measurement(trial_name: nil, measurement: nil)
|
|
1008
|
+
# Pass arguments to `add_trial_measurement` via keyword arguments. Note that at
|
|
1009
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1010
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1011
|
+
#
|
|
1012
|
+
# @param trial_name [::String]
|
|
1013
|
+
# Required. The name of the trial to add measurement.
|
|
1014
|
+
# Format:
|
|
1015
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
1016
|
+
# @param measurement [::Google::Cloud::AIPlatform::V1::Measurement, ::Hash]
|
|
1017
|
+
# Required. The measurement to be added to a Trial.
|
|
1018
|
+
#
|
|
1019
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1020
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1021
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1022
|
+
#
|
|
1023
|
+
# @return [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1024
|
+
#
|
|
1025
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1026
|
+
#
|
|
1027
|
+
# @example Basic example
|
|
1028
|
+
# require "google/cloud/ai_platform/v1"
|
|
1029
|
+
#
|
|
1030
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1031
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1032
|
+
#
|
|
1033
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1034
|
+
# request = Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest.new
|
|
1035
|
+
#
|
|
1036
|
+
# # Call the add_trial_measurement method.
|
|
1037
|
+
# result = client.add_trial_measurement request
|
|
1038
|
+
#
|
|
1039
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
|
|
1040
|
+
# p result
|
|
1041
|
+
#
|
|
1042
|
+
def add_trial_measurement request, options = nil
|
|
1043
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1044
|
+
|
|
1045
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::AddTrialMeasurementRequest
|
|
1046
|
+
|
|
1047
|
+
# Converts hash and nil to an options object
|
|
1048
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1049
|
+
|
|
1050
|
+
# Customize the options with defaults
|
|
1051
|
+
metadata = @config.rpcs.add_trial_measurement.metadata.to_h
|
|
1052
|
+
|
|
1053
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1054
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1055
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1056
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1057
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1058
|
+
|
|
1059
|
+
header_params = {}
|
|
1060
|
+
if request.trial_name
|
|
1061
|
+
header_params["trial_name"] = request.trial_name
|
|
1062
|
+
end
|
|
1063
|
+
|
|
1064
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1065
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1066
|
+
|
|
1067
|
+
options.apply_defaults timeout: @config.rpcs.add_trial_measurement.timeout,
|
|
1068
|
+
metadata: metadata,
|
|
1069
|
+
retry_policy: @config.rpcs.add_trial_measurement.retry_policy
|
|
1070
|
+
|
|
1071
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1072
|
+
metadata: @config.metadata,
|
|
1073
|
+
retry_policy: @config.retry_policy
|
|
1074
|
+
|
|
1075
|
+
@vizier_service_stub.call_rpc :add_trial_measurement, request, options: options do |response, operation|
|
|
1076
|
+
yield response, operation if block_given?
|
|
1077
|
+
return response
|
|
1078
|
+
end
|
|
1079
|
+
rescue ::GRPC::BadStatus => e
|
|
1080
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1081
|
+
end
|
|
1082
|
+
|
|
1083
|
+
##
|
|
1084
|
+
# Marks a Trial as complete.
|
|
1085
|
+
#
|
|
1086
|
+
# @overload complete_trial(request, options = nil)
|
|
1087
|
+
# Pass arguments to `complete_trial` via a request object, either of type
|
|
1088
|
+
# {::Google::Cloud::AIPlatform::V1::CompleteTrialRequest} or an equivalent Hash.
|
|
1089
|
+
#
|
|
1090
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CompleteTrialRequest, ::Hash]
|
|
1091
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1092
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1093
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1094
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1095
|
+
#
|
|
1096
|
+
# @overload complete_trial(name: nil, final_measurement: nil, trial_infeasible: nil, infeasible_reason: nil)
|
|
1097
|
+
# Pass arguments to `complete_trial` via keyword arguments. Note that at
|
|
1098
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1099
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1100
|
+
#
|
|
1101
|
+
# @param name [::String]
|
|
1102
|
+
# Required. The Trial's name.
|
|
1103
|
+
# Format:
|
|
1104
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
1105
|
+
# @param final_measurement [::Google::Cloud::AIPlatform::V1::Measurement, ::Hash]
|
|
1106
|
+
# Optional. If provided, it will be used as the completed Trial's
|
|
1107
|
+
# final_measurement; Otherwise, the service will auto-select a
|
|
1108
|
+
# previously reported measurement as the final-measurement
|
|
1109
|
+
# @param trial_infeasible [::Boolean]
|
|
1110
|
+
# Optional. True if the Trial cannot be run with the given Parameter, and
|
|
1111
|
+
# final_measurement will be ignored.
|
|
1112
|
+
# @param infeasible_reason [::String]
|
|
1113
|
+
# Optional. A human readable reason why the trial was infeasible. This should
|
|
1114
|
+
# only be provided if `trial_infeasible` is true.
|
|
1115
|
+
#
|
|
1116
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1117
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1118
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1119
|
+
#
|
|
1120
|
+
# @return [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1121
|
+
#
|
|
1122
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1123
|
+
#
|
|
1124
|
+
# @example Basic example
|
|
1125
|
+
# require "google/cloud/ai_platform/v1"
|
|
1126
|
+
#
|
|
1127
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1128
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1129
|
+
#
|
|
1130
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1131
|
+
# request = Google::Cloud::AIPlatform::V1::CompleteTrialRequest.new
|
|
1132
|
+
#
|
|
1133
|
+
# # Call the complete_trial method.
|
|
1134
|
+
# result = client.complete_trial request
|
|
1135
|
+
#
|
|
1136
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
|
|
1137
|
+
# p result
|
|
1138
|
+
#
|
|
1139
|
+
def complete_trial request, options = nil
|
|
1140
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1141
|
+
|
|
1142
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CompleteTrialRequest
|
|
1143
|
+
|
|
1144
|
+
# Converts hash and nil to an options object
|
|
1145
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1146
|
+
|
|
1147
|
+
# Customize the options with defaults
|
|
1148
|
+
metadata = @config.rpcs.complete_trial.metadata.to_h
|
|
1149
|
+
|
|
1150
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1151
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1152
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1153
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1154
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1155
|
+
|
|
1156
|
+
header_params = {}
|
|
1157
|
+
if request.name
|
|
1158
|
+
header_params["name"] = request.name
|
|
1159
|
+
end
|
|
1160
|
+
|
|
1161
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1162
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1163
|
+
|
|
1164
|
+
options.apply_defaults timeout: @config.rpcs.complete_trial.timeout,
|
|
1165
|
+
metadata: metadata,
|
|
1166
|
+
retry_policy: @config.rpcs.complete_trial.retry_policy
|
|
1167
|
+
|
|
1168
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1169
|
+
metadata: @config.metadata,
|
|
1170
|
+
retry_policy: @config.retry_policy
|
|
1171
|
+
|
|
1172
|
+
@vizier_service_stub.call_rpc :complete_trial, request, options: options do |response, operation|
|
|
1173
|
+
yield response, operation if block_given?
|
|
1174
|
+
return response
|
|
1175
|
+
end
|
|
1176
|
+
rescue ::GRPC::BadStatus => e
|
|
1177
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1178
|
+
end
|
|
1179
|
+
|
|
1180
|
+
##
|
|
1181
|
+
# Deletes a Trial.
|
|
1182
|
+
#
|
|
1183
|
+
# @overload delete_trial(request, options = nil)
|
|
1184
|
+
# Pass arguments to `delete_trial` via a request object, either of type
|
|
1185
|
+
# {::Google::Cloud::AIPlatform::V1::DeleteTrialRequest} or an equivalent Hash.
|
|
1186
|
+
#
|
|
1187
|
+
# @param request [::Google::Cloud::AIPlatform::V1::DeleteTrialRequest, ::Hash]
|
|
1188
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1189
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1190
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1191
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1192
|
+
#
|
|
1193
|
+
# @overload delete_trial(name: nil)
|
|
1194
|
+
# Pass arguments to `delete_trial` via keyword arguments. Note that at
|
|
1195
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1196
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1197
|
+
#
|
|
1198
|
+
# @param name [::String]
|
|
1199
|
+
# Required. The Trial's name.
|
|
1200
|
+
# Format:
|
|
1201
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
1202
|
+
#
|
|
1203
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1204
|
+
# @yieldparam response [::Google::Protobuf::Empty]
|
|
1205
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1206
|
+
#
|
|
1207
|
+
# @return [::Google::Protobuf::Empty]
|
|
1208
|
+
#
|
|
1209
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1210
|
+
#
|
|
1211
|
+
# @example Basic example
|
|
1212
|
+
# require "google/cloud/ai_platform/v1"
|
|
1213
|
+
#
|
|
1214
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1215
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1216
|
+
#
|
|
1217
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1218
|
+
# request = Google::Cloud::AIPlatform::V1::DeleteTrialRequest.new
|
|
1219
|
+
#
|
|
1220
|
+
# # Call the delete_trial method.
|
|
1221
|
+
# result = client.delete_trial request
|
|
1222
|
+
#
|
|
1223
|
+
# # The returned object is of type Google::Protobuf::Empty.
|
|
1224
|
+
# p result
|
|
1225
|
+
#
|
|
1226
|
+
def delete_trial request, options = nil
|
|
1227
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1228
|
+
|
|
1229
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::DeleteTrialRequest
|
|
1230
|
+
|
|
1231
|
+
# Converts hash and nil to an options object
|
|
1232
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1233
|
+
|
|
1234
|
+
# Customize the options with defaults
|
|
1235
|
+
metadata = @config.rpcs.delete_trial.metadata.to_h
|
|
1236
|
+
|
|
1237
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1238
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1239
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1240
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1241
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1242
|
+
|
|
1243
|
+
header_params = {}
|
|
1244
|
+
if request.name
|
|
1245
|
+
header_params["name"] = request.name
|
|
1246
|
+
end
|
|
1247
|
+
|
|
1248
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1249
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1250
|
+
|
|
1251
|
+
options.apply_defaults timeout: @config.rpcs.delete_trial.timeout,
|
|
1252
|
+
metadata: metadata,
|
|
1253
|
+
retry_policy: @config.rpcs.delete_trial.retry_policy
|
|
1254
|
+
|
|
1255
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1256
|
+
metadata: @config.metadata,
|
|
1257
|
+
retry_policy: @config.retry_policy
|
|
1258
|
+
|
|
1259
|
+
@vizier_service_stub.call_rpc :delete_trial, request, options: options do |response, operation|
|
|
1260
|
+
yield response, operation if block_given?
|
|
1261
|
+
return response
|
|
1262
|
+
end
|
|
1263
|
+
rescue ::GRPC::BadStatus => e
|
|
1264
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1265
|
+
end
|
|
1266
|
+
|
|
1267
|
+
##
|
|
1268
|
+
# Checks whether a Trial should stop or not. Returns a
|
|
1269
|
+
# long-running operation. When the operation is successful,
|
|
1270
|
+
# it will contain a
|
|
1271
|
+
# [CheckTrialEarlyStoppingStateResponse][google.cloud.ml.v1.CheckTrialEarlyStoppingStateResponse].
|
|
1272
|
+
#
|
|
1273
|
+
# @overload check_trial_early_stopping_state(request, options = nil)
|
|
1274
|
+
# Pass arguments to `check_trial_early_stopping_state` via a request object, either of type
|
|
1275
|
+
# {::Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest} or an equivalent Hash.
|
|
1276
|
+
#
|
|
1277
|
+
# @param request [::Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest, ::Hash]
|
|
1278
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1279
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1280
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1281
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1282
|
+
#
|
|
1283
|
+
# @overload check_trial_early_stopping_state(trial_name: nil)
|
|
1284
|
+
# Pass arguments to `check_trial_early_stopping_state` via keyword arguments. Note that at
|
|
1285
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1286
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1287
|
+
#
|
|
1288
|
+
# @param trial_name [::String]
|
|
1289
|
+
# Required. The Trial's name.
|
|
1290
|
+
# Format:
|
|
1291
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
1292
|
+
#
|
|
1293
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1294
|
+
# @yieldparam response [::Gapic::Operation]
|
|
1295
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1296
|
+
#
|
|
1297
|
+
# @return [::Gapic::Operation]
|
|
1298
|
+
#
|
|
1299
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1300
|
+
#
|
|
1301
|
+
# @example Basic example
|
|
1302
|
+
# require "google/cloud/ai_platform/v1"
|
|
1303
|
+
#
|
|
1304
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1305
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1306
|
+
#
|
|
1307
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1308
|
+
# request = Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest.new
|
|
1309
|
+
#
|
|
1310
|
+
# # Call the check_trial_early_stopping_state method.
|
|
1311
|
+
# result = client.check_trial_early_stopping_state request
|
|
1312
|
+
#
|
|
1313
|
+
# # The returned object is of type Gapic::Operation. You can use this
|
|
1314
|
+
# # object to check the status of an operation, cancel it, or wait
|
|
1315
|
+
# # for results. Here is how to block until completion:
|
|
1316
|
+
# result.wait_until_done! timeout: 60
|
|
1317
|
+
# if result.response?
|
|
1318
|
+
# p result.response
|
|
1319
|
+
# else
|
|
1320
|
+
# puts "Error!"
|
|
1321
|
+
# end
|
|
1322
|
+
#
|
|
1323
|
+
def check_trial_early_stopping_state request, options = nil
|
|
1324
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1325
|
+
|
|
1326
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::CheckTrialEarlyStoppingStateRequest
|
|
1327
|
+
|
|
1328
|
+
# Converts hash and nil to an options object
|
|
1329
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1330
|
+
|
|
1331
|
+
# Customize the options with defaults
|
|
1332
|
+
metadata = @config.rpcs.check_trial_early_stopping_state.metadata.to_h
|
|
1333
|
+
|
|
1334
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1335
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1336
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1337
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1338
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1339
|
+
|
|
1340
|
+
header_params = {}
|
|
1341
|
+
if request.trial_name
|
|
1342
|
+
header_params["trial_name"] = request.trial_name
|
|
1343
|
+
end
|
|
1344
|
+
|
|
1345
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1346
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1347
|
+
|
|
1348
|
+
options.apply_defaults timeout: @config.rpcs.check_trial_early_stopping_state.timeout,
|
|
1349
|
+
metadata: metadata,
|
|
1350
|
+
retry_policy: @config.rpcs.check_trial_early_stopping_state.retry_policy
|
|
1351
|
+
|
|
1352
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1353
|
+
metadata: @config.metadata,
|
|
1354
|
+
retry_policy: @config.retry_policy
|
|
1355
|
+
|
|
1356
|
+
@vizier_service_stub.call_rpc :check_trial_early_stopping_state, request, options: options do |response, operation|
|
|
1357
|
+
response = ::Gapic::Operation.new response, @operations_client, options: options
|
|
1358
|
+
yield response, operation if block_given?
|
|
1359
|
+
return response
|
|
1360
|
+
end
|
|
1361
|
+
rescue ::GRPC::BadStatus => e
|
|
1362
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1363
|
+
end
|
|
1364
|
+
|
|
1365
|
+
##
|
|
1366
|
+
# Stops a Trial.
|
|
1367
|
+
#
|
|
1368
|
+
# @overload stop_trial(request, options = nil)
|
|
1369
|
+
# Pass arguments to `stop_trial` via a request object, either of type
|
|
1370
|
+
# {::Google::Cloud::AIPlatform::V1::StopTrialRequest} or an equivalent Hash.
|
|
1371
|
+
#
|
|
1372
|
+
# @param request [::Google::Cloud::AIPlatform::V1::StopTrialRequest, ::Hash]
|
|
1373
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1374
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1375
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1376
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1377
|
+
#
|
|
1378
|
+
# @overload stop_trial(name: nil)
|
|
1379
|
+
# Pass arguments to `stop_trial` via keyword arguments. Note that at
|
|
1380
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1381
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1382
|
+
#
|
|
1383
|
+
# @param name [::String]
|
|
1384
|
+
# Required. The Trial's name.
|
|
1385
|
+
# Format:
|
|
1386
|
+
# `projects/{project}/locations/{location}/studies/{study}/trials/{trial}`
|
|
1387
|
+
#
|
|
1388
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1389
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1390
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1391
|
+
#
|
|
1392
|
+
# @return [::Google::Cloud::AIPlatform::V1::Trial]
|
|
1393
|
+
#
|
|
1394
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1395
|
+
#
|
|
1396
|
+
# @example Basic example
|
|
1397
|
+
# require "google/cloud/ai_platform/v1"
|
|
1398
|
+
#
|
|
1399
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1400
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1401
|
+
#
|
|
1402
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1403
|
+
# request = Google::Cloud::AIPlatform::V1::StopTrialRequest.new
|
|
1404
|
+
#
|
|
1405
|
+
# # Call the stop_trial method.
|
|
1406
|
+
# result = client.stop_trial request
|
|
1407
|
+
#
|
|
1408
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::Trial.
|
|
1409
|
+
# p result
|
|
1410
|
+
#
|
|
1411
|
+
def stop_trial request, options = nil
|
|
1412
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1413
|
+
|
|
1414
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::StopTrialRequest
|
|
1415
|
+
|
|
1416
|
+
# Converts hash and nil to an options object
|
|
1417
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1418
|
+
|
|
1419
|
+
# Customize the options with defaults
|
|
1420
|
+
metadata = @config.rpcs.stop_trial.metadata.to_h
|
|
1421
|
+
|
|
1422
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1423
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1424
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1425
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1426
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1427
|
+
|
|
1428
|
+
header_params = {}
|
|
1429
|
+
if request.name
|
|
1430
|
+
header_params["name"] = request.name
|
|
1431
|
+
end
|
|
1432
|
+
|
|
1433
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1434
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1435
|
+
|
|
1436
|
+
options.apply_defaults timeout: @config.rpcs.stop_trial.timeout,
|
|
1437
|
+
metadata: metadata,
|
|
1438
|
+
retry_policy: @config.rpcs.stop_trial.retry_policy
|
|
1439
|
+
|
|
1440
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1441
|
+
metadata: @config.metadata,
|
|
1442
|
+
retry_policy: @config.retry_policy
|
|
1443
|
+
|
|
1444
|
+
@vizier_service_stub.call_rpc :stop_trial, request, options: options do |response, operation|
|
|
1445
|
+
yield response, operation if block_given?
|
|
1446
|
+
return response
|
|
1447
|
+
end
|
|
1448
|
+
rescue ::GRPC::BadStatus => e
|
|
1449
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1450
|
+
end
|
|
1451
|
+
|
|
1452
|
+
##
|
|
1453
|
+
# Lists the pareto-optimal Trials for multi-objective Study or the
|
|
1454
|
+
# optimal Trials for single-objective Study. The definition of
|
|
1455
|
+
# pareto-optimal can be checked in wiki page.
|
|
1456
|
+
# https://en.wikipedia.org/wiki/Pareto_efficiency
|
|
1457
|
+
#
|
|
1458
|
+
# @overload list_optimal_trials(request, options = nil)
|
|
1459
|
+
# Pass arguments to `list_optimal_trials` via a request object, either of type
|
|
1460
|
+
# {::Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest} or an equivalent Hash.
|
|
1461
|
+
#
|
|
1462
|
+
# @param request [::Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest, ::Hash]
|
|
1463
|
+
# A request object representing the call parameters. Required. To specify no
|
|
1464
|
+
# parameters, or to keep all the default parameter values, pass an empty Hash.
|
|
1465
|
+
# @param options [::Gapic::CallOptions, ::Hash]
|
|
1466
|
+
# Overrides the default settings for this call, e.g, timeout, retries, etc. Optional.
|
|
1467
|
+
#
|
|
1468
|
+
# @overload list_optimal_trials(parent: nil)
|
|
1469
|
+
# Pass arguments to `list_optimal_trials` via keyword arguments. Note that at
|
|
1470
|
+
# least one keyword argument is required. To specify no parameters, or to keep all
|
|
1471
|
+
# the default parameter values, pass an empty Hash as a request object (see above).
|
|
1472
|
+
#
|
|
1473
|
+
# @param parent [::String]
|
|
1474
|
+
# Required. The name of the Study that the optimal Trial belongs to.
|
|
1475
|
+
#
|
|
1476
|
+
# @yield [response, operation] Access the result along with the RPC operation
|
|
1477
|
+
# @yieldparam response [::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse]
|
|
1478
|
+
# @yieldparam operation [::GRPC::ActiveCall::Operation]
|
|
1479
|
+
#
|
|
1480
|
+
# @return [::Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse]
|
|
1481
|
+
#
|
|
1482
|
+
# @raise [::Google::Cloud::Error] if the RPC is aborted.
|
|
1483
|
+
#
|
|
1484
|
+
# @example Basic example
|
|
1485
|
+
# require "google/cloud/ai_platform/v1"
|
|
1486
|
+
#
|
|
1487
|
+
# # Create a client object. The client can be reused for multiple calls.
|
|
1488
|
+
# client = Google::Cloud::AIPlatform::V1::VizierService::Client.new
|
|
1489
|
+
#
|
|
1490
|
+
# # Create a request. To set request fields, pass in keyword arguments.
|
|
1491
|
+
# request = Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest.new
|
|
1492
|
+
#
|
|
1493
|
+
# # Call the list_optimal_trials method.
|
|
1494
|
+
# result = client.list_optimal_trials request
|
|
1495
|
+
#
|
|
1496
|
+
# # The returned object is of type Google::Cloud::AIPlatform::V1::ListOptimalTrialsResponse.
|
|
1497
|
+
# p result
|
|
1498
|
+
#
|
|
1499
|
+
def list_optimal_trials request, options = nil
|
|
1500
|
+
raise ::ArgumentError, "request must be provided" if request.nil?
|
|
1501
|
+
|
|
1502
|
+
request = ::Gapic::Protobuf.coerce request, to: ::Google::Cloud::AIPlatform::V1::ListOptimalTrialsRequest
|
|
1503
|
+
|
|
1504
|
+
# Converts hash and nil to an options object
|
|
1505
|
+
options = ::Gapic::CallOptions.new(**options.to_h) if options.respond_to? :to_h
|
|
1506
|
+
|
|
1507
|
+
# Customize the options with defaults
|
|
1508
|
+
metadata = @config.rpcs.list_optimal_trials.metadata.to_h
|
|
1509
|
+
|
|
1510
|
+
# Set x-goog-api-client and x-goog-user-project headers
|
|
1511
|
+
metadata[:"x-goog-api-client"] ||= ::Gapic::Headers.x_goog_api_client \
|
|
1512
|
+
lib_name: @config.lib_name, lib_version: @config.lib_version,
|
|
1513
|
+
gapic_version: ::Google::Cloud::AIPlatform::V1::VERSION
|
|
1514
|
+
metadata[:"x-goog-user-project"] = @quota_project_id if @quota_project_id
|
|
1515
|
+
|
|
1516
|
+
header_params = {}
|
|
1517
|
+
if request.parent
|
|
1518
|
+
header_params["parent"] = request.parent
|
|
1519
|
+
end
|
|
1520
|
+
|
|
1521
|
+
request_params_header = header_params.map { |k, v| "#{k}=#{v}" }.join("&")
|
|
1522
|
+
metadata[:"x-goog-request-params"] ||= request_params_header
|
|
1523
|
+
|
|
1524
|
+
options.apply_defaults timeout: @config.rpcs.list_optimal_trials.timeout,
|
|
1525
|
+
metadata: metadata,
|
|
1526
|
+
retry_policy: @config.rpcs.list_optimal_trials.retry_policy
|
|
1527
|
+
|
|
1528
|
+
options.apply_defaults timeout: @config.timeout,
|
|
1529
|
+
metadata: @config.metadata,
|
|
1530
|
+
retry_policy: @config.retry_policy
|
|
1531
|
+
|
|
1532
|
+
@vizier_service_stub.call_rpc :list_optimal_trials, request, options: options do |response, operation|
|
|
1533
|
+
yield response, operation if block_given?
|
|
1534
|
+
return response
|
|
1535
|
+
end
|
|
1536
|
+
rescue ::GRPC::BadStatus => e
|
|
1537
|
+
raise ::Google::Cloud::Error.from_error(e)
|
|
1538
|
+
end
|
|
1539
|
+
|
|
1540
|
+
##
|
|
1541
|
+
# Configuration class for the VizierService API.
|
|
1542
|
+
#
|
|
1543
|
+
# This class represents the configuration for VizierService,
|
|
1544
|
+
# providing control over timeouts, retry behavior, logging, transport
|
|
1545
|
+
# parameters, and other low-level controls. Certain parameters can also be
|
|
1546
|
+
# applied individually to specific RPCs. See
|
|
1547
|
+
# {::Google::Cloud::AIPlatform::V1::VizierService::Client::Configuration::Rpcs}
|
|
1548
|
+
# for a list of RPCs that can be configured independently.
|
|
1549
|
+
#
|
|
1550
|
+
# Configuration can be applied globally to all clients, or to a single client
|
|
1551
|
+
# on construction.
|
|
1552
|
+
#
|
|
1553
|
+
# @example
|
|
1554
|
+
#
|
|
1555
|
+
# # Modify the global config, setting the timeout for
|
|
1556
|
+
# # create_study to 20 seconds,
|
|
1557
|
+
# # and all remaining timeouts to 10 seconds.
|
|
1558
|
+
# ::Google::Cloud::AIPlatform::V1::VizierService::Client.configure do |config|
|
|
1559
|
+
# config.timeout = 10.0
|
|
1560
|
+
# config.rpcs.create_study.timeout = 20.0
|
|
1561
|
+
# end
|
|
1562
|
+
#
|
|
1563
|
+
# # Apply the above configuration only to a new client.
|
|
1564
|
+
# client = ::Google::Cloud::AIPlatform::V1::VizierService::Client.new do |config|
|
|
1565
|
+
# config.timeout = 10.0
|
|
1566
|
+
# config.rpcs.create_study.timeout = 20.0
|
|
1567
|
+
# end
|
|
1568
|
+
#
|
|
1569
|
+
# @!attribute [rw] endpoint
|
|
1570
|
+
# The hostname or hostname:port of the service endpoint.
|
|
1571
|
+
# Defaults to `"aiplatform.googleapis.com"`.
|
|
1572
|
+
# @return [::String]
|
|
1573
|
+
# @!attribute [rw] credentials
|
|
1574
|
+
# Credentials to send with calls. You may provide any of the following types:
|
|
1575
|
+
# * (`String`) The path to a service account key file in JSON format
|
|
1576
|
+
# * (`Hash`) A service account key as a Hash
|
|
1577
|
+
# * (`Google::Auth::Credentials`) A googleauth credentials object
|
|
1578
|
+
# (see the [googleauth docs](https://googleapis.dev/ruby/googleauth/latest/index.html))
|
|
1579
|
+
# * (`Signet::OAuth2::Client`) A signet oauth2 client object
|
|
1580
|
+
# (see the [signet docs](https://googleapis.dev/ruby/signet/latest/Signet/OAuth2/Client.html))
|
|
1581
|
+
# * (`GRPC::Core::Channel`) a gRPC channel with included credentials
|
|
1582
|
+
# * (`GRPC::Core::ChannelCredentials`) a gRPC credentails object
|
|
1583
|
+
# * (`nil`) indicating no credentials
|
|
1584
|
+
# @return [::Object]
|
|
1585
|
+
# @!attribute [rw] scope
|
|
1586
|
+
# The OAuth scopes
|
|
1587
|
+
# @return [::Array<::String>]
|
|
1588
|
+
# @!attribute [rw] lib_name
|
|
1589
|
+
# The library name as recorded in instrumentation and logging
|
|
1590
|
+
# @return [::String]
|
|
1591
|
+
# @!attribute [rw] lib_version
|
|
1592
|
+
# The library version as recorded in instrumentation and logging
|
|
1593
|
+
# @return [::String]
|
|
1594
|
+
# @!attribute [rw] channel_args
|
|
1595
|
+
# Extra parameters passed to the gRPC channel. Note: this is ignored if a
|
|
1596
|
+
# `GRPC::Core::Channel` object is provided as the credential.
|
|
1597
|
+
# @return [::Hash]
|
|
1598
|
+
# @!attribute [rw] interceptors
|
|
1599
|
+
# An array of interceptors that are run before calls are executed.
|
|
1600
|
+
# @return [::Array<::GRPC::ClientInterceptor>]
|
|
1601
|
+
# @!attribute [rw] timeout
|
|
1602
|
+
# The call timeout in seconds.
|
|
1603
|
+
# @return [::Numeric]
|
|
1604
|
+
# @!attribute [rw] metadata
|
|
1605
|
+
# Additional gRPC headers to be sent with the call.
|
|
1606
|
+
# @return [::Hash{::Symbol=>::String}]
|
|
1607
|
+
# @!attribute [rw] retry_policy
|
|
1608
|
+
# The retry policy. The value is a hash with the following keys:
|
|
1609
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1610
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1611
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1612
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1613
|
+
# trigger a retry.
|
|
1614
|
+
# @return [::Hash]
|
|
1615
|
+
# @!attribute [rw] quota_project
|
|
1616
|
+
# A separate project against which to charge quota.
|
|
1617
|
+
# @return [::String]
|
|
1618
|
+
#
|
|
1619
|
+
class Configuration
|
|
1620
|
+
extend ::Gapic::Config
|
|
1621
|
+
|
|
1622
|
+
config_attr :endpoint, "aiplatform.googleapis.com", ::String
|
|
1623
|
+
config_attr :credentials, nil do |value|
|
|
1624
|
+
allowed = [::String, ::Hash, ::Proc, ::Symbol, ::Google::Auth::Credentials, ::Signet::OAuth2::Client, nil]
|
|
1625
|
+
allowed += [::GRPC::Core::Channel, ::GRPC::Core::ChannelCredentials] if defined? ::GRPC
|
|
1626
|
+
allowed.any? { |klass| klass === value }
|
|
1627
|
+
end
|
|
1628
|
+
config_attr :scope, nil, ::String, ::Array, nil
|
|
1629
|
+
config_attr :lib_name, nil, ::String, nil
|
|
1630
|
+
config_attr :lib_version, nil, ::String, nil
|
|
1631
|
+
config_attr(:channel_args, { "grpc.service_config_disable_resolution" => 1 }, ::Hash, nil)
|
|
1632
|
+
config_attr :interceptors, nil, ::Array, nil
|
|
1633
|
+
config_attr :timeout, nil, ::Numeric, nil
|
|
1634
|
+
config_attr :metadata, nil, ::Hash, nil
|
|
1635
|
+
config_attr :retry_policy, nil, ::Hash, ::Proc, nil
|
|
1636
|
+
config_attr :quota_project, nil, ::String, nil
|
|
1637
|
+
|
|
1638
|
+
# @private
|
|
1639
|
+
def initialize parent_config = nil
|
|
1640
|
+
@parent_config = parent_config unless parent_config.nil?
|
|
1641
|
+
|
|
1642
|
+
yield self if block_given?
|
|
1643
|
+
end
|
|
1644
|
+
|
|
1645
|
+
##
|
|
1646
|
+
# Configurations for individual RPCs
|
|
1647
|
+
# @return [Rpcs]
|
|
1648
|
+
#
|
|
1649
|
+
def rpcs
|
|
1650
|
+
@rpcs ||= begin
|
|
1651
|
+
parent_rpcs = nil
|
|
1652
|
+
parent_rpcs = @parent_config.rpcs if defined?(@parent_config) && @parent_config.respond_to?(:rpcs)
|
|
1653
|
+
Rpcs.new parent_rpcs
|
|
1654
|
+
end
|
|
1655
|
+
end
|
|
1656
|
+
|
|
1657
|
+
##
|
|
1658
|
+
# Configuration RPC class for the VizierService API.
|
|
1659
|
+
#
|
|
1660
|
+
# Includes fields providing the configuration for each RPC in this service.
|
|
1661
|
+
# Each configuration object is of type `Gapic::Config::Method` and includes
|
|
1662
|
+
# the following configuration fields:
|
|
1663
|
+
#
|
|
1664
|
+
# * `timeout` (*type:* `Numeric`) - The call timeout in seconds
|
|
1665
|
+
# * `metadata` (*type:* `Hash{Symbol=>String}`) - Additional gRPC headers
|
|
1666
|
+
# * `retry_policy (*type:* `Hash`) - The retry policy. The policy fields
|
|
1667
|
+
# include the following keys:
|
|
1668
|
+
# * `:initial_delay` (*type:* `Numeric`) - The initial delay in seconds.
|
|
1669
|
+
# * `:max_delay` (*type:* `Numeric`) - The max delay in seconds.
|
|
1670
|
+
# * `:multiplier` (*type:* `Numeric`) - The incremental backoff multiplier.
|
|
1671
|
+
# * `:retry_codes` (*type:* `Array<String>`) - The error codes that should
|
|
1672
|
+
# trigger a retry.
|
|
1673
|
+
#
|
|
1674
|
+
class Rpcs
|
|
1675
|
+
##
|
|
1676
|
+
# RPC-specific configuration for `create_study`
|
|
1677
|
+
# @return [::Gapic::Config::Method]
|
|
1678
|
+
#
|
|
1679
|
+
attr_reader :create_study
|
|
1680
|
+
##
|
|
1681
|
+
# RPC-specific configuration for `get_study`
|
|
1682
|
+
# @return [::Gapic::Config::Method]
|
|
1683
|
+
#
|
|
1684
|
+
attr_reader :get_study
|
|
1685
|
+
##
|
|
1686
|
+
# RPC-specific configuration for `list_studies`
|
|
1687
|
+
# @return [::Gapic::Config::Method]
|
|
1688
|
+
#
|
|
1689
|
+
attr_reader :list_studies
|
|
1690
|
+
##
|
|
1691
|
+
# RPC-specific configuration for `delete_study`
|
|
1692
|
+
# @return [::Gapic::Config::Method]
|
|
1693
|
+
#
|
|
1694
|
+
attr_reader :delete_study
|
|
1695
|
+
##
|
|
1696
|
+
# RPC-specific configuration for `lookup_study`
|
|
1697
|
+
# @return [::Gapic::Config::Method]
|
|
1698
|
+
#
|
|
1699
|
+
attr_reader :lookup_study
|
|
1700
|
+
##
|
|
1701
|
+
# RPC-specific configuration for `suggest_trials`
|
|
1702
|
+
# @return [::Gapic::Config::Method]
|
|
1703
|
+
#
|
|
1704
|
+
attr_reader :suggest_trials
|
|
1705
|
+
##
|
|
1706
|
+
# RPC-specific configuration for `create_trial`
|
|
1707
|
+
# @return [::Gapic::Config::Method]
|
|
1708
|
+
#
|
|
1709
|
+
attr_reader :create_trial
|
|
1710
|
+
##
|
|
1711
|
+
# RPC-specific configuration for `get_trial`
|
|
1712
|
+
# @return [::Gapic::Config::Method]
|
|
1713
|
+
#
|
|
1714
|
+
attr_reader :get_trial
|
|
1715
|
+
##
|
|
1716
|
+
# RPC-specific configuration for `list_trials`
|
|
1717
|
+
# @return [::Gapic::Config::Method]
|
|
1718
|
+
#
|
|
1719
|
+
attr_reader :list_trials
|
|
1720
|
+
##
|
|
1721
|
+
# RPC-specific configuration for `add_trial_measurement`
|
|
1722
|
+
# @return [::Gapic::Config::Method]
|
|
1723
|
+
#
|
|
1724
|
+
attr_reader :add_trial_measurement
|
|
1725
|
+
##
|
|
1726
|
+
# RPC-specific configuration for `complete_trial`
|
|
1727
|
+
# @return [::Gapic::Config::Method]
|
|
1728
|
+
#
|
|
1729
|
+
attr_reader :complete_trial
|
|
1730
|
+
##
|
|
1731
|
+
# RPC-specific configuration for `delete_trial`
|
|
1732
|
+
# @return [::Gapic::Config::Method]
|
|
1733
|
+
#
|
|
1734
|
+
attr_reader :delete_trial
|
|
1735
|
+
##
|
|
1736
|
+
# RPC-specific configuration for `check_trial_early_stopping_state`
|
|
1737
|
+
# @return [::Gapic::Config::Method]
|
|
1738
|
+
#
|
|
1739
|
+
attr_reader :check_trial_early_stopping_state
|
|
1740
|
+
##
|
|
1741
|
+
# RPC-specific configuration for `stop_trial`
|
|
1742
|
+
# @return [::Gapic::Config::Method]
|
|
1743
|
+
#
|
|
1744
|
+
attr_reader :stop_trial
|
|
1745
|
+
##
|
|
1746
|
+
# RPC-specific configuration for `list_optimal_trials`
|
|
1747
|
+
# @return [::Gapic::Config::Method]
|
|
1748
|
+
#
|
|
1749
|
+
attr_reader :list_optimal_trials
|
|
1750
|
+
|
|
1751
|
+
# @private
|
|
1752
|
+
def initialize parent_rpcs = nil
|
|
1753
|
+
create_study_config = parent_rpcs.create_study if parent_rpcs.respond_to? :create_study
|
|
1754
|
+
@create_study = ::Gapic::Config::Method.new create_study_config
|
|
1755
|
+
get_study_config = parent_rpcs.get_study if parent_rpcs.respond_to? :get_study
|
|
1756
|
+
@get_study = ::Gapic::Config::Method.new get_study_config
|
|
1757
|
+
list_studies_config = parent_rpcs.list_studies if parent_rpcs.respond_to? :list_studies
|
|
1758
|
+
@list_studies = ::Gapic::Config::Method.new list_studies_config
|
|
1759
|
+
delete_study_config = parent_rpcs.delete_study if parent_rpcs.respond_to? :delete_study
|
|
1760
|
+
@delete_study = ::Gapic::Config::Method.new delete_study_config
|
|
1761
|
+
lookup_study_config = parent_rpcs.lookup_study if parent_rpcs.respond_to? :lookup_study
|
|
1762
|
+
@lookup_study = ::Gapic::Config::Method.new lookup_study_config
|
|
1763
|
+
suggest_trials_config = parent_rpcs.suggest_trials if parent_rpcs.respond_to? :suggest_trials
|
|
1764
|
+
@suggest_trials = ::Gapic::Config::Method.new suggest_trials_config
|
|
1765
|
+
create_trial_config = parent_rpcs.create_trial if parent_rpcs.respond_to? :create_trial
|
|
1766
|
+
@create_trial = ::Gapic::Config::Method.new create_trial_config
|
|
1767
|
+
get_trial_config = parent_rpcs.get_trial if parent_rpcs.respond_to? :get_trial
|
|
1768
|
+
@get_trial = ::Gapic::Config::Method.new get_trial_config
|
|
1769
|
+
list_trials_config = parent_rpcs.list_trials if parent_rpcs.respond_to? :list_trials
|
|
1770
|
+
@list_trials = ::Gapic::Config::Method.new list_trials_config
|
|
1771
|
+
add_trial_measurement_config = parent_rpcs.add_trial_measurement if parent_rpcs.respond_to? :add_trial_measurement
|
|
1772
|
+
@add_trial_measurement = ::Gapic::Config::Method.new add_trial_measurement_config
|
|
1773
|
+
complete_trial_config = parent_rpcs.complete_trial if parent_rpcs.respond_to? :complete_trial
|
|
1774
|
+
@complete_trial = ::Gapic::Config::Method.new complete_trial_config
|
|
1775
|
+
delete_trial_config = parent_rpcs.delete_trial if parent_rpcs.respond_to? :delete_trial
|
|
1776
|
+
@delete_trial = ::Gapic::Config::Method.new delete_trial_config
|
|
1777
|
+
check_trial_early_stopping_state_config = parent_rpcs.check_trial_early_stopping_state if parent_rpcs.respond_to? :check_trial_early_stopping_state
|
|
1778
|
+
@check_trial_early_stopping_state = ::Gapic::Config::Method.new check_trial_early_stopping_state_config
|
|
1779
|
+
stop_trial_config = parent_rpcs.stop_trial if parent_rpcs.respond_to? :stop_trial
|
|
1780
|
+
@stop_trial = ::Gapic::Config::Method.new stop_trial_config
|
|
1781
|
+
list_optimal_trials_config = parent_rpcs.list_optimal_trials if parent_rpcs.respond_to? :list_optimal_trials
|
|
1782
|
+
@list_optimal_trials = ::Gapic::Config::Method.new list_optimal_trials_config
|
|
1783
|
+
|
|
1784
|
+
yield self if block_given?
|
|
1785
|
+
end
|
|
1786
|
+
end
|
|
1787
|
+
end
|
|
1788
|
+
end
|
|
1789
|
+
end
|
|
1790
|
+
end
|
|
1791
|
+
end
|
|
1792
|
+
end
|
|
1793
|
+
end
|