diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/_http/__pycache__/__init__.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/_http/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..bfb95aa97f5c39f8753e545a8da47e0dbea7a77d Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/_http/__pycache__/__init__.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/__init__.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..dfda5e66eae71cf274dc08f1a21fcf9311164cf3 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/__init__.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/gapic_version.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/gapic_version.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa97b38fbd9da6bc40d27c158851aa28c456361d Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/__pycache__/gapic_version.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/services/__init__.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/services/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cbf94b283c704417a5e2701bd2aa9bb5519e82e3 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/services/__init__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/__init__.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..4edbfef98bf44e50d5002f9e584d7b79952b0f73 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/__init__.py @@ -0,0 +1,2278 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .accelerator_type import ( + AcceleratorType, +) +from .annotation import ( + Annotation, +) +from .annotation_spec import ( + AnnotationSpec, +) +from .api_auth import ( + ApiAuth, +) +from .artifact import ( + Artifact, +) +from .batch_prediction_job import ( + BatchPredictionJob, +) +from .cached_content import ( + CachedContent, +) +from .completion_stats import ( + CompletionStats, +) +from .content import ( + Blob, + Candidate, + Citation, + CitationMetadata, + Content, + FileData, + GenerationConfig, + GroundingChunk, + GroundingMetadata, + GroundingSupport, + ImageConfig, + LogprobsResult, + ModalityTokenCount, + ModelArmorConfig, + MultiSpeakerVoiceConfig, + Part, + PrebuiltVoiceConfig, + ReplicatedVoiceConfig, + RetrievalMetadata, + SafetyRating, + SafetySetting, + SearchEntryPoint, + Segment, + SpeakerVoiceConfig, + SpeechConfig, + UrlContextMetadata, + UrlMetadata, + VideoMetadata, + VoiceConfig, + HarmCategory, + Modality, +) +from .context import ( + Context, +) +from .custom_job import ( + ContainerSpec, + CustomJob, + CustomJobSpec, + PythonPackageSpec, + Scheduling, + WorkerPoolSpec, +) +from .data_foundry_service import ( + GenerateSyntheticDataRequest, + GenerateSyntheticDataResponse, + OutputFieldSpec, + SyntheticExample, + SyntheticField, + TaskDescriptionStrategy, +) +from .data_item import ( + DataItem, +) +from .data_labeling_job import ( + ActiveLearningConfig, + DataLabelingJob, + SampleConfig, + TrainingConfig, +) +from .dataset import ( + Dataset, + ExportDataConfig, + ExportFilterSplit, + ExportFractionSplit, + ImportDataConfig, +) +from .dataset_service import ( + CreateDatasetOperationMetadata, + CreateDatasetRequest, + CreateDatasetVersionOperationMetadata, + CreateDatasetVersionRequest, + DataItemView, + DeleteDatasetRequest, + DeleteDatasetVersionRequest, + DeleteSavedQueryRequest, + ExportDataOperationMetadata, + ExportDataRequest, + ExportDataResponse, + GetAnnotationSpecRequest, + GetDatasetRequest, + GetDatasetVersionRequest, + ImportDataOperationMetadata, + ImportDataRequest, + ImportDataResponse, + ListAnnotationsRequest, + ListAnnotationsResponse, + ListDataItemsRequest, + ListDataItemsResponse, + ListDatasetsRequest, + ListDatasetsResponse, + ListDatasetVersionsRequest, + ListDatasetVersionsResponse, + ListSavedQueriesRequest, + ListSavedQueriesResponse, + RestoreDatasetVersionOperationMetadata, + RestoreDatasetVersionRequest, + SearchDataItemsRequest, + SearchDataItemsResponse, + UpdateDatasetRequest, + UpdateDatasetVersionRequest, +) +from .dataset_version import ( + DatasetVersion, +) +from .deployed_index_ref import ( + DeployedIndexRef, +) +from .deployed_model_ref import ( + DeployedModelRef, +) +from .deployment_resource_pool import ( + DeploymentResourcePool, +) +from .deployment_resource_pool_service import ( + CreateDeploymentResourcePoolOperationMetadata, + CreateDeploymentResourcePoolRequest, + DeleteDeploymentResourcePoolRequest, + GetDeploymentResourcePoolRequest, + ListDeploymentResourcePoolsRequest, + ListDeploymentResourcePoolsResponse, + QueryDeployedModelsRequest, + QueryDeployedModelsResponse, + UpdateDeploymentResourcePoolOperationMetadata, + UpdateDeploymentResourcePoolRequest, +) +from .deployment_stage import ( + DeploymentStage, +) +from .encryption_spec import ( + EncryptionSpec, +) +from .endpoint import ( + ClientConnectionConfig, + DeployedModel, + Endpoint, + FasterDeploymentConfig, + GenAiAdvancedFeaturesConfig, + PredictRequestResponseLoggingConfig, + PrivateEndpoints, + SpeculativeDecodingSpec, +) +from .endpoint_service import ( + CreateEndpointOperationMetadata, + CreateEndpointRequest, + DeleteEndpointRequest, + DeployModelOperationMetadata, + DeployModelRequest, + DeployModelResponse, + GetEndpointRequest, + ListEndpointsRequest, + ListEndpointsResponse, + MutateDeployedModelOperationMetadata, + MutateDeployedModelRequest, + MutateDeployedModelResponse, + UndeployModelOperationMetadata, + UndeployModelRequest, + UndeployModelResponse, + UpdateEndpointLongRunningRequest, + UpdateEndpointOperationMetadata, + UpdateEndpointRequest, +) +from .entity_type import ( + EntityType, +) +from .env_var import ( + EnvVar, + SecretEnvVar, + SecretRef, +) +from .evaluated_annotation import ( + ErrorAnalysisAnnotation, + EvaluatedAnnotation, + EvaluatedAnnotationExplanation, +) +from .evaluation_service import ( + AggregationOutput, + AggregationResult, + AutoraterConfig, + BleuInput, + BleuInstance, + BleuMetricValue, + BleuResults, + BleuSpec, + CoherenceInput, + CoherenceInstance, + CoherenceResult, + CoherenceSpec, + CometInput, + CometInstance, + CometResult, + CometSpec, + ComputationBasedMetricSpec, + ContentMap, + CustomOutput, + CustomOutputFormatConfig, + EvaluateDatasetResponse, + EvaluateInstancesRequest, + EvaluateInstancesResponse, + EvaluationDataset, + ExactMatchInput, + ExactMatchInstance, + ExactMatchMetricValue, + ExactMatchResults, + ExactMatchSpec, + FluencyInput, + FluencyInstance, + FluencyResult, + FluencySpec, + FulfillmentInput, + FulfillmentInstance, + FulfillmentResult, + FulfillmentSpec, + GroundednessInput, + GroundednessInstance, + GroundednessResult, + GroundednessSpec, + LLMBasedMetricSpec, + Metric, + MetricResult, + MetricxInput, + MetricxInstance, + MetricxResult, + MetricxSpec, + OutputConfig, + OutputInfo, + PairwiseMetricInput, + PairwiseMetricInstance, + PairwiseMetricResult, + PairwiseMetricSpec, + PairwiseQuestionAnsweringQualityInput, + PairwiseQuestionAnsweringQualityInstance, + PairwiseQuestionAnsweringQualityResult, + PairwiseQuestionAnsweringQualitySpec, + PairwiseSummarizationQualityInput, + PairwiseSummarizationQualityInstance, + PairwiseSummarizationQualityResult, + PairwiseSummarizationQualitySpec, + PointwiseMetricInput, + PointwiseMetricInstance, + PointwiseMetricResult, + PointwiseMetricSpec, + PredefinedMetricSpec, + QuestionAnsweringCorrectnessInput, + QuestionAnsweringCorrectnessInstance, + QuestionAnsweringCorrectnessResult, + QuestionAnsweringCorrectnessSpec, + QuestionAnsweringHelpfulnessInput, + QuestionAnsweringHelpfulnessInstance, + QuestionAnsweringHelpfulnessResult, + QuestionAnsweringHelpfulnessSpec, + QuestionAnsweringQualityInput, + QuestionAnsweringQualityInstance, + QuestionAnsweringQualityResult, + QuestionAnsweringQualitySpec, + QuestionAnsweringRelevanceInput, + QuestionAnsweringRelevanceInstance, + QuestionAnsweringRelevanceResult, + QuestionAnsweringRelevanceSpec, + RawOutput, + RougeInput, + RougeInstance, + RougeMetricValue, + RougeResults, + RougeSpec, + SafetyInput, + SafetyInstance, + SafetyResult, + SafetySpec, + SummarizationHelpfulnessInput, + SummarizationHelpfulnessInstance, + SummarizationHelpfulnessResult, + SummarizationHelpfulnessSpec, + SummarizationQualityInput, + SummarizationQualityInstance, + SummarizationQualityResult, + SummarizationQualitySpec, + SummarizationVerbosityInput, + SummarizationVerbosityInstance, + SummarizationVerbosityResult, + SummarizationVerbositySpec, + ToolCallValidInput, + ToolCallValidInstance, + ToolCallValidMetricValue, + ToolCallValidResults, + ToolCallValidSpec, + ToolNameMatchInput, + ToolNameMatchInstance, + ToolNameMatchMetricValue, + ToolNameMatchResults, + ToolNameMatchSpec, + ToolParameterKeyMatchInput, + ToolParameterKeyMatchInstance, + ToolParameterKeyMatchMetricValue, + ToolParameterKeyMatchResults, + ToolParameterKeyMatchSpec, + ToolParameterKVMatchInput, + ToolParameterKVMatchInstance, + ToolParameterKVMatchMetricValue, + ToolParameterKVMatchResults, + ToolParameterKVMatchSpec, + PairwiseChoice, +) +from .event import ( + Event, +) +from .execution import ( + Execution, +) +from .explanation import ( + Attribution, + BlurBaselineConfig, + Examples, + ExamplesOverride, + ExamplesRestrictionsNamespace, + Explanation, + ExplanationMetadataOverride, + ExplanationParameters, + ExplanationSpec, + ExplanationSpecOverride, + FeatureNoiseSigma, + IntegratedGradientsAttribution, + ModelExplanation, + Neighbor, + Presets, + SampledShapleyAttribution, + SmoothGradConfig, + XraiAttribution, +) +from .explanation_metadata import ( + ExplanationMetadata, +) +from .feature import ( + Feature, +) +from .feature_group import ( + FeatureGroup, +) +from .feature_monitoring_stats import ( + FeatureStatsAnomaly, +) +from .feature_online_store import ( + FeatureOnlineStore, +) +from .feature_online_store_admin_service import ( + CreateFeatureOnlineStoreOperationMetadata, + CreateFeatureOnlineStoreRequest, + CreateFeatureViewOperationMetadata, + CreateFeatureViewRequest, + DeleteFeatureOnlineStoreRequest, + DeleteFeatureViewRequest, + GetFeatureOnlineStoreRequest, + GetFeatureViewRequest, + GetFeatureViewSyncRequest, + ListFeatureOnlineStoresRequest, + ListFeatureOnlineStoresResponse, + ListFeatureViewsRequest, + ListFeatureViewsResponse, + ListFeatureViewSyncsRequest, + ListFeatureViewSyncsResponse, + SyncFeatureViewRequest, + SyncFeatureViewResponse, + UpdateFeatureOnlineStoreOperationMetadata, + UpdateFeatureOnlineStoreRequest, + UpdateFeatureViewOperationMetadata, + UpdateFeatureViewRequest, +) +from .feature_online_store_service import ( + FeatureViewDataKey, + FeatureViewDirectWriteRequest, + FeatureViewDirectWriteResponse, + FetchFeatureValuesRequest, + FetchFeatureValuesResponse, + GenerateFetchAccessTokenRequest, + GenerateFetchAccessTokenResponse, + NearestNeighborQuery, + NearestNeighbors, + SearchNearestEntitiesRequest, + SearchNearestEntitiesResponse, + FeatureViewDataFormat, +) +from .feature_registry_service import ( + CreateFeatureGroupOperationMetadata, + CreateFeatureGroupRequest, + CreateRegistryFeatureOperationMetadata, + DeleteFeatureGroupRequest, + GetFeatureGroupRequest, + ListFeatureGroupsRequest, + ListFeatureGroupsResponse, + UpdateFeatureGroupOperationMetadata, + UpdateFeatureGroupRequest, + UpdateFeatureOperationMetadata, +) +from .feature_selector import ( + FeatureSelector, + IdMatcher, +) +from .feature_view import ( + FeatureView, +) +from .feature_view_sync import ( + FeatureViewSync, +) +from .featurestore import ( + Featurestore, +) +from .featurestore_monitoring import ( + FeaturestoreMonitoringConfig, +) +from .featurestore_online_service import ( + FeatureValue, + FeatureValueList, + ReadFeatureValuesRequest, + ReadFeatureValuesResponse, + StreamingReadFeatureValuesRequest, + StructFieldValue, + StructValue, + WriteFeatureValuesPayload, + WriteFeatureValuesRequest, + WriteFeatureValuesResponse, +) +from .featurestore_service import ( + BatchCreateFeaturesOperationMetadata, + BatchCreateFeaturesRequest, + BatchCreateFeaturesResponse, + BatchReadFeatureValuesOperationMetadata, + BatchReadFeatureValuesRequest, + BatchReadFeatureValuesResponse, + CreateEntityTypeOperationMetadata, + CreateEntityTypeRequest, + CreateFeatureOperationMetadata, + CreateFeatureRequest, + CreateFeaturestoreOperationMetadata, + CreateFeaturestoreRequest, + DeleteEntityTypeRequest, + DeleteFeatureRequest, + DeleteFeaturestoreRequest, + DeleteFeatureValuesOperationMetadata, + DeleteFeatureValuesRequest, + DeleteFeatureValuesResponse, + DestinationFeatureSetting, + EntityIdSelector, + ExportFeatureValuesOperationMetadata, + ExportFeatureValuesRequest, + ExportFeatureValuesResponse, + FeatureValueDestination, + GetEntityTypeRequest, + GetFeatureRequest, + GetFeaturestoreRequest, + ImportFeatureValuesOperationMetadata, + ImportFeatureValuesRequest, + ImportFeatureValuesResponse, + ListEntityTypesRequest, + ListEntityTypesResponse, + ListFeaturesRequest, + ListFeaturesResponse, + ListFeaturestoresRequest, + ListFeaturestoresResponse, + SearchFeaturesRequest, + SearchFeaturesResponse, + UpdateEntityTypeRequest, + UpdateFeatureRequest, + UpdateFeaturestoreOperationMetadata, + UpdateFeaturestoreRequest, +) +from .gen_ai_cache_service import ( + CreateCachedContentRequest, + DeleteCachedContentRequest, + GetCachedContentRequest, + ListCachedContentsRequest, + ListCachedContentsResponse, + UpdateCachedContentRequest, +) +from .genai_tuning_service import ( + CancelTuningJobRequest, + CreateTuningJobRequest, + GetTuningJobRequest, + ListTuningJobsRequest, + ListTuningJobsResponse, + RebaseTunedModelOperationMetadata, + RebaseTunedModelRequest, +) +from .hyperparameter_tuning_job import ( + HyperparameterTuningJob, +) +from .index import ( + Index, + IndexDatapoint, + IndexStats, +) +from .index_endpoint import ( + DeployedIndex, + DeployedIndexAuthConfig, + IndexEndpoint, + IndexPrivateEndpoints, +) +from .index_endpoint_service import ( + CreateIndexEndpointOperationMetadata, + CreateIndexEndpointRequest, + DeleteIndexEndpointRequest, + DeployIndexOperationMetadata, + DeployIndexRequest, + DeployIndexResponse, + GetIndexEndpointRequest, + ListIndexEndpointsRequest, + ListIndexEndpointsResponse, + MutateDeployedIndexOperationMetadata, + MutateDeployedIndexRequest, + MutateDeployedIndexResponse, + UndeployIndexOperationMetadata, + UndeployIndexRequest, + UndeployIndexResponse, + UpdateIndexEndpointRequest, +) +from .index_service import ( + CreateIndexOperationMetadata, + CreateIndexRequest, + DeleteIndexRequest, + GetIndexRequest, + ListIndexesRequest, + ListIndexesResponse, + NearestNeighborSearchOperationMetadata, + RemoveDatapointsRequest, + RemoveDatapointsResponse, + UpdateIndexOperationMetadata, + UpdateIndexRequest, + UpsertDatapointsRequest, + UpsertDatapointsResponse, +) +from .io import ( + AvroSource, + BigQueryDestination, + BigQuerySource, + ContainerRegistryDestination, + CsvDestination, + CsvSource, + DirectUploadSource, + GcsDestination, + GcsSource, + GoogleDriveSource, + JiraSource, + SharePointSources, + SlackSource, + TFRecordDestination, + VertexMultimodalDatasetDestination, + VertexMultimodalDatasetSource, +) +from .job_service import ( + CancelBatchPredictionJobRequest, + CancelCustomJobRequest, + CancelDataLabelingJobRequest, + CancelHyperparameterTuningJobRequest, + CancelNasJobRequest, + CreateBatchPredictionJobRequest, + CreateCustomJobRequest, + CreateDataLabelingJobRequest, + CreateHyperparameterTuningJobRequest, + CreateModelDeploymentMonitoringJobRequest, + CreateNasJobRequest, + DeleteBatchPredictionJobRequest, + DeleteCustomJobRequest, + DeleteDataLabelingJobRequest, + DeleteHyperparameterTuningJobRequest, + DeleteModelDeploymentMonitoringJobRequest, + DeleteNasJobRequest, + GetBatchPredictionJobRequest, + GetCustomJobRequest, + GetDataLabelingJobRequest, + GetHyperparameterTuningJobRequest, + GetModelDeploymentMonitoringJobRequest, + GetNasJobRequest, + GetNasTrialDetailRequest, + ListBatchPredictionJobsRequest, + ListBatchPredictionJobsResponse, + ListCustomJobsRequest, + ListCustomJobsResponse, + ListDataLabelingJobsRequest, + ListDataLabelingJobsResponse, + ListHyperparameterTuningJobsRequest, + ListHyperparameterTuningJobsResponse, + ListModelDeploymentMonitoringJobsRequest, + ListModelDeploymentMonitoringJobsResponse, + ListNasJobsRequest, + ListNasJobsResponse, + ListNasTrialDetailsRequest, + ListNasTrialDetailsResponse, + PauseModelDeploymentMonitoringJobRequest, + ResumeModelDeploymentMonitoringJobRequest, + SearchModelDeploymentMonitoringStatsAnomaliesRequest, + SearchModelDeploymentMonitoringStatsAnomaliesResponse, + UpdateModelDeploymentMonitoringJobOperationMetadata, + UpdateModelDeploymentMonitoringJobRequest, +) +from .job_state import ( + JobState, +) +from .lineage_subgraph import ( + LineageSubgraph, +) +from .llm_utility_service import ( + ComputeTokensRequest, + ComputeTokensResponse, + TokensInfo, +) +from .machine_resources import ( + AutomaticResources, + AutoscalingMetricSpec, + BatchDedicatedResources, + DedicatedResources, + DiskSpec, + LustreMount, + MachineSpec, + NfsMount, + PersistentDiskSpec, + ResourcesConsumed, + ShieldedVmConfig, +) +from .manual_batch_tuning_parameters import ( + ManualBatchTuningParameters, +) +from .match_service import ( + FindNeighborsRequest, + FindNeighborsResponse, + ReadIndexDatapointsRequest, + ReadIndexDatapointsResponse, +) +from .metadata_schema import ( + MetadataSchema, +) +from .metadata_service import ( + AddContextArtifactsAndExecutionsRequest, + AddContextArtifactsAndExecutionsResponse, + AddContextChildrenRequest, + AddContextChildrenResponse, + AddExecutionEventsRequest, + AddExecutionEventsResponse, + CreateArtifactRequest, + CreateContextRequest, + CreateExecutionRequest, + CreateMetadataSchemaRequest, + CreateMetadataStoreOperationMetadata, + CreateMetadataStoreRequest, + DeleteArtifactRequest, + DeleteContextRequest, + DeleteExecutionRequest, + DeleteMetadataStoreOperationMetadata, + DeleteMetadataStoreRequest, + GetArtifactRequest, + GetContextRequest, + GetExecutionRequest, + GetMetadataSchemaRequest, + GetMetadataStoreRequest, + ListArtifactsRequest, + ListArtifactsResponse, + ListContextsRequest, + ListContextsResponse, + ListExecutionsRequest, + ListExecutionsResponse, + ListMetadataSchemasRequest, + ListMetadataSchemasResponse, + ListMetadataStoresRequest, + ListMetadataStoresResponse, + PurgeArtifactsMetadata, + PurgeArtifactsRequest, + PurgeArtifactsResponse, + PurgeContextsMetadata, + PurgeContextsRequest, + PurgeContextsResponse, + PurgeExecutionsMetadata, + PurgeExecutionsRequest, + PurgeExecutionsResponse, + QueryArtifactLineageSubgraphRequest, + QueryContextLineageSubgraphRequest, + QueryExecutionInputsAndOutputsRequest, + RemoveContextChildrenRequest, + RemoveContextChildrenResponse, + UpdateArtifactRequest, + UpdateContextRequest, + UpdateExecutionRequest, +) +from .metadata_store import ( + MetadataStore, +) +from .migratable_resource import ( + MigratableResource, +) +from .migration_service import ( + BatchMigrateResourcesOperationMetadata, + BatchMigrateResourcesRequest, + BatchMigrateResourcesResponse, + MigrateResourceRequest, + MigrateResourceResponse, + SearchMigratableResourcesRequest, + SearchMigratableResourcesResponse, +) +from .model import ( + Checkpoint, + GenieSource, + LargeModelReference, + Model, + ModelContainerSpec, + ModelGardenSource, + ModelSourceInfo, + Port, + PredictSchemata, + Probe, +) +from .model_deployment_monitoring_job import ( + ModelDeploymentMonitoringBigQueryTable, + ModelDeploymentMonitoringJob, + ModelDeploymentMonitoringObjectiveConfig, + ModelDeploymentMonitoringScheduleConfig, + ModelMonitoringStatsAnomalies, + ModelDeploymentMonitoringObjectiveType, +) +from .model_evaluation import ( + ModelEvaluation, +) +from .model_evaluation_slice import ( + ModelEvaluationSlice, +) +from .model_garden_service import ( + DeployOperationMetadata, + DeployRequest, + DeployResponse, + GetPublisherModelRequest, + PublisherModelView, +) +from .model_monitoring import ( + ModelMonitoringAlertConfig, + ModelMonitoringObjectiveConfig, + SamplingStrategy, + ThresholdConfig, +) +from .model_service import ( + BatchImportEvaluatedAnnotationsRequest, + BatchImportEvaluatedAnnotationsResponse, + BatchImportModelEvaluationSlicesRequest, + BatchImportModelEvaluationSlicesResponse, + CopyModelOperationMetadata, + CopyModelRequest, + CopyModelResponse, + DeleteModelRequest, + DeleteModelVersionRequest, + ExportModelOperationMetadata, + ExportModelRequest, + ExportModelResponse, + GetModelEvaluationRequest, + GetModelEvaluationSliceRequest, + GetModelRequest, + ImportModelEvaluationRequest, + ListModelEvaluationSlicesRequest, + ListModelEvaluationSlicesResponse, + ListModelEvaluationsRequest, + ListModelEvaluationsResponse, + ListModelsRequest, + ListModelsResponse, + ListModelVersionCheckpointsRequest, + ListModelVersionCheckpointsResponse, + ListModelVersionsRequest, + ListModelVersionsResponse, + MergeVersionAliasesRequest, + ModelVersionCheckpoint, + UpdateExplanationDatasetOperationMetadata, + UpdateExplanationDatasetRequest, + UpdateExplanationDatasetResponse, + UpdateModelRequest, + UploadModelOperationMetadata, + UploadModelRequest, + UploadModelResponse, +) +from .nas_job import ( + NasJob, + NasJobOutput, + NasJobSpec, + NasTrial, + NasTrialDetail, +) +from .network_spec import ( + NetworkSpec, +) +from .notebook_euc_config import ( + NotebookEucConfig, +) +from .notebook_execution_job import ( + NotebookExecutionJob, +) +from .notebook_idle_shutdown_config import ( + NotebookIdleShutdownConfig, +) +from .notebook_runtime import ( + NotebookRuntime, + NotebookRuntimeTemplate, + NotebookRuntimeType, +) +from .notebook_runtime_template_ref import ( + NotebookRuntimeTemplateRef, +) +from .notebook_service import ( + AssignNotebookRuntimeOperationMetadata, + AssignNotebookRuntimeRequest, + CreateNotebookExecutionJobOperationMetadata, + CreateNotebookExecutionJobRequest, + CreateNotebookRuntimeTemplateOperationMetadata, + CreateNotebookRuntimeTemplateRequest, + DeleteNotebookExecutionJobRequest, + DeleteNotebookRuntimeRequest, + DeleteNotebookRuntimeTemplateRequest, + GetNotebookExecutionJobRequest, + GetNotebookRuntimeRequest, + GetNotebookRuntimeTemplateRequest, + ListNotebookExecutionJobsRequest, + ListNotebookExecutionJobsResponse, + ListNotebookRuntimesRequest, + ListNotebookRuntimesResponse, + ListNotebookRuntimeTemplatesRequest, + ListNotebookRuntimeTemplatesResponse, + StartNotebookRuntimeOperationMetadata, + StartNotebookRuntimeRequest, + StartNotebookRuntimeResponse, + StopNotebookRuntimeOperationMetadata, + StopNotebookRuntimeRequest, + StopNotebookRuntimeResponse, + UpdateNotebookRuntimeTemplateRequest, + UpgradeNotebookRuntimeOperationMetadata, + UpgradeNotebookRuntimeRequest, + UpgradeNotebookRuntimeResponse, + NotebookExecutionJobView, +) +from .notebook_software_config import ( + ColabImage, + NotebookSoftwareConfig, + PostStartupScriptConfig, +) +from .openapi import ( + Schema, + Type, +) +from .operation import ( + DeleteOperationMetadata, + GenericOperationMetadata, +) +from .persistent_resource import ( + PersistentResource, + RayLogsSpec, + RayMetricSpec, + RaySpec, + ResourcePool, + ResourceRuntime, + ResourceRuntimeSpec, + ServiceAccountSpec, +) +from .persistent_resource_service import ( + CreatePersistentResourceOperationMetadata, + CreatePersistentResourceRequest, + DeletePersistentResourceRequest, + GetPersistentResourceRequest, + ListPersistentResourcesRequest, + ListPersistentResourcesResponse, + RebootPersistentResourceOperationMetadata, + RebootPersistentResourceRequest, + UpdatePersistentResourceOperationMetadata, + UpdatePersistentResourceRequest, +) +from .pipeline_failure_policy import ( + PipelineFailurePolicy, +) +from .pipeline_job import ( + PipelineJob, + PipelineJobDetail, + PipelineTaskDetail, + PipelineTaskExecutorDetail, + PipelineTemplateMetadata, +) +from .pipeline_service import ( + BatchCancelPipelineJobsOperationMetadata, + BatchCancelPipelineJobsRequest, + BatchCancelPipelineJobsResponse, + BatchDeletePipelineJobsRequest, + BatchDeletePipelineJobsResponse, + CancelPipelineJobRequest, + CancelTrainingPipelineRequest, + CreatePipelineJobRequest, + CreateTrainingPipelineRequest, + DeletePipelineJobRequest, + DeleteTrainingPipelineRequest, + GetPipelineJobRequest, + GetTrainingPipelineRequest, + ListPipelineJobsRequest, + ListPipelineJobsResponse, + ListTrainingPipelinesRequest, + ListTrainingPipelinesResponse, +) +from .pipeline_state import ( + PipelineState, +) +from .prediction_service import ( + CountTokensRequest, + CountTokensResponse, + DirectPredictRequest, + DirectPredictResponse, + DirectRawPredictRequest, + DirectRawPredictResponse, + EmbedContentRequest, + EmbedContentResponse, + ExplainRequest, + ExplainResponse, + GenerateContentRequest, + GenerateContentResponse, + PredictRequest, + PredictResponse, + RawPredictRequest, + StreamDirectPredictRequest, + StreamDirectPredictResponse, + StreamDirectRawPredictRequest, + StreamDirectRawPredictResponse, + StreamingPredictRequest, + StreamingPredictResponse, + StreamingRawPredictRequest, + StreamingRawPredictResponse, + StreamRawPredictRequest, +) +from .publisher_model import ( + PublisherModel, +) +from .reasoning_engine import ( + ReasoningEngine, + ReasoningEngineSpec, +) +from .reasoning_engine_execution_service import ( + AsyncQueryReasoningEngineOperationMetadata, + AsyncQueryReasoningEngineRequest, + AsyncQueryReasoningEngineResponse, + QueryReasoningEngineRequest, + QueryReasoningEngineResponse, + StreamQueryReasoningEngineRequest, +) +from .reasoning_engine_service import ( + CreateReasoningEngineOperationMetadata, + CreateReasoningEngineRequest, + DeleteReasoningEngineRequest, + GetReasoningEngineRequest, + ListReasoningEnginesRequest, + ListReasoningEnginesResponse, + UpdateReasoningEngineOperationMetadata, + UpdateReasoningEngineRequest, +) +from .reservation_affinity import ( + ReservationAffinity, +) +from .saved_query import ( + SavedQuery, +) +from .schedule import ( + Schedule, +) +from .schedule_service import ( + CreateScheduleRequest, + DeleteScheduleRequest, + GetScheduleRequest, + ListSchedulesRequest, + ListSchedulesResponse, + PauseScheduleRequest, + ResumeScheduleRequest, + UpdateScheduleRequest, +) +from .service_networking import ( + DnsPeeringConfig, + PrivateServiceConnectConfig, + PscAutomatedEndpoints, + PSCAutomationConfig, + PscInterfaceConfig, + PSCAutomationState, +) +from .session import ( + EventActions, + EventMetadata, + Session, + SessionEvent, + Transcription, +) +from .session_service import ( + AppendEventRequest, + AppendEventResponse, + CreateSessionOperationMetadata, + CreateSessionRequest, + DeleteSessionRequest, + GetSessionRequest, + ListEventsRequest, + ListEventsResponse, + ListSessionsRequest, + ListSessionsResponse, + UpdateSessionRequest, +) +from .specialist_pool import ( + SpecialistPool, +) +from .specialist_pool_service import ( + CreateSpecialistPoolOperationMetadata, + CreateSpecialistPoolRequest, + DeleteSpecialistPoolRequest, + GetSpecialistPoolRequest, + ListSpecialistPoolsRequest, + ListSpecialistPoolsResponse, + UpdateSpecialistPoolOperationMetadata, + UpdateSpecialistPoolRequest, +) +from .study import ( + Measurement, + Study, + StudySpec, + StudyTimeConstraint, + Trial, + TrialContext, +) +from .tensorboard import ( + Tensorboard, +) +from .tensorboard_data import ( + Scalar, + TensorboardBlob, + TensorboardBlobSequence, + TensorboardTensor, + TimeSeriesData, + TimeSeriesDataPoint, +) +from .tensorboard_experiment import ( + TensorboardExperiment, +) +from .tensorboard_run import ( + TensorboardRun, +) +from .tensorboard_service import ( + BatchCreateTensorboardRunsRequest, + BatchCreateTensorboardRunsResponse, + BatchCreateTensorboardTimeSeriesRequest, + BatchCreateTensorboardTimeSeriesResponse, + BatchReadTensorboardTimeSeriesDataRequest, + BatchReadTensorboardTimeSeriesDataResponse, + CreateTensorboardExperimentRequest, + CreateTensorboardOperationMetadata, + CreateTensorboardRequest, + CreateTensorboardRunRequest, + CreateTensorboardTimeSeriesRequest, + DeleteTensorboardExperimentRequest, + DeleteTensorboardRequest, + DeleteTensorboardRunRequest, + DeleteTensorboardTimeSeriesRequest, + ExportTensorboardTimeSeriesDataRequest, + ExportTensorboardTimeSeriesDataResponse, + GetTensorboardExperimentRequest, + GetTensorboardRequest, + GetTensorboardRunRequest, + GetTensorboardTimeSeriesRequest, + ListTensorboardExperimentsRequest, + ListTensorboardExperimentsResponse, + ListTensorboardRunsRequest, + ListTensorboardRunsResponse, + ListTensorboardsRequest, + ListTensorboardsResponse, + ListTensorboardTimeSeriesRequest, + ListTensorboardTimeSeriesResponse, + ReadTensorboardBlobDataRequest, + ReadTensorboardBlobDataResponse, + ReadTensorboardSizeRequest, + ReadTensorboardSizeResponse, + ReadTensorboardTimeSeriesDataRequest, + ReadTensorboardTimeSeriesDataResponse, + ReadTensorboardUsageRequest, + ReadTensorboardUsageResponse, + UpdateTensorboardExperimentRequest, + UpdateTensorboardOperationMetadata, + UpdateTensorboardRequest, + UpdateTensorboardRunRequest, + UpdateTensorboardTimeSeriesRequest, + WriteTensorboardExperimentDataRequest, + WriteTensorboardExperimentDataResponse, + WriteTensorboardRunDataRequest, + WriteTensorboardRunDataResponse, +) +from .tensorboard_time_series import ( + TensorboardTimeSeries, +) +from .tool import ( + CodeExecutionResult, + DynamicRetrievalConfig, + EnterpriseWebSearch, + ExecutableCode, + FunctionCall, + FunctionCallingConfig, + FunctionDeclaration, + FunctionResponse, + FunctionResponseBlob, + FunctionResponseFileData, + FunctionResponsePart, + GoogleMaps, + GoogleSearchRetrieval, + PartialArg, + RagRetrievalConfig, + Retrieval, + RetrievalConfig, + Tool, + ToolConfig, + UrlContext, + VertexAISearch, + VertexRagStore, +) +from .training_pipeline import ( + FilterSplit, + FractionSplit, + InputDataConfig, + PredefinedSplit, + StratifiedSplit, + TimestampSplit, + TrainingPipeline, +) +from .tuning_job import ( + EvaluateDatasetRun, + EvaluationConfig, + PreTunedModel, + SupervisedHyperParameters, + SupervisedTuningDatasetDistribution, + SupervisedTuningDataStats, + SupervisedTuningSpec, + TunedModel, + TunedModelCheckpoint, + TunedModelRef, + TuningDataStats, + TuningJob, +) +from .types import ( + BoolArray, + DoubleArray, + Int64Array, + StringArray, + Tensor, +) +from .unmanaged_container_model import ( + UnmanagedContainerModel, +) +from .usage_metadata import ( + UsageMetadata, +) +from .user_action_reference import ( + UserActionReference, +) +from .value import ( + Value, +) +from .vertex_rag_data import ( + CorpusStatus, + FileStatus, + ImportRagFilesConfig, + RagChunk, + RagCorpus, + RagEmbeddingModelConfig, + RagEngineConfig, + RagFile, + RagFileChunkingConfig, + RagFileParsingConfig, + RagFileTransformationConfig, + RagManagedDbConfig, + RagVectorDbConfig, + UploadRagFileConfig, + VertexAiSearchConfig, +) +from .vertex_rag_data_service import ( + CreateRagCorpusOperationMetadata, + CreateRagCorpusRequest, + DeleteRagCorpusRequest, + DeleteRagFileRequest, + GetRagCorpusRequest, + GetRagEngineConfigRequest, + GetRagFileRequest, + ImportRagFilesOperationMetadata, + ImportRagFilesRequest, + ImportRagFilesResponse, + ListRagCorporaRequest, + ListRagCorporaResponse, + ListRagFilesRequest, + ListRagFilesResponse, + UpdateRagCorpusOperationMetadata, + UpdateRagCorpusRequest, + UpdateRagEngineConfigOperationMetadata, + UpdateRagEngineConfigRequest, + UploadRagFileRequest, + UploadRagFileResponse, +) +from .vertex_rag_service import ( + AskContextsRequest, + AskContextsResponse, + AsyncRetrieveContextsOperationMetadata, + AsyncRetrieveContextsRequest, + AsyncRetrieveContextsResponse, + AugmentPromptRequest, + AugmentPromptResponse, + Claim, + CorroborateContentRequest, + CorroborateContentResponse, + Fact, + RagContexts, + RagQuery, + RetrieveContextsRequest, + RetrieveContextsResponse, +) +from .vizier_service import ( + AddTrialMeasurementRequest, + CheckTrialEarlyStoppingStateMetatdata, + CheckTrialEarlyStoppingStateRequest, + CheckTrialEarlyStoppingStateResponse, + CompleteTrialRequest, + CreateStudyRequest, + CreateTrialRequest, + DeleteStudyRequest, + DeleteTrialRequest, + GetStudyRequest, + GetTrialRequest, + ListOptimalTrialsRequest, + ListOptimalTrialsResponse, + ListStudiesRequest, + ListStudiesResponse, + ListTrialsRequest, + ListTrialsResponse, + LookupStudyRequest, + StopTrialRequest, + SuggestTrialsMetadata, + SuggestTrialsRequest, + SuggestTrialsResponse, +) + +__all__ = ( + "AcceleratorType", + "Annotation", + "AnnotationSpec", + "ApiAuth", + "Artifact", + "BatchPredictionJob", + "CachedContent", + "CompletionStats", + "Blob", + "Candidate", + "Citation", + "CitationMetadata", + "Content", + "FileData", + "GenerationConfig", + "GroundingChunk", + "GroundingMetadata", + "GroundingSupport", + "ImageConfig", + "LogprobsResult", + "ModalityTokenCount", + "ModelArmorConfig", + "MultiSpeakerVoiceConfig", + "Part", + "PrebuiltVoiceConfig", + "ReplicatedVoiceConfig", + "RetrievalMetadata", + "SafetyRating", + "SafetySetting", + "SearchEntryPoint", + "Segment", + "SpeakerVoiceConfig", + "SpeechConfig", + "UrlContextMetadata", + "UrlMetadata", + "VideoMetadata", + "VoiceConfig", + "HarmCategory", + "Modality", + "Context", + "ContainerSpec", + "CustomJob", + "CustomJobSpec", + "PythonPackageSpec", + "Scheduling", + "WorkerPoolSpec", + "GenerateSyntheticDataRequest", + "GenerateSyntheticDataResponse", + "OutputFieldSpec", + "SyntheticExample", + "SyntheticField", + "TaskDescriptionStrategy", + "DataItem", + "ActiveLearningConfig", + "DataLabelingJob", + "SampleConfig", + "TrainingConfig", + "Dataset", + "ExportDataConfig", + "ExportFilterSplit", + "ExportFractionSplit", + "ImportDataConfig", + "CreateDatasetOperationMetadata", + "CreateDatasetRequest", + "CreateDatasetVersionOperationMetadata", + "CreateDatasetVersionRequest", + "DataItemView", + "DeleteDatasetRequest", + "DeleteDatasetVersionRequest", + "DeleteSavedQueryRequest", + "ExportDataOperationMetadata", + "ExportDataRequest", + "ExportDataResponse", + "GetAnnotationSpecRequest", + "GetDatasetRequest", + "GetDatasetVersionRequest", + "ImportDataOperationMetadata", + "ImportDataRequest", + "ImportDataResponse", + "ListAnnotationsRequest", + "ListAnnotationsResponse", + "ListDataItemsRequest", + "ListDataItemsResponse", + "ListDatasetsRequest", + "ListDatasetsResponse", + "ListDatasetVersionsRequest", + "ListDatasetVersionsResponse", + "ListSavedQueriesRequest", + "ListSavedQueriesResponse", + "RestoreDatasetVersionOperationMetadata", + "RestoreDatasetVersionRequest", + "SearchDataItemsRequest", + "SearchDataItemsResponse", + "UpdateDatasetRequest", + "UpdateDatasetVersionRequest", + "DatasetVersion", + "DeployedIndexRef", + "DeployedModelRef", + "DeploymentResourcePool", + "CreateDeploymentResourcePoolOperationMetadata", + "CreateDeploymentResourcePoolRequest", + "DeleteDeploymentResourcePoolRequest", + "GetDeploymentResourcePoolRequest", + "ListDeploymentResourcePoolsRequest", + "ListDeploymentResourcePoolsResponse", + "QueryDeployedModelsRequest", + "QueryDeployedModelsResponse", + "UpdateDeploymentResourcePoolOperationMetadata", + "UpdateDeploymentResourcePoolRequest", + "DeploymentStage", + "EncryptionSpec", + "ClientConnectionConfig", + "DeployedModel", + "Endpoint", + "FasterDeploymentConfig", + "GenAiAdvancedFeaturesConfig", + "PredictRequestResponseLoggingConfig", + "PrivateEndpoints", + "SpeculativeDecodingSpec", + "CreateEndpointOperationMetadata", + "CreateEndpointRequest", + "DeleteEndpointRequest", + "DeployModelOperationMetadata", + "DeployModelRequest", + "DeployModelResponse", + "GetEndpointRequest", + "ListEndpointsRequest", + "ListEndpointsResponse", + "MutateDeployedModelOperationMetadata", + "MutateDeployedModelRequest", + "MutateDeployedModelResponse", + "UndeployModelOperationMetadata", + "UndeployModelRequest", + "UndeployModelResponse", + "UpdateEndpointLongRunningRequest", + "UpdateEndpointOperationMetadata", + "UpdateEndpointRequest", + "EntityType", + "EnvVar", + "SecretEnvVar", + "SecretRef", + "ErrorAnalysisAnnotation", + "EvaluatedAnnotation", + "EvaluatedAnnotationExplanation", + "AggregationOutput", + "AggregationResult", + "AutoraterConfig", + "BleuInput", + "BleuInstance", + "BleuMetricValue", + "BleuResults", + "BleuSpec", + "CoherenceInput", + "CoherenceInstance", + "CoherenceResult", + "CoherenceSpec", + "CometInput", + "CometInstance", + "CometResult", + "CometSpec", + "ComputationBasedMetricSpec", + "ContentMap", + "CustomOutput", + "CustomOutputFormatConfig", + "EvaluateDatasetResponse", + "EvaluateInstancesRequest", + "EvaluateInstancesResponse", + "EvaluationDataset", + "ExactMatchInput", + "ExactMatchInstance", + "ExactMatchMetricValue", + "ExactMatchResults", + "ExactMatchSpec", + "FluencyInput", + "FluencyInstance", + "FluencyResult", + "FluencySpec", + "FulfillmentInput", + "FulfillmentInstance", + "FulfillmentResult", + "FulfillmentSpec", + "GroundednessInput", + "GroundednessInstance", + "GroundednessResult", + "GroundednessSpec", + "LLMBasedMetricSpec", + "Metric", + "MetricResult", + "MetricxInput", + "MetricxInstance", + "MetricxResult", + "MetricxSpec", + "OutputConfig", + "OutputInfo", + "PairwiseMetricInput", + "PairwiseMetricInstance", + "PairwiseMetricResult", + "PairwiseMetricSpec", + "PairwiseQuestionAnsweringQualityInput", + "PairwiseQuestionAnsweringQualityInstance", + "PairwiseQuestionAnsweringQualityResult", + "PairwiseQuestionAnsweringQualitySpec", + "PairwiseSummarizationQualityInput", + "PairwiseSummarizationQualityInstance", + "PairwiseSummarizationQualityResult", + "PairwiseSummarizationQualitySpec", + "PointwiseMetricInput", + "PointwiseMetricInstance", + "PointwiseMetricResult", + "PointwiseMetricSpec", + "PredefinedMetricSpec", + "QuestionAnsweringCorrectnessInput", + "QuestionAnsweringCorrectnessInstance", + "QuestionAnsweringCorrectnessResult", + "QuestionAnsweringCorrectnessSpec", + "QuestionAnsweringHelpfulnessInput", + "QuestionAnsweringHelpfulnessInstance", + "QuestionAnsweringHelpfulnessResult", + "QuestionAnsweringHelpfulnessSpec", + "QuestionAnsweringQualityInput", + "QuestionAnsweringQualityInstance", + "QuestionAnsweringQualityResult", + "QuestionAnsweringQualitySpec", + "QuestionAnsweringRelevanceInput", + "QuestionAnsweringRelevanceInstance", + "QuestionAnsweringRelevanceResult", + "QuestionAnsweringRelevanceSpec", + "RawOutput", + "RougeInput", + "RougeInstance", + "RougeMetricValue", + "RougeResults", + "RougeSpec", + "SafetyInput", + "SafetyInstance", + "SafetyResult", + "SafetySpec", + "SummarizationHelpfulnessInput", + "SummarizationHelpfulnessInstance", + "SummarizationHelpfulnessResult", + "SummarizationHelpfulnessSpec", + "SummarizationQualityInput", + "SummarizationQualityInstance", + "SummarizationQualityResult", + "SummarizationQualitySpec", + "SummarizationVerbosityInput", + "SummarizationVerbosityInstance", + "SummarizationVerbosityResult", + "SummarizationVerbositySpec", + "ToolCallValidInput", + "ToolCallValidInstance", + "ToolCallValidMetricValue", + "ToolCallValidResults", + "ToolCallValidSpec", + "ToolNameMatchInput", + "ToolNameMatchInstance", + "ToolNameMatchMetricValue", + "ToolNameMatchResults", + "ToolNameMatchSpec", + "ToolParameterKeyMatchInput", + "ToolParameterKeyMatchInstance", + "ToolParameterKeyMatchMetricValue", + "ToolParameterKeyMatchResults", + "ToolParameterKeyMatchSpec", + "ToolParameterKVMatchInput", + "ToolParameterKVMatchInstance", + "ToolParameterKVMatchMetricValue", + "ToolParameterKVMatchResults", + "ToolParameterKVMatchSpec", + "PairwiseChoice", + "Event", + "Execution", + "Attribution", + "BlurBaselineConfig", + "Examples", + "ExamplesOverride", + "ExamplesRestrictionsNamespace", + "Explanation", + "ExplanationMetadataOverride", + "ExplanationParameters", + "ExplanationSpec", + "ExplanationSpecOverride", + "FeatureNoiseSigma", + "IntegratedGradientsAttribution", + "ModelExplanation", + "Neighbor", + "Presets", + "SampledShapleyAttribution", + "SmoothGradConfig", + "XraiAttribution", + "ExplanationMetadata", + "Feature", + "FeatureGroup", + "FeatureStatsAnomaly", + "FeatureOnlineStore", + "CreateFeatureOnlineStoreOperationMetadata", + "CreateFeatureOnlineStoreRequest", + "CreateFeatureViewOperationMetadata", + "CreateFeatureViewRequest", + "DeleteFeatureOnlineStoreRequest", + "DeleteFeatureViewRequest", + "GetFeatureOnlineStoreRequest", + "GetFeatureViewRequest", + "GetFeatureViewSyncRequest", + "ListFeatureOnlineStoresRequest", + "ListFeatureOnlineStoresResponse", + "ListFeatureViewsRequest", + "ListFeatureViewsResponse", + "ListFeatureViewSyncsRequest", + "ListFeatureViewSyncsResponse", + "SyncFeatureViewRequest", + "SyncFeatureViewResponse", + "UpdateFeatureOnlineStoreOperationMetadata", + "UpdateFeatureOnlineStoreRequest", + "UpdateFeatureViewOperationMetadata", + "UpdateFeatureViewRequest", + "FeatureViewDataKey", + "FeatureViewDirectWriteRequest", + "FeatureViewDirectWriteResponse", + "FetchFeatureValuesRequest", + "FetchFeatureValuesResponse", + "GenerateFetchAccessTokenRequest", + "GenerateFetchAccessTokenResponse", + "NearestNeighborQuery", + "NearestNeighbors", + "SearchNearestEntitiesRequest", + "SearchNearestEntitiesResponse", + "FeatureViewDataFormat", + "CreateFeatureGroupOperationMetadata", + "CreateFeatureGroupRequest", + "CreateRegistryFeatureOperationMetadata", + "DeleteFeatureGroupRequest", + "GetFeatureGroupRequest", + "ListFeatureGroupsRequest", + "ListFeatureGroupsResponse", + "UpdateFeatureGroupOperationMetadata", + "UpdateFeatureGroupRequest", + "UpdateFeatureOperationMetadata", + "FeatureSelector", + "IdMatcher", + "FeatureView", + "FeatureViewSync", + "Featurestore", + "FeaturestoreMonitoringConfig", + "FeatureValue", + "FeatureValueList", + "ReadFeatureValuesRequest", + "ReadFeatureValuesResponse", + "StreamingReadFeatureValuesRequest", + "StructFieldValue", + "StructValue", + "WriteFeatureValuesPayload", + "WriteFeatureValuesRequest", + "WriteFeatureValuesResponse", + "BatchCreateFeaturesOperationMetadata", + "BatchCreateFeaturesRequest", + "BatchCreateFeaturesResponse", + "BatchReadFeatureValuesOperationMetadata", + "BatchReadFeatureValuesRequest", + "BatchReadFeatureValuesResponse", + "CreateEntityTypeOperationMetadata", + "CreateEntityTypeRequest", + "CreateFeatureOperationMetadata", + "CreateFeatureRequest", + "CreateFeaturestoreOperationMetadata", + "CreateFeaturestoreRequest", + "DeleteEntityTypeRequest", + "DeleteFeatureRequest", + "DeleteFeaturestoreRequest", + "DeleteFeatureValuesOperationMetadata", + "DeleteFeatureValuesRequest", + "DeleteFeatureValuesResponse", + "DestinationFeatureSetting", + "EntityIdSelector", + "ExportFeatureValuesOperationMetadata", + "ExportFeatureValuesRequest", + "ExportFeatureValuesResponse", + "FeatureValueDestination", + "GetEntityTypeRequest", + "GetFeatureRequest", + "GetFeaturestoreRequest", + "ImportFeatureValuesOperationMetadata", + "ImportFeatureValuesRequest", + "ImportFeatureValuesResponse", + "ListEntityTypesRequest", + "ListEntityTypesResponse", + "ListFeaturesRequest", + "ListFeaturesResponse", + "ListFeaturestoresRequest", + "ListFeaturestoresResponse", + "SearchFeaturesRequest", + "SearchFeaturesResponse", + "UpdateEntityTypeRequest", + "UpdateFeatureRequest", + "UpdateFeaturestoreOperationMetadata", + "UpdateFeaturestoreRequest", + "CreateCachedContentRequest", + "DeleteCachedContentRequest", + "GetCachedContentRequest", + "ListCachedContentsRequest", + "ListCachedContentsResponse", + "UpdateCachedContentRequest", + "CancelTuningJobRequest", + "CreateTuningJobRequest", + "GetTuningJobRequest", + "ListTuningJobsRequest", + "ListTuningJobsResponse", + "RebaseTunedModelOperationMetadata", + "RebaseTunedModelRequest", + "HyperparameterTuningJob", + "Index", + "IndexDatapoint", + "IndexStats", + "DeployedIndex", + "DeployedIndexAuthConfig", + "IndexEndpoint", + "IndexPrivateEndpoints", + "CreateIndexEndpointOperationMetadata", + "CreateIndexEndpointRequest", + "DeleteIndexEndpointRequest", + "DeployIndexOperationMetadata", + "DeployIndexRequest", + "DeployIndexResponse", + "GetIndexEndpointRequest", + "ListIndexEndpointsRequest", + "ListIndexEndpointsResponse", + "MutateDeployedIndexOperationMetadata", + "MutateDeployedIndexRequest", + "MutateDeployedIndexResponse", + "UndeployIndexOperationMetadata", + "UndeployIndexRequest", + "UndeployIndexResponse", + "UpdateIndexEndpointRequest", + "CreateIndexOperationMetadata", + "CreateIndexRequest", + "DeleteIndexRequest", + "GetIndexRequest", + "ListIndexesRequest", + "ListIndexesResponse", + "NearestNeighborSearchOperationMetadata", + "RemoveDatapointsRequest", + "RemoveDatapointsResponse", + "UpdateIndexOperationMetadata", + "UpdateIndexRequest", + "UpsertDatapointsRequest", + "UpsertDatapointsResponse", + "AvroSource", + "BigQueryDestination", + "BigQuerySource", + "ContainerRegistryDestination", + "CsvDestination", + "CsvSource", + "DirectUploadSource", + "GcsDestination", + "GcsSource", + "GoogleDriveSource", + "JiraSource", + "SharePointSources", + "SlackSource", + "TFRecordDestination", + "VertexMultimodalDatasetDestination", + "VertexMultimodalDatasetSource", + "CancelBatchPredictionJobRequest", + "CancelCustomJobRequest", + "CancelDataLabelingJobRequest", + "CancelHyperparameterTuningJobRequest", + "CancelNasJobRequest", + "CreateBatchPredictionJobRequest", + "CreateCustomJobRequest", + "CreateDataLabelingJobRequest", + "CreateHyperparameterTuningJobRequest", + "CreateModelDeploymentMonitoringJobRequest", + "CreateNasJobRequest", + "DeleteBatchPredictionJobRequest", + "DeleteCustomJobRequest", + "DeleteDataLabelingJobRequest", + "DeleteHyperparameterTuningJobRequest", + "DeleteModelDeploymentMonitoringJobRequest", + "DeleteNasJobRequest", + "GetBatchPredictionJobRequest", + "GetCustomJobRequest", + "GetDataLabelingJobRequest", + "GetHyperparameterTuningJobRequest", + "GetModelDeploymentMonitoringJobRequest", + "GetNasJobRequest", + "GetNasTrialDetailRequest", + "ListBatchPredictionJobsRequest", + "ListBatchPredictionJobsResponse", + "ListCustomJobsRequest", + "ListCustomJobsResponse", + "ListDataLabelingJobsRequest", + "ListDataLabelingJobsResponse", + "ListHyperparameterTuningJobsRequest", + "ListHyperparameterTuningJobsResponse", + "ListModelDeploymentMonitoringJobsRequest", + "ListModelDeploymentMonitoringJobsResponse", + "ListNasJobsRequest", + "ListNasJobsResponse", + "ListNasTrialDetailsRequest", + "ListNasTrialDetailsResponse", + "PauseModelDeploymentMonitoringJobRequest", + "ResumeModelDeploymentMonitoringJobRequest", + "SearchModelDeploymentMonitoringStatsAnomaliesRequest", + "SearchModelDeploymentMonitoringStatsAnomaliesResponse", + "UpdateModelDeploymentMonitoringJobOperationMetadata", + "UpdateModelDeploymentMonitoringJobRequest", + "JobState", + "LineageSubgraph", + "ComputeTokensRequest", + "ComputeTokensResponse", + "TokensInfo", + "AutomaticResources", + "AutoscalingMetricSpec", + "BatchDedicatedResources", + "DedicatedResources", + "DiskSpec", + "LustreMount", + "MachineSpec", + "NfsMount", + "PersistentDiskSpec", + "ResourcesConsumed", + "ShieldedVmConfig", + "ManualBatchTuningParameters", + "FindNeighborsRequest", + "FindNeighborsResponse", + "ReadIndexDatapointsRequest", + "ReadIndexDatapointsResponse", + "MetadataSchema", + "AddContextArtifactsAndExecutionsRequest", + "AddContextArtifactsAndExecutionsResponse", + "AddContextChildrenRequest", + "AddContextChildrenResponse", + "AddExecutionEventsRequest", + "AddExecutionEventsResponse", + "CreateArtifactRequest", + "CreateContextRequest", + "CreateExecutionRequest", + "CreateMetadataSchemaRequest", + "CreateMetadataStoreOperationMetadata", + "CreateMetadataStoreRequest", + "DeleteArtifactRequest", + "DeleteContextRequest", + "DeleteExecutionRequest", + "DeleteMetadataStoreOperationMetadata", + "DeleteMetadataStoreRequest", + "GetArtifactRequest", + "GetContextRequest", + "GetExecutionRequest", + "GetMetadataSchemaRequest", + "GetMetadataStoreRequest", + "ListArtifactsRequest", + "ListArtifactsResponse", + "ListContextsRequest", + "ListContextsResponse", + "ListExecutionsRequest", + "ListExecutionsResponse", + "ListMetadataSchemasRequest", + "ListMetadataSchemasResponse", + "ListMetadataStoresRequest", + "ListMetadataStoresResponse", + "PurgeArtifactsMetadata", + "PurgeArtifactsRequest", + "PurgeArtifactsResponse", + "PurgeContextsMetadata", + "PurgeContextsRequest", + "PurgeContextsResponse", + "PurgeExecutionsMetadata", + "PurgeExecutionsRequest", + "PurgeExecutionsResponse", + "QueryArtifactLineageSubgraphRequest", + "QueryContextLineageSubgraphRequest", + "QueryExecutionInputsAndOutputsRequest", + "RemoveContextChildrenRequest", + "RemoveContextChildrenResponse", + "UpdateArtifactRequest", + "UpdateContextRequest", + "UpdateExecutionRequest", + "MetadataStore", + "MigratableResource", + "BatchMigrateResourcesOperationMetadata", + "BatchMigrateResourcesRequest", + "BatchMigrateResourcesResponse", + "MigrateResourceRequest", + "MigrateResourceResponse", + "SearchMigratableResourcesRequest", + "SearchMigratableResourcesResponse", + "Checkpoint", + "GenieSource", + "LargeModelReference", + "Model", + "ModelContainerSpec", + "ModelGardenSource", + "ModelSourceInfo", + "Port", + "PredictSchemata", + "Probe", + "ModelDeploymentMonitoringBigQueryTable", + "ModelDeploymentMonitoringJob", + "ModelDeploymentMonitoringObjectiveConfig", + "ModelDeploymentMonitoringScheduleConfig", + "ModelMonitoringStatsAnomalies", + "ModelDeploymentMonitoringObjectiveType", + "ModelEvaluation", + "ModelEvaluationSlice", + "DeployOperationMetadata", + "DeployRequest", + "DeployResponse", + "GetPublisherModelRequest", + "PublisherModelView", + "ModelMonitoringAlertConfig", + "ModelMonitoringObjectiveConfig", + "SamplingStrategy", + "ThresholdConfig", + "BatchImportEvaluatedAnnotationsRequest", + "BatchImportEvaluatedAnnotationsResponse", + "BatchImportModelEvaluationSlicesRequest", + "BatchImportModelEvaluationSlicesResponse", + "CopyModelOperationMetadata", + "CopyModelRequest", + "CopyModelResponse", + "DeleteModelRequest", + "DeleteModelVersionRequest", + "ExportModelOperationMetadata", + "ExportModelRequest", + "ExportModelResponse", + "GetModelEvaluationRequest", + "GetModelEvaluationSliceRequest", + "GetModelRequest", + "ImportModelEvaluationRequest", + "ListModelEvaluationSlicesRequest", + "ListModelEvaluationSlicesResponse", + "ListModelEvaluationsRequest", + "ListModelEvaluationsResponse", + "ListModelsRequest", + "ListModelsResponse", + "ListModelVersionCheckpointsRequest", + "ListModelVersionCheckpointsResponse", + "ListModelVersionsRequest", + "ListModelVersionsResponse", + "MergeVersionAliasesRequest", + "ModelVersionCheckpoint", + "UpdateExplanationDatasetOperationMetadata", + "UpdateExplanationDatasetRequest", + "UpdateExplanationDatasetResponse", + "UpdateModelRequest", + "UploadModelOperationMetadata", + "UploadModelRequest", + "UploadModelResponse", + "NasJob", + "NasJobOutput", + "NasJobSpec", + "NasTrial", + "NasTrialDetail", + "NetworkSpec", + "NotebookEucConfig", + "NotebookExecutionJob", + "NotebookIdleShutdownConfig", + "NotebookRuntime", + "NotebookRuntimeTemplate", + "NotebookRuntimeType", + "NotebookRuntimeTemplateRef", + "AssignNotebookRuntimeOperationMetadata", + "AssignNotebookRuntimeRequest", + "CreateNotebookExecutionJobOperationMetadata", + "CreateNotebookExecutionJobRequest", + "CreateNotebookRuntimeTemplateOperationMetadata", + "CreateNotebookRuntimeTemplateRequest", + "DeleteNotebookExecutionJobRequest", + "DeleteNotebookRuntimeRequest", + "DeleteNotebookRuntimeTemplateRequest", + "GetNotebookExecutionJobRequest", + "GetNotebookRuntimeRequest", + "GetNotebookRuntimeTemplateRequest", + "ListNotebookExecutionJobsRequest", + "ListNotebookExecutionJobsResponse", + "ListNotebookRuntimesRequest", + "ListNotebookRuntimesResponse", + "ListNotebookRuntimeTemplatesRequest", + "ListNotebookRuntimeTemplatesResponse", + "StartNotebookRuntimeOperationMetadata", + "StartNotebookRuntimeRequest", + "StartNotebookRuntimeResponse", + "StopNotebookRuntimeOperationMetadata", + "StopNotebookRuntimeRequest", + "StopNotebookRuntimeResponse", + "UpdateNotebookRuntimeTemplateRequest", + "UpgradeNotebookRuntimeOperationMetadata", + "UpgradeNotebookRuntimeRequest", + "UpgradeNotebookRuntimeResponse", + "NotebookExecutionJobView", + "ColabImage", + "NotebookSoftwareConfig", + "PostStartupScriptConfig", + "Schema", + "Type", + "DeleteOperationMetadata", + "GenericOperationMetadata", + "PersistentResource", + "RayLogsSpec", + "RayMetricSpec", + "RaySpec", + "ResourcePool", + "ResourceRuntime", + "ResourceRuntimeSpec", + "ServiceAccountSpec", + "CreatePersistentResourceOperationMetadata", + "CreatePersistentResourceRequest", + "DeletePersistentResourceRequest", + "GetPersistentResourceRequest", + "ListPersistentResourcesRequest", + "ListPersistentResourcesResponse", + "RebootPersistentResourceOperationMetadata", + "RebootPersistentResourceRequest", + "UpdatePersistentResourceOperationMetadata", + "UpdatePersistentResourceRequest", + "PipelineFailurePolicy", + "PipelineJob", + "PipelineJobDetail", + "PipelineTaskDetail", + "PipelineTaskExecutorDetail", + "PipelineTemplateMetadata", + "BatchCancelPipelineJobsOperationMetadata", + "BatchCancelPipelineJobsRequest", + "BatchCancelPipelineJobsResponse", + "BatchDeletePipelineJobsRequest", + "BatchDeletePipelineJobsResponse", + "CancelPipelineJobRequest", + "CancelTrainingPipelineRequest", + "CreatePipelineJobRequest", + "CreateTrainingPipelineRequest", + "DeletePipelineJobRequest", + "DeleteTrainingPipelineRequest", + "GetPipelineJobRequest", + "GetTrainingPipelineRequest", + "ListPipelineJobsRequest", + "ListPipelineJobsResponse", + "ListTrainingPipelinesRequest", + "ListTrainingPipelinesResponse", + "PipelineState", + "CountTokensRequest", + "CountTokensResponse", + "DirectPredictRequest", + "DirectPredictResponse", + "DirectRawPredictRequest", + "DirectRawPredictResponse", + "EmbedContentRequest", + "EmbedContentResponse", + "ExplainRequest", + "ExplainResponse", + "GenerateContentRequest", + "GenerateContentResponse", + "PredictRequest", + "PredictResponse", + "RawPredictRequest", + "StreamDirectPredictRequest", + "StreamDirectPredictResponse", + "StreamDirectRawPredictRequest", + "StreamDirectRawPredictResponse", + "StreamingPredictRequest", + "StreamingPredictResponse", + "StreamingRawPredictRequest", + "StreamingRawPredictResponse", + "StreamRawPredictRequest", + "PublisherModel", + "ReasoningEngine", + "ReasoningEngineSpec", + "AsyncQueryReasoningEngineOperationMetadata", + "AsyncQueryReasoningEngineRequest", + "AsyncQueryReasoningEngineResponse", + "QueryReasoningEngineRequest", + "QueryReasoningEngineResponse", + "StreamQueryReasoningEngineRequest", + "CreateReasoningEngineOperationMetadata", + "CreateReasoningEngineRequest", + "DeleteReasoningEngineRequest", + "GetReasoningEngineRequest", + "ListReasoningEnginesRequest", + "ListReasoningEnginesResponse", + "UpdateReasoningEngineOperationMetadata", + "UpdateReasoningEngineRequest", + "ReservationAffinity", + "SavedQuery", + "Schedule", + "CreateScheduleRequest", + "DeleteScheduleRequest", + "GetScheduleRequest", + "ListSchedulesRequest", + "ListSchedulesResponse", + "PauseScheduleRequest", + "ResumeScheduleRequest", + "UpdateScheduleRequest", + "DnsPeeringConfig", + "PrivateServiceConnectConfig", + "PscAutomatedEndpoints", + "PSCAutomationConfig", + "PscInterfaceConfig", + "PSCAutomationState", + "EventActions", + "EventMetadata", + "Session", + "SessionEvent", + "Transcription", + "AppendEventRequest", + "AppendEventResponse", + "CreateSessionOperationMetadata", + "CreateSessionRequest", + "DeleteSessionRequest", + "GetSessionRequest", + "ListEventsRequest", + "ListEventsResponse", + "ListSessionsRequest", + "ListSessionsResponse", + "UpdateSessionRequest", + "SpecialistPool", + "CreateSpecialistPoolOperationMetadata", + "CreateSpecialistPoolRequest", + "DeleteSpecialistPoolRequest", + "GetSpecialistPoolRequest", + "ListSpecialistPoolsRequest", + "ListSpecialistPoolsResponse", + "UpdateSpecialistPoolOperationMetadata", + "UpdateSpecialistPoolRequest", + "Measurement", + "Study", + "StudySpec", + "StudyTimeConstraint", + "Trial", + "TrialContext", + "Tensorboard", + "Scalar", + "TensorboardBlob", + "TensorboardBlobSequence", + "TensorboardTensor", + "TimeSeriesData", + "TimeSeriesDataPoint", + "TensorboardExperiment", + "TensorboardRun", + "BatchCreateTensorboardRunsRequest", + "BatchCreateTensorboardRunsResponse", + "BatchCreateTensorboardTimeSeriesRequest", + "BatchCreateTensorboardTimeSeriesResponse", + "BatchReadTensorboardTimeSeriesDataRequest", + "BatchReadTensorboardTimeSeriesDataResponse", + "CreateTensorboardExperimentRequest", + "CreateTensorboardOperationMetadata", + "CreateTensorboardRequest", + "CreateTensorboardRunRequest", + "CreateTensorboardTimeSeriesRequest", + "DeleteTensorboardExperimentRequest", + "DeleteTensorboardRequest", + "DeleteTensorboardRunRequest", + "DeleteTensorboardTimeSeriesRequest", + "ExportTensorboardTimeSeriesDataRequest", + "ExportTensorboardTimeSeriesDataResponse", + "GetTensorboardExperimentRequest", + "GetTensorboardRequest", + "GetTensorboardRunRequest", + "GetTensorboardTimeSeriesRequest", + "ListTensorboardExperimentsRequest", + "ListTensorboardExperimentsResponse", + "ListTensorboardRunsRequest", + "ListTensorboardRunsResponse", + "ListTensorboardsRequest", + "ListTensorboardsResponse", + "ListTensorboardTimeSeriesRequest", + "ListTensorboardTimeSeriesResponse", + "ReadTensorboardBlobDataRequest", + "ReadTensorboardBlobDataResponse", + "ReadTensorboardSizeRequest", + "ReadTensorboardSizeResponse", + "ReadTensorboardTimeSeriesDataRequest", + "ReadTensorboardTimeSeriesDataResponse", + "ReadTensorboardUsageRequest", + "ReadTensorboardUsageResponse", + "UpdateTensorboardExperimentRequest", + "UpdateTensorboardOperationMetadata", + "UpdateTensorboardRequest", + "UpdateTensorboardRunRequest", + "UpdateTensorboardTimeSeriesRequest", + "WriteTensorboardExperimentDataRequest", + "WriteTensorboardExperimentDataResponse", + "WriteTensorboardRunDataRequest", + "WriteTensorboardRunDataResponse", + "TensorboardTimeSeries", + "CodeExecutionResult", + "DynamicRetrievalConfig", + "EnterpriseWebSearch", + "ExecutableCode", + "FunctionCall", + "FunctionCallingConfig", + "FunctionDeclaration", + "FunctionResponse", + "FunctionResponseBlob", + "FunctionResponseFileData", + "FunctionResponsePart", + "GoogleMaps", + "GoogleSearchRetrieval", + "PartialArg", + "RagRetrievalConfig", + "Retrieval", + "RetrievalConfig", + "Tool", + "ToolConfig", + "UrlContext", + "VertexAISearch", + "VertexRagStore", + "FilterSplit", + "FractionSplit", + "InputDataConfig", + "PredefinedSplit", + "StratifiedSplit", + "TimestampSplit", + "TrainingPipeline", + "EvaluateDatasetRun", + "EvaluationConfig", + "PreTunedModel", + "SupervisedHyperParameters", + "SupervisedTuningDatasetDistribution", + "SupervisedTuningDataStats", + "SupervisedTuningSpec", + "TunedModel", + "TunedModelCheckpoint", + "TunedModelRef", + "TuningDataStats", + "TuningJob", + "BoolArray", + "DoubleArray", + "Int64Array", + "StringArray", + "Tensor", + "UnmanagedContainerModel", + "UsageMetadata", + "UserActionReference", + "Value", + "CorpusStatus", + "FileStatus", + "ImportRagFilesConfig", + "RagChunk", + "RagCorpus", + "RagEmbeddingModelConfig", + "RagEngineConfig", + "RagFile", + "RagFileChunkingConfig", + "RagFileParsingConfig", + "RagFileTransformationConfig", + "RagManagedDbConfig", + "RagVectorDbConfig", + "UploadRagFileConfig", + "VertexAiSearchConfig", + "CreateRagCorpusOperationMetadata", + "CreateRagCorpusRequest", + "DeleteRagCorpusRequest", + "DeleteRagFileRequest", + "GetRagCorpusRequest", + "GetRagEngineConfigRequest", + "GetRagFileRequest", + "ImportRagFilesOperationMetadata", + "ImportRagFilesRequest", + "ImportRagFilesResponse", + "ListRagCorporaRequest", + "ListRagCorporaResponse", + "ListRagFilesRequest", + "ListRagFilesResponse", + "UpdateRagCorpusOperationMetadata", + "UpdateRagCorpusRequest", + "UpdateRagEngineConfigOperationMetadata", + "UpdateRagEngineConfigRequest", + "UploadRagFileRequest", + "UploadRagFileResponse", + "AskContextsRequest", + "AskContextsResponse", + "AsyncRetrieveContextsOperationMetadata", + "AsyncRetrieveContextsRequest", + "AsyncRetrieveContextsResponse", + "AugmentPromptRequest", + "AugmentPromptResponse", + "Claim", + "CorroborateContentRequest", + "CorroborateContentResponse", + "Fact", + "RagContexts", + "RagQuery", + "RetrieveContextsRequest", + "RetrieveContextsResponse", + "AddTrialMeasurementRequest", + "CheckTrialEarlyStoppingStateMetatdata", + "CheckTrialEarlyStoppingStateRequest", + "CheckTrialEarlyStoppingStateResponse", + "CompleteTrialRequest", + "CreateStudyRequest", + "CreateTrialRequest", + "DeleteStudyRequest", + "DeleteTrialRequest", + "GetStudyRequest", + "GetTrialRequest", + "ListOptimalTrialsRequest", + "ListOptimalTrialsResponse", + "ListStudiesRequest", + "ListStudiesResponse", + "ListTrialsRequest", + "ListTrialsResponse", + "LookupStudyRequest", + "StopTrialRequest", + "SuggestTrialsMetadata", + "SuggestTrialsRequest", + "SuggestTrialsResponse", +) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/accelerator_type.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/accelerator_type.py new file mode 100644 index 0000000000000000000000000000000000000000..44c8fb5cb490c6ada27746e88e79e672f1a1692b --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/accelerator_type.py @@ -0,0 +1,99 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "AcceleratorType", + }, +) + + +class AcceleratorType(proto.Enum): + r"""Represents a hardware accelerator type. + + Values: + ACCELERATOR_TYPE_UNSPECIFIED (0): + Unspecified accelerator type, which means no + accelerator. + NVIDIA_TESLA_K80 (1): + Deprecated: Nvidia Tesla K80 GPU has reached + end of support, see + https://cloud.google.com/compute/docs/eol/k80-eol. + NVIDIA_TESLA_P100 (2): + Nvidia Tesla P100 GPU. + NVIDIA_TESLA_V100 (3): + Nvidia Tesla V100 GPU. + NVIDIA_TESLA_P4 (4): + Nvidia Tesla P4 GPU. + NVIDIA_TESLA_T4 (5): + Nvidia Tesla T4 GPU. + NVIDIA_TESLA_A100 (8): + Nvidia Tesla A100 GPU. + NVIDIA_A100_80GB (9): + Nvidia A100 80GB GPU. + NVIDIA_L4 (11): + Nvidia L4 GPU. + NVIDIA_H100_80GB (13): + Nvidia H100 80Gb GPU. + NVIDIA_H100_MEGA_80GB (14): + Nvidia H100 Mega 80Gb GPU. + NVIDIA_H200_141GB (15): + Nvidia H200 141Gb GPU. + NVIDIA_B200 (16): + Nvidia B200 GPU. + NVIDIA_GB200 (17): + Nvidia GB200 GPU. + NVIDIA_RTX_PRO_6000 (18): + Nvidia RTX Pro 6000 GPU. + TPU_V2 (6): + TPU v2. + TPU_V3 (7): + TPU v3. + TPU_V4_POD (10): + TPU v4. + TPU_V5_LITEPOD (12): + TPU v5. + """ + + ACCELERATOR_TYPE_UNSPECIFIED = 0 + NVIDIA_TESLA_K80 = 1 + NVIDIA_TESLA_P100 = 2 + NVIDIA_TESLA_V100 = 3 + NVIDIA_TESLA_P4 = 4 + NVIDIA_TESLA_T4 = 5 + NVIDIA_TESLA_A100 = 8 + NVIDIA_A100_80GB = 9 + NVIDIA_L4 = 11 + NVIDIA_H100_80GB = 13 + NVIDIA_H100_MEGA_80GB = 14 + NVIDIA_H200_141GB = 15 + NVIDIA_B200 = 16 + NVIDIA_GB200 = 17 + NVIDIA_RTX_PRO_6000 = 18 + TPU_V2 = 6 + TPU_V3 = 7 + TPU_V4_POD = 10 + TPU_V5_LITEPOD = 12 + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/annotation_spec.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/annotation_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..a9cc4c64348a8deb670916f0462b29af09856bc0 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/annotation_spec.py @@ -0,0 +1,82 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "AnnotationSpec", + }, +) + + +class AnnotationSpec(proto.Message): + r"""Identifies a concept with which DataItems may be annotated + with. + + Attributes: + name (str): + Output only. Resource name of the + AnnotationSpec. + display_name (str): + Required. The user-defined name of the + AnnotationSpec. The name can be up to 128 + characters long and can consist of any UTF-8 + characters. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + AnnotationSpec was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when AnnotationSpec + was last updated. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=5, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/api_auth.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/api_auth.py new file mode 100644 index 0000000000000000000000000000000000000000..ab686691c1211f6f669714abad509264d297524c --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/api_auth.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ApiAuth", + }, +) + + +class ApiAuth(proto.Message): + r"""The generic reusable api auth config. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + api_key_config (google.cloud.aiplatform_v1.types.ApiAuth.ApiKeyConfig): + The API secret. + + This field is a member of `oneof`_ ``auth_config``. + """ + + class ApiKeyConfig(proto.Message): + r"""The API secret. + + Attributes: + api_key_secret_version (str): + Required. The SecretManager secret version + resource name storing API key. e.g. + projects/{project}/secrets/{secret}/versions/{version} + """ + + api_key_secret_version: str = proto.Field( + proto.STRING, + number=1, + ) + + api_key_config: ApiKeyConfig = proto.Field( + proto.MESSAGE, + number=1, + oneof="auth_config", + message=ApiKeyConfig, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/artifact.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/artifact.py new file mode 100644 index 0000000000000000000000000000000000000000..8ef8c96c416dbd558a6a29d237ff69fa9bde33f4 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/artifact.py @@ -0,0 +1,175 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Artifact", + }, +) + + +class Artifact(proto.Message): + r"""Instance of a general artifact. + + Attributes: + name (str): + Output only. The resource name of the + Artifact. + display_name (str): + User provided display name of the Artifact. + May be up to 128 Unicode characters. + uri (str): + The uniform resource identifier of the + artifact file. May be empty if there is no + actual artifact file. + etag (str): + An eTag used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Artifacts. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. No more than 64 user labels can be + associated with one Artifact (System labels are + excluded). + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Artifact was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Artifact was + last updated. + state (google.cloud.aiplatform_v1.types.Artifact.State): + The state of this Artifact. This is a + property of the Artifact, and does not imply or + capture any ongoing process. This property is + managed by clients (such as Vertex AI + Pipelines), and the system does not prescribe or + check the validity of state transitions. + schema_title (str): + The title of the schema describing the + metadata. + Schema title and version is expected to be + registered in earlier Create Schema calls. And + both are used together as unique identifiers to + identify schemas within the local metadata + store. + schema_version (str): + The version of the schema in schema_name to use. + + Schema title and version is expected to be registered in + earlier Create Schema calls. And both are used together as + unique identifiers to identify schemas within the local + metadata store. + metadata (google.protobuf.struct_pb2.Struct): + Properties of the Artifact. + Top level metadata keys' heading and trailing + spaces will be trimmed. The size of this field + should not exceed 200KB. + description (str): + Description of the Artifact + """ + + class State(proto.Enum): + r"""Describes the state of the Artifact. + + Values: + STATE_UNSPECIFIED (0): + Unspecified state for the Artifact. + PENDING (1): + A state used by systems like Vertex AI + Pipelines to indicate that the underlying data + item represented by this Artifact is being + created. + LIVE (2): + A state indicating that the Artifact should + exist, unless something external to the system + deletes it. + """ + + STATE_UNSPECIFIED = 0 + PENDING = 1 + LIVE = 2 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + uri: str = proto.Field( + proto.STRING, + number=6, + ) + etag: str = proto.Field( + proto.STRING, + number=9, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + state: State = proto.Field( + proto.ENUM, + number=13, + enum=State, + ) + schema_title: str = proto.Field( + proto.STRING, + number=14, + ) + schema_version: str = proto.Field( + proto.STRING, + number=15, + ) + metadata: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=16, + message=struct_pb2.Struct, + ) + description: str = proto.Field( + proto.STRING, + number=17, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/batch_prediction_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/batch_prediction_job.py new file mode 100644 index 0000000000000000000000000000000000000000..4914cd3cd891b1fde3e5d123a27aa8749fc07fff --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/batch_prediction_job.py @@ -0,0 +1,743 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import completion_stats as gca_completion_stats +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import explanation +from google.cloud.aiplatform_v1.types import io +from google.cloud.aiplatform_v1.types import job_state +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import ( + manual_batch_tuning_parameters as gca_manual_batch_tuning_parameters, +) +from google.cloud.aiplatform_v1.types import ( + unmanaged_container_model as gca_unmanaged_container_model, +) +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "BatchPredictionJob", + }, +) + + +class BatchPredictionJob(proto.Message): + r"""A job that uses a + [Model][google.cloud.aiplatform.v1.BatchPredictionJob.model] to + produce predictions on multiple [input + instances][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. + If predictions for significant portion of the instances fail, the + job may finish without attempting predictions for all remaining + instances. + + Attributes: + name (str): + Output only. Resource name of the + BatchPredictionJob. + display_name (str): + Required. The user-defined name of this + BatchPredictionJob. + model (str): + The name of the Model resource that produces the predictions + via this job, must share the same ancestor Location. + Starting this job has no impact on any existing deployments + of the Model and their resources. Exactly one of model and + unmanaged_container_model must be set. + + The model resource name may contain version id or version + alias to specify the version. Example: + ``projects/{project}/locations/{location}/models/{model}@2`` + or + ``projects/{project}/locations/{location}/models/{model}@golden`` + if no version is specified, the default version will be + deployed. + + The model resource could also be a publisher model. Example: + ``publishers/{publisher}/models/{model}`` or + ``projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`` + model_version_id (str): + Output only. The version ID of the Model that + produces the predictions via this job. + unmanaged_container_model (google.cloud.aiplatform_v1.types.UnmanagedContainerModel): + Contains model information necessary to perform batch + prediction without requiring uploading to model registry. + Exactly one of model and unmanaged_container_model must be + set. + input_config (google.cloud.aiplatform_v1.types.BatchPredictionJob.InputConfig): + Required. Input configuration of the instances on which + predictions are performed. The schema of any single instance + may be specified via the + [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + instance_config (google.cloud.aiplatform_v1.types.BatchPredictionJob.InstanceConfig): + Configuration for how to convert batch + prediction input instances to the prediction + instances that are sent to the Model. + model_parameters (google.protobuf.struct_pb2.Value): + The parameters that govern the predictions. The schema of + the parameters may be specified via the + [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + output_config (google.cloud.aiplatform_v1.types.BatchPredictionJob.OutputConfig): + Required. The Configuration specifying where output + predictions should be written. The schema of any single + prediction may be specified as a concatenation of + [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + and + [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. + dedicated_resources (google.cloud.aiplatform_v1.types.BatchDedicatedResources): + The config of resources used by the Model during the batch + prediction. If the Model + [supports][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types] + DEDICATED_RESOURCES this config may be provided (and the job + will use these resources), if the Model doesn't support + AUTOMATIC_RESOURCES, this config must be provided. + service_account (str): + The service account that the DeployedModel's container runs + as. If not specified, a system generated one will be used, + which has minimal permissions and the custom container, if + used, may not have enough permission to access other Google + Cloud resources. + + Users deploying the Model must have the + ``iam.serviceAccounts.actAs`` permission on this service + account. + manual_batch_tuning_parameters (google.cloud.aiplatform_v1.types.ManualBatchTuningParameters): + Immutable. Parameters configuring the batch behavior. + Currently only applicable when + [dedicated_resources][google.cloud.aiplatform.v1.BatchPredictionJob.dedicated_resources] + are used (in other cases Vertex AI does the tuning itself). + generate_explanation (bool): + Generate explanation with the batch prediction results. + + When set to ``true``, the batch prediction output changes + based on the ``predictions_format`` field of the + [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config] + object: + + - ``bigquery``: output includes a column named + ``explanation``. The value is a struct that conforms to + the [Explanation][google.cloud.aiplatform.v1.Explanation] + object. + - ``jsonl``: The JSON objects on each line include an + additional entry keyed ``explanation``. The value of the + entry is a JSON object that conforms to the + [Explanation][google.cloud.aiplatform.v1.Explanation] + object. + - ``csv``: Generating explanations for CSV format is not + supported. + + If this field is set to true, either the + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + or + [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] + must be populated. + explanation_spec (google.cloud.aiplatform_v1.types.ExplanationSpec): + Explanation configuration for this BatchPredictionJob. Can + be specified only if + [generate_explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + is set to ``true``. + + This value overrides the value of + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]. + All fields of + [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] + are optional in the request. If a field of the + [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] + object is not populated, the corresponding field of the + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + object is inherited. + output_info (google.cloud.aiplatform_v1.types.BatchPredictionJob.OutputInfo): + Output only. Information further describing + the output of this job. + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the job. + error (google.rpc.status_pb2.Status): + Output only. Only populated when the job's state is + JOB_STATE_FAILED or JOB_STATE_CANCELLED. + partial_failures (MutableSequence[google.rpc.status_pb2.Status]): + Output only. Partial failures encountered. + For example, single files that can't be read. + This field never exceeds 20 entries. + Status details fields contain standard Google + Cloud error details. + resources_consumed (google.cloud.aiplatform_v1.types.ResourcesConsumed): + Output only. Information about resources that + had been consumed by this job. Provided in real + time at best effort basis, as well as a final + value once the job completes. + + Note: This field currently may be not populated + for batch predictions that use AutoML Models. + completion_stats (google.cloud.aiplatform_v1.types.CompletionStats): + Output only. Statistics on completed and + failed prediction instances. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the BatchPredictionJob + was created. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the BatchPredictionJob for the first + time entered the ``JOB_STATE_RUNNING`` state. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the BatchPredictionJob entered any of + the following states: ``JOB_STATE_SUCCEEDED``, + ``JOB_STATE_FAILED``, ``JOB_STATE_CANCELLED``. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the BatchPredictionJob + was most recently updated. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize BatchPredictionJobs. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key options for a + BatchPredictionJob. If this is set, then all + resources created by the BatchPredictionJob will + be encrypted with the provided encryption key. + disable_container_logging (bool): + For custom-trained Models and AutoML Tabular Models, the + container of the DeployedModel instances will send + ``stderr`` and ``stdout`` streams to Cloud Logging by + default. Please note that the logs incur cost, which are + subject to `Cloud Logging + pricing `__. + + User can disable container logging by setting this flag to + true. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class InputConfig(proto.Message): + r"""Configures the input to + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + See + [Model.supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] + for Model's supported input formats, and how instances should be + expressed via any of them. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + The Cloud Storage location for the input + instances. + + This field is a member of `oneof`_ ``source``. + bigquery_source (google.cloud.aiplatform_v1.types.BigQuerySource): + The BigQuery location of the input table. + The schema of the table should be in the format + described by the given context OpenAPI Schema, + if one is provided. The table may contain + additional columns that are not described by the + schema, and they will be ignored. + + This field is a member of `oneof`_ ``source``. + vertex_multimodal_dataset_source (google.cloud.aiplatform_v1.types.VertexMultimodalDatasetSource): + A Vertex Managed Dataset. Currently, only + datasets of type Multimodal are supported. + + This field is a member of `oneof`_ ``source``. + instances_format (str): + Required. The format in which instances are given, must be + one of the + [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats]. + """ + + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=2, + oneof="source", + message=io.GcsSource, + ) + bigquery_source: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=3, + oneof="source", + message=io.BigQuerySource, + ) + vertex_multimodal_dataset_source: io.VertexMultimodalDatasetSource = ( + proto.Field( + proto.MESSAGE, + number=4, + oneof="source", + message=io.VertexMultimodalDatasetSource, + ) + ) + instances_format: str = proto.Field( + proto.STRING, + number=1, + ) + + class InstanceConfig(proto.Message): + r"""Configuration defining how to transform batch prediction + input instances to the instances that the Model accepts. + + Attributes: + instance_type (str): + The format of the instance that the Model accepts. Vertex AI + will convert compatible [batch prediction input instance + formats][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.instances_format] + to the specified format. + + Supported values are: + + - ``object``: Each input is converted to JSON object format. + + - For ``bigquery``, each row is converted to an object. + - For ``jsonl``, each line of the JSONL input must be an + object. + - Does not apply to ``csv``, ``file-list``, ``tf-record``, + or ``tf-record-gzip``. + + - ``array``: Each input is converted to JSON array format. + + - For ``bigquery``, each row is converted to an array. The + order of columns is determined by the BigQuery column + order, unless + [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields] + is populated. + [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields] + must be populated for specifying field orders. + - For ``jsonl``, if each line of the JSONL input is an + object, + [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields] + must be populated for specifying field orders. + - Does not apply to ``csv``, ``file-list``, ``tf-record``, + or ``tf-record-gzip``. + + If not specified, Vertex AI converts the batch prediction + input as follows: + + - For ``bigquery`` and ``csv``, the behavior is the same as + ``array``. The order of columns is the same as defined in + the file or table, unless + [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields] + is populated. + - For ``jsonl``, the prediction instance format is + determined by each line of the input. + - For ``tf-record``/``tf-record-gzip``, each record will be + converted to an object in the format of + ``{"b64": }``, where ```` is the + Base64-encoded string of the content of the record. + - For ``file-list``, each file in the list will be converted + to an object in the format of ``{"b64": }``, where + ```` is the Base64-encoded string of the content of + the file. + key_field (str): + The name of the field that is considered as a key. + + The values identified by the key field is not included in + the transformed instances that is sent to the Model. This is + similar to specifying this name of the field in + [excluded_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields]. + In addition, the batch prediction output will not include + the instances. Instead the output will only include the + value of the key field, in a field named ``key`` in the + output: + + - For ``jsonl`` output format, the output will have a + ``key`` field instead of the ``instance`` field. + - For ``csv``/``bigquery`` output format, the output will + have have a ``key`` column instead of the instance feature + columns. + + The input must be JSONL with objects at each line, CSV, + BigQuery or TfRecord. + included_fields (MutableSequence[str]): + Fields that will be included in the prediction instance that + is sent to the Model. + + If + [instance_type][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.instance_type] + is ``array``, the order of field names in included_fields + also determines the order of the values in the array. + + When included_fields is populated, + [excluded_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.excluded_fields] + must be empty. + + The input must be JSONL with objects at each line, BigQuery + or TfRecord. + excluded_fields (MutableSequence[str]): + Fields that will be excluded in the prediction instance that + is sent to the Model. + + Excluded will be attached to the batch prediction output if + [key_field][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.key_field] + is not specified. + + When excluded_fields is populated, + [included_fields][google.cloud.aiplatform.v1.BatchPredictionJob.InstanceConfig.included_fields] + must be empty. + + The input must be JSONL with objects at each line, BigQuery + or TfRecord. + """ + + instance_type: str = proto.Field( + proto.STRING, + number=1, + ) + key_field: str = proto.Field( + proto.STRING, + number=2, + ) + included_fields: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + excluded_fields: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + + class OutputConfig(proto.Message): + r"""Configures the output of + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + See + [Model.supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats] + for supported output formats, and how predictions are expressed via + any of them. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_destination (google.cloud.aiplatform_v1.types.GcsDestination): + The Cloud Storage location of the directory where the output + is to be written to. In the given directory a new directory + is created. Its name is + ``prediction--``, where + timestamp is in YYYY-MM-DDThh:mm:ss.sssZ ISO-8601 format. + Inside of it files ``predictions_0001.``, + ``predictions_0002.``, ..., + ``predictions_N.`` are created where + ```` depends on chosen + [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format], + and N may equal 0001 and depends on the total number of + successfully predicted instances. If the Model has both + [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + and + [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] + schemata defined then each such file contains predictions as + per the + [predictions_format][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.predictions_format]. + If prediction for any instance failed (partially or + completely), then an additional ``errors_0001.``, + ``errors_0002.``,..., ``errors_N.`` + files are created (N depends on total number of failed + predictions). These files contain the failed instances, as + per their schema, followed by an additional ``error`` field + which as value has [google.rpc.Status][google.rpc.Status] + containing only ``code`` and ``message`` fields. + + This field is a member of `oneof`_ ``destination``. + bigquery_destination (google.cloud.aiplatform_v1.types.BigQueryDestination): + The BigQuery project or dataset location where the output is + to be written to. If project is provided, a new dataset is + created with name + ``prediction__`` where + is made BigQuery-dataset-name compatible (for example, most + special characters become underscores), and timestamp is in + YYYY_MM_DDThh_mm_ss_sssZ "based on ISO-8601" format. In the + dataset two tables will be created, ``predictions``, and + ``errors``. If the Model has both + [instance][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + and + [prediction][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri] + schemata defined then the tables have columns as follows: + The ``predictions`` table contains instances for which the + prediction succeeded, it has columns as per a concatenation + of the Model's instance and prediction schemata. The + ``errors`` table contains rows for which the prediction has + failed, it has instance columns, as per the instance schema, + followed by a single "errors" column, which as values has + [google.rpc.Status][google.rpc.Status] represented as a + STRUCT, and containing only ``code`` and ``message``. + + This field is a member of `oneof`_ ``destination``. + vertex_multimodal_dataset_destination (google.cloud.aiplatform_v1.types.VertexMultimodalDatasetDestination): + The details for a Vertex Multimodal Dataset + that will be created for the output. + + This field is a member of `oneof`_ ``destination``. + predictions_format (str): + Required. The format in which Vertex AI gives the + predictions, must be one of the + [Model's][google.cloud.aiplatform.v1.BatchPredictionJob.model] + [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. + """ + + gcs_destination: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=2, + oneof="destination", + message=io.GcsDestination, + ) + bigquery_destination: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=3, + oneof="destination", + message=io.BigQueryDestination, + ) + vertex_multimodal_dataset_destination: io.VertexMultimodalDatasetDestination = ( + proto.Field( + proto.MESSAGE, + number=6, + oneof="destination", + message=io.VertexMultimodalDatasetDestination, + ) + ) + predictions_format: str = proto.Field( + proto.STRING, + number=1, + ) + + class OutputInfo(proto.Message): + r"""Further describes this job's output. Supplements + [output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_output_directory (str): + Output only. The full path of the Cloud + Storage directory created, into which the + prediction output is written. + + This field is a member of `oneof`_ ``output_location``. + bigquery_output_dataset (str): + Output only. The path of the BigQuery dataset created, in + ``bq://projectId.bqDatasetId`` format, into which the + prediction output is written. + + This field is a member of `oneof`_ ``output_location``. + vertex_multimodal_dataset_name (str): + Output only. The resource name of the Vertex Managed Dataset + created, into which the prediction output is written. + Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + + This field is a member of `oneof`_ ``output_location``. + bigquery_output_table (str): + Output only. The name of the BigQuery table created, in + ``predictions_`` format, into which the + prediction output is written. Can be used by UI to generate + the BigQuery output path, for example. + """ + + gcs_output_directory: str = proto.Field( + proto.STRING, + number=1, + oneof="output_location", + ) + bigquery_output_dataset: str = proto.Field( + proto.STRING, + number=2, + oneof="output_location", + ) + vertex_multimodal_dataset_name: str = proto.Field( + proto.STRING, + number=5, + oneof="output_location", + ) + bigquery_output_table: str = proto.Field( + proto.STRING, + number=4, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + model: str = proto.Field( + proto.STRING, + number=3, + ) + model_version_id: str = proto.Field( + proto.STRING, + number=30, + ) + unmanaged_container_model: gca_unmanaged_container_model.UnmanagedContainerModel = ( + proto.Field( + proto.MESSAGE, + number=28, + message=gca_unmanaged_container_model.UnmanagedContainerModel, + ) + ) + input_config: InputConfig = proto.Field( + proto.MESSAGE, + number=4, + message=InputConfig, + ) + instance_config: InstanceConfig = proto.Field( + proto.MESSAGE, + number=27, + message=InstanceConfig, + ) + model_parameters: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=5, + message=struct_pb2.Value, + ) + output_config: OutputConfig = proto.Field( + proto.MESSAGE, + number=6, + message=OutputConfig, + ) + dedicated_resources: machine_resources.BatchDedicatedResources = proto.Field( + proto.MESSAGE, + number=7, + message=machine_resources.BatchDedicatedResources, + ) + service_account: str = proto.Field( + proto.STRING, + number=29, + ) + manual_batch_tuning_parameters: ( + gca_manual_batch_tuning_parameters.ManualBatchTuningParameters + ) = proto.Field( + proto.MESSAGE, + number=8, + message=gca_manual_batch_tuning_parameters.ManualBatchTuningParameters, + ) + generate_explanation: bool = proto.Field( + proto.BOOL, + number=23, + ) + explanation_spec: explanation.ExplanationSpec = proto.Field( + proto.MESSAGE, + number=25, + message=explanation.ExplanationSpec, + ) + output_info: OutputInfo = proto.Field( + proto.MESSAGE, + number=9, + message=OutputInfo, + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=10, + enum=job_state.JobState, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=11, + message=status_pb2.Status, + ) + partial_failures: MutableSequence[status_pb2.Status] = proto.RepeatedField( + proto.MESSAGE, + number=12, + message=status_pb2.Status, + ) + resources_consumed: machine_resources.ResourcesConsumed = proto.Field( + proto.MESSAGE, + number=13, + message=machine_resources.ResourcesConsumed, + ) + completion_stats: gca_completion_stats.CompletionStats = proto.Field( + proto.MESSAGE, + number=14, + message=gca_completion_stats.CompletionStats, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=15, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=16, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=17, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=18, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=19, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=24, + message=gca_encryption_spec.EncryptionSpec, + ) + disable_container_logging: bool = proto.Field( + proto.BOOL, + number=34, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=36, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=37, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/cached_content.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/cached_content.py new file mode 100644 index 0000000000000000000000000000000000000000..172b1f8807250c8c2a3b937f958df737101f3996 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/cached_content.py @@ -0,0 +1,203 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import tool +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CachedContent", + }, +) + + +class CachedContent(proto.Message): + r"""A resource used in LLM queries for users to explicitly + specify what to cache and how to cache. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + expire_time (google.protobuf.timestamp_pb2.Timestamp): + Timestamp of when this resource is considered expired. This + is *always* provided on output, regardless of what was sent + on input. + + This field is a member of `oneof`_ ``expiration``. + ttl (google.protobuf.duration_pb2.Duration): + Input only. The TTL for this resource. The + expiration time is computed: now + TTL. + + This field is a member of `oneof`_ ``expiration``. + name (str): + Immutable. Identifier. The server-generated resource name of + the cached content Format: + projects/{project}/locations/{location}/cachedContents/{cached_content} + display_name (str): + Optional. Immutable. The user-generated + meaningful display name of the cached content. + model (str): + Immutable. The name of the ``Model`` to use for cached + content. Currently, only the published Gemini base models + are supported, in form of + projects/{PROJECT}/locations/{LOCATION}/publishers/google/models/{MODEL} + system_instruction (google.cloud.aiplatform_v1.types.Content): + Optional. Input only. Immutable. Developer + set system instruction. Currently, text only + contents (MutableSequence[google.cloud.aiplatform_v1.types.Content]): + Optional. Input only. Immutable. The content + to cache + tools (MutableSequence[google.cloud.aiplatform_v1.types.Tool]): + Optional. Input only. Immutable. A list of ``Tools`` the + model may use to generate the next response + tool_config (google.cloud.aiplatform_v1.types.ToolConfig): + Optional. Input only. Immutable. Tool config. + This config is shared for all tools + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Creation time of the cache + entry. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. When the cache entry was last + updated in UTC time. + usage_metadata (google.cloud.aiplatform_v1.types.CachedContent.UsageMetadata): + Output only. Metadata on the usage of the + cached content. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Input only. Immutable. Customer-managed encryption key spec + for a ``CachedContent``. If set, this ``CachedContent`` and + all its sub-resources will be secured by this key. + """ + + class UsageMetadata(proto.Message): + r"""Metadata on the usage of the cached content. + + Attributes: + total_token_count (int): + Total number of tokens that the cached + content consumes. + text_count (int): + Number of text characters. + image_count (int): + Number of images. + video_duration_seconds (int): + Duration of video in seconds. + audio_duration_seconds (int): + Duration of audio in seconds. + """ + + total_token_count: int = proto.Field( + proto.INT32, + number=1, + ) + text_count: int = proto.Field( + proto.INT32, + number=2, + ) + image_count: int = proto.Field( + proto.INT32, + number=3, + ) + video_duration_seconds: int = proto.Field( + proto.INT32, + number=4, + ) + audio_duration_seconds: int = proto.Field( + proto.INT32, + number=5, + ) + + expire_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + oneof="expiration", + message=timestamp_pb2.Timestamp, + ) + ttl: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=10, + oneof="expiration", + message=duration_pb2.Duration, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=11, + ) + model: str = proto.Field( + proto.STRING, + number=2, + ) + system_instruction: content.Content = proto.Field( + proto.MESSAGE, + number=3, + message=content.Content, + ) + contents: MutableSequence[content.Content] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=content.Content, + ) + tools: MutableSequence[tool.Tool] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=tool.Tool, + ) + tool_config: tool.ToolConfig = proto.Field( + proto.MESSAGE, + number=6, + message=tool.ToolConfig, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + usage_metadata: UsageMetadata = proto.Field( + proto.MESSAGE, + number=12, + message=UsageMetadata, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=13, + message=gca_encryption_spec.EncryptionSpec, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/content.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/content.py new file mode 100644 index 0000000000000000000000000000000000000000..101c10147d44ae86f07514293eb3efb842592c56 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/content.py @@ -0,0 +1,2153 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import openapi +from google.cloud.aiplatform_v1.types import tool +from google.cloud.aiplatform_v1.types import vertex_rag_data +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.type.date_pb2 as date_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "HarmCategory", + "Modality", + "Content", + "Part", + "Blob", + "FileData", + "VideoMetadata", + "PrebuiltVoiceConfig", + "ReplicatedVoiceConfig", + "VoiceConfig", + "SpeakerVoiceConfig", + "MultiSpeakerVoiceConfig", + "SpeechConfig", + "ImageConfig", + "GenerationConfig", + "SafetySetting", + "SafetyRating", + "CitationMetadata", + "Citation", + "Candidate", + "UrlContextMetadata", + "UrlMetadata", + "LogprobsResult", + "Segment", + "GroundingChunk", + "GroundingSupport", + "GroundingMetadata", + "SearchEntryPoint", + "RetrievalMetadata", + "ModelArmorConfig", + "ModalityTokenCount", + }, +) + + +class HarmCategory(proto.Enum): + r"""Harm categories that will block the content. + + Values: + HARM_CATEGORY_UNSPECIFIED (0): + The harm category is unspecified. + HARM_CATEGORY_HATE_SPEECH (1): + The harm category is hate speech. + HARM_CATEGORY_DANGEROUS_CONTENT (2): + The harm category is dangerous content. + HARM_CATEGORY_HARASSMENT (3): + The harm category is harassment. + HARM_CATEGORY_SEXUALLY_EXPLICIT (4): + The harm category is sexually explicit + content. + HARM_CATEGORY_CIVIC_INTEGRITY (5): + Deprecated: Election filter is not longer + supported. The harm category is civic integrity. + HARM_CATEGORY_JAILBREAK (6): + The harm category is for jailbreak prompts. + """ + + HARM_CATEGORY_UNSPECIFIED = 0 + HARM_CATEGORY_HATE_SPEECH = 1 + HARM_CATEGORY_DANGEROUS_CONTENT = 2 + HARM_CATEGORY_HARASSMENT = 3 + HARM_CATEGORY_SEXUALLY_EXPLICIT = 4 + HARM_CATEGORY_CIVIC_INTEGRITY = 5 + HARM_CATEGORY_JAILBREAK = 6 + + +class Modality(proto.Enum): + r"""Content Part modality + + Values: + MODALITY_UNSPECIFIED (0): + Unspecified modality. + TEXT (1): + Plain text. + IMAGE (2): + Image. + VIDEO (3): + Video. + AUDIO (4): + Audio. + DOCUMENT (5): + Document, e.g. PDF. + """ + + MODALITY_UNSPECIFIED = 0 + TEXT = 1 + IMAGE = 2 + VIDEO = 3 + AUDIO = 4 + DOCUMENT = 5 + + +class Content(proto.Message): + r"""The base structured datatype containing multi-part content of a + message. + + A ``Content`` includes a ``role`` field designating the producer of + the ``Content`` and a ``parts`` field containing multi-part data + that contains the content of the message turn. + + Attributes: + role (str): + Optional. The producer of the content. Must + be either 'user' or 'model'. + Useful to set for multi-turn conversations, + otherwise can be left blank or unset. + parts (MutableSequence[google.cloud.aiplatform_v1.types.Part]): + Required. Ordered ``Parts`` that constitute a single + message. Parts may have different IANA MIME types. + """ + + role: str = proto.Field( + proto.STRING, + number=1, + ) + parts: MutableSequence["Part"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="Part", + ) + + +class Part(proto.Message): + r"""A datatype containing media that is part of a multi-part ``Content`` + message. + + A ``Part`` consists of data which has an associated datatype. A + ``Part`` can only contain one of the accepted types in + ``Part.data``. + + A ``Part`` must have a fixed IANA MIME type identifying the type and + subtype of the media if ``inline_data`` or ``file_data`` field is + filled with raw bytes. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + text (str): + Optional. Text part (can be code). + + This field is a member of `oneof`_ ``data``. + inline_data (google.cloud.aiplatform_v1.types.Blob): + Optional. Inlined bytes data. + + This field is a member of `oneof`_ ``data``. + file_data (google.cloud.aiplatform_v1.types.FileData): + Optional. URI based data. + + This field is a member of `oneof`_ ``data``. + function_call (google.cloud.aiplatform_v1.types.FunctionCall): + Optional. A predicted [FunctionCall] returned from the model + that contains a string representing the + [FunctionDeclaration.name] with the parameters and their + values. + + This field is a member of `oneof`_ ``data``. + function_response (google.cloud.aiplatform_v1.types.FunctionResponse): + Optional. The result output of a [FunctionCall] that + contains a string representing the + [FunctionDeclaration.name] and a structured JSON object + containing any output from the function call. It is used as + context to the model. + + This field is a member of `oneof`_ ``data``. + executable_code (google.cloud.aiplatform_v1.types.ExecutableCode): + Optional. Code generated by the model that is + meant to be executed. + + This field is a member of `oneof`_ ``data``. + code_execution_result (google.cloud.aiplatform_v1.types.CodeExecutionResult): + Optional. Result of executing the [ExecutableCode]. + + This field is a member of `oneof`_ ``data``. + thought (bool): + Indicates if the part is thought from the + model. + thought_signature (bytes): + An opaque signature for the thought so it can + be reused in subsequent requests. + video_metadata (google.cloud.aiplatform_v1.types.VideoMetadata): + Optional. Video metadata. The metadata should only be + specified while the video data is presented in inline_data + or file_data. + + This field is a member of `oneof`_ ``metadata``. + media_resolution (google.cloud.aiplatform_v1.types.Part.MediaResolution): + per part media resolution. + Media resolution for the input media. + """ + + class MediaResolution(proto.Message): + r"""per part media resolution. + Media resolution for the input media. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + level (google.cloud.aiplatform_v1.types.Part.MediaResolution.Level): + The tokenization quality used for given + media. + + This field is a member of `oneof`_ ``value``. + """ + + class Level(proto.Enum): + r"""The media resolution level. + + Values: + MEDIA_RESOLUTION_UNSPECIFIED (0): + Media resolution has not been set. + MEDIA_RESOLUTION_LOW (1): + Media resolution set to low. + MEDIA_RESOLUTION_MEDIUM (2): + Media resolution set to medium. + MEDIA_RESOLUTION_HIGH (3): + Media resolution set to high. + MEDIA_RESOLUTION_ULTRA_HIGH (4): + Media resolution set to ultra high. This is + for image only. + """ + + MEDIA_RESOLUTION_UNSPECIFIED = 0 + MEDIA_RESOLUTION_LOW = 1 + MEDIA_RESOLUTION_MEDIUM = 2 + MEDIA_RESOLUTION_HIGH = 3 + MEDIA_RESOLUTION_ULTRA_HIGH = 4 + + level: "Part.MediaResolution.Level" = proto.Field( + proto.ENUM, + number=1, + oneof="value", + enum="Part.MediaResolution.Level", + ) + + text: str = proto.Field( + proto.STRING, + number=1, + oneof="data", + ) + inline_data: "Blob" = proto.Field( + proto.MESSAGE, + number=2, + oneof="data", + message="Blob", + ) + file_data: "FileData" = proto.Field( + proto.MESSAGE, + number=3, + oneof="data", + message="FileData", + ) + function_call: tool.FunctionCall = proto.Field( + proto.MESSAGE, + number=5, + oneof="data", + message=tool.FunctionCall, + ) + function_response: tool.FunctionResponse = proto.Field( + proto.MESSAGE, + number=6, + oneof="data", + message=tool.FunctionResponse, + ) + executable_code: tool.ExecutableCode = proto.Field( + proto.MESSAGE, + number=8, + oneof="data", + message=tool.ExecutableCode, + ) + code_execution_result: tool.CodeExecutionResult = proto.Field( + proto.MESSAGE, + number=9, + oneof="data", + message=tool.CodeExecutionResult, + ) + thought: bool = proto.Field( + proto.BOOL, + number=10, + ) + thought_signature: bytes = proto.Field( + proto.BYTES, + number=11, + ) + video_metadata: "VideoMetadata" = proto.Field( + proto.MESSAGE, + number=4, + oneof="metadata", + message="VideoMetadata", + ) + media_resolution: MediaResolution = proto.Field( + proto.MESSAGE, + number=12, + message=MediaResolution, + ) + + +class Blob(proto.Message): + r"""Content blob. + + It's preferred to send as + [text][google.cloud.aiplatform.v1.Part.text] directly rather than + raw bytes. + + Attributes: + mime_type (str): + Required. The IANA standard MIME type of the + source data. + data (bytes): + Required. Raw bytes. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + ) + data: bytes = proto.Field( + proto.BYTES, + number=2, + ) + + +class FileData(proto.Message): + r"""URI based data. + + Attributes: + mime_type (str): + Required. The IANA standard MIME type of the + source data. + file_uri (str): + Required. URI. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + ) + file_uri: str = proto.Field( + proto.STRING, + number=2, + ) + + +class VideoMetadata(proto.Message): + r"""Metadata describes the input video content. + + Attributes: + start_offset (google.protobuf.duration_pb2.Duration): + Optional. The start offset of the video. + end_offset (google.protobuf.duration_pb2.Duration): + Optional. The end offset of the video. + fps (float): + Optional. The frame rate of the video sent to the model. If + not specified, the default value is 1.0. The valid range is + (0.0, 24.0]. + """ + + start_offset: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + end_offset: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=2, + message=duration_pb2.Duration, + ) + fps: float = proto.Field( + proto.DOUBLE, + number=3, + ) + + +class PrebuiltVoiceConfig(proto.Message): + r"""Configuration for a prebuilt voice. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + voice_name (str): + The name of the prebuilt voice to use. + + This field is a member of `oneof`_ ``_voice_name``. + """ + + voice_name: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + +class ReplicatedVoiceConfig(proto.Message): + r"""The configuration for the replicated voice to use. + + Attributes: + mime_type (str): + Optional. The mimetype of the voice sample. The only + currently supported value is ``audio/wav``. This represents + 16-bit signed little-endian wav data, with a 24kHz sampling + rate. ``mime_type`` will default to ``audio/wav`` if not + set. + voice_sample_audio (bytes): + Optional. The sample of the custom voice. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + ) + voice_sample_audio: bytes = proto.Field( + proto.BYTES, + number=2, + ) + + +class VoiceConfig(proto.Message): + r"""Configuration for a voice. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prebuilt_voice_config (google.cloud.aiplatform_v1.types.PrebuiltVoiceConfig): + The configuration for a prebuilt voice. + + This field is a member of `oneof`_ ``voice_config``. + replicated_voice_config (google.cloud.aiplatform_v1.types.ReplicatedVoiceConfig): + Optional. The configuration for a replicated + voice. This enables users to replicate a voice + from an audio sample. + + This field is a member of `oneof`_ ``voice_config``. + """ + + prebuilt_voice_config: "PrebuiltVoiceConfig" = proto.Field( + proto.MESSAGE, + number=1, + oneof="voice_config", + message="PrebuiltVoiceConfig", + ) + replicated_voice_config: "ReplicatedVoiceConfig" = proto.Field( + proto.MESSAGE, + number=3, + oneof="voice_config", + message="ReplicatedVoiceConfig", + ) + + +class SpeakerVoiceConfig(proto.Message): + r"""Configuration for a single speaker in a multi-speaker setup. + + Attributes: + speaker (str): + Required. The name of the speaker. This + should be the same as the speaker name used in + the prompt. + voice_config (google.cloud.aiplatform_v1.types.VoiceConfig): + Required. The configuration for the voice of + this speaker. + """ + + speaker: str = proto.Field( + proto.STRING, + number=1, + ) + voice_config: "VoiceConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="VoiceConfig", + ) + + +class MultiSpeakerVoiceConfig(proto.Message): + r"""Configuration for a multi-speaker text-to-speech request. + + Attributes: + speaker_voice_configs (MutableSequence[google.cloud.aiplatform_v1.types.SpeakerVoiceConfig]): + Required. A list of configurations for the + voices of the speakers. Exactly two speaker + voice configurations must be provided. + """ + + speaker_voice_configs: MutableSequence["SpeakerVoiceConfig"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="SpeakerVoiceConfig", + ) + + +class SpeechConfig(proto.Message): + r"""Configuration for speech generation. + + Attributes: + voice_config (google.cloud.aiplatform_v1.types.VoiceConfig): + The configuration for the voice to use. + language_code (str): + Optional. The language code (ISO 639-1) for + the speech synthesis. + multi_speaker_voice_config (google.cloud.aiplatform_v1.types.MultiSpeakerVoiceConfig): + The configuration for a multi-speaker text-to-speech + request. This field is mutually exclusive with + ``voice_config``. + """ + + voice_config: "VoiceConfig" = proto.Field( + proto.MESSAGE, + number=1, + message="VoiceConfig", + ) + language_code: str = proto.Field( + proto.STRING, + number=2, + ) + multi_speaker_voice_config: "MultiSpeakerVoiceConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="MultiSpeakerVoiceConfig", + ) + + +class ImageConfig(proto.Message): + r"""Config for image generation features. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + image_output_options (google.cloud.aiplatform_v1.types.ImageConfig.ImageOutputOptions): + Optional. The image output format for + generated images. + + This field is a member of `oneof`_ ``_image_output_options``. + aspect_ratio (str): + Optional. The desired aspect ratio for the + generated images. The following aspect ratios + are supported: + + "1:1" + "2:3", "3:2" + "3:4", "4:3" + "4:5", "5:4" + "9:16", "16:9" + "21:9". + + This field is a member of `oneof`_ ``_aspect_ratio``. + person_generation (google.cloud.aiplatform_v1.types.ImageConfig.PersonGeneration): + Optional. Controls whether the model can + generate people. + + This field is a member of `oneof`_ ``_person_generation``. + image_size (str): + Optional. Specifies the size of generated images. Supported + values are ``1K``, ``2K``, ``4K``. If not specified, the + model will use default value ``1K``. + + This field is a member of `oneof`_ ``_image_size``. + """ + + class PersonGeneration(proto.Enum): + r"""Enum for controlling the generation of people in images. + + Values: + PERSON_GENERATION_UNSPECIFIED (0): + The default behavior is unspecified. The + model will decide whether to generate images of + people. + ALLOW_ALL (1): + Allows the model to generate images of + people, including adults and children. + ALLOW_ADULT (2): + Allows the model to generate images of + adults, but not children. + ALLOW_NONE (3): + Prevents the model from generating images of + people. + """ + + PERSON_GENERATION_UNSPECIFIED = 0 + ALLOW_ALL = 1 + ALLOW_ADULT = 2 + ALLOW_NONE = 3 + + class ImageOutputOptions(proto.Message): + r"""The image output format for generated images. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + mime_type (str): + Optional. The image format that the output + should be saved as. + + This field is a member of `oneof`_ ``_mime_type``. + compression_quality (int): + Optional. The compression quality of the + output image. + + This field is a member of `oneof`_ ``_compression_quality``. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + compression_quality: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + + image_output_options: ImageOutputOptions = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message=ImageOutputOptions, + ) + aspect_ratio: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + person_generation: PersonGeneration = proto.Field( + proto.ENUM, + number=3, + optional=True, + enum=PersonGeneration, + ) + image_size: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class GenerationConfig(proto.Message): + r"""Generation config. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + temperature (float): + Optional. Controls the randomness of + predictions. + + This field is a member of `oneof`_ ``_temperature``. + top_p (float): + Optional. If specified, nucleus sampling will + be used. + + This field is a member of `oneof`_ ``_top_p``. + top_k (float): + Optional. If specified, top-k sampling will + be used. + + This field is a member of `oneof`_ ``_top_k``. + candidate_count (int): + Optional. Number of candidates to generate. + + This field is a member of `oneof`_ ``_candidate_count``. + max_output_tokens (int): + Optional. The maximum number of output tokens + to generate per message. + + This field is a member of `oneof`_ ``_max_output_tokens``. + stop_sequences (MutableSequence[str]): + Optional. Stop sequences. + response_logprobs (bool): + Optional. If true, export the logprobs + results in response. + + This field is a member of `oneof`_ ``_response_logprobs``. + logprobs (int): + Optional. Logit probabilities. + + This field is a member of `oneof`_ ``_logprobs``. + presence_penalty (float): + Optional. Positive penalties. + + This field is a member of `oneof`_ ``_presence_penalty``. + frequency_penalty (float): + Optional. Frequency penalties. + + This field is a member of `oneof`_ ``_frequency_penalty``. + seed (int): + Optional. Seed. + + This field is a member of `oneof`_ ``_seed``. + response_mime_type (str): + Optional. Output response mimetype of the generated + candidate text. Supported mimetype: + + - ``text/plain``: (default) Text output. + - ``application/json``: JSON response in the candidates. The + model needs to be prompted to output the appropriate + response type, otherwise the behavior is undefined. This + is a preview feature. + response_schema (google.cloud.aiplatform_v1.types.Schema): + Optional. The ``Schema`` object allows the definition of + input and output data types. These types can be objects, but + also primitives and arrays. Represents a select subset of an + `OpenAPI 3.0 schema + object `__. If + set, a compatible response_mime_type must also be set. + Compatible mimetypes: ``application/json``: Schema for JSON + response. + + This field is a member of `oneof`_ ``_response_schema``. + response_json_schema (google.protobuf.struct_pb2.Value): + Optional. Output schema of the generated response. This is + an alternative to ``response_schema`` that accepts `JSON + Schema `__. + + If set, ``response_schema`` must be omitted, but + ``response_mime_type`` is required. + + While the full JSON Schema may be sent, not all features are + supported. Specifically, only the following properties are + supported: + + - ``$id`` + - ``$defs`` + - ``$ref`` + - ``$anchor`` + - ``type`` + - ``format`` + - ``title`` + - ``description`` + - ``enum`` (for strings and numbers) + - ``items`` + - ``prefixItems`` + - ``minItems`` + - ``maxItems`` + - ``minimum`` + - ``maximum`` + - ``anyOf`` + - ``oneOf`` (interpreted the same as ``anyOf``) + - ``properties`` + - ``additionalProperties`` + - ``required`` + + The non-standard ``propertyOrdering`` property may also be + set. + + Cyclic references are unrolled to a limited degree and, as + such, may only be used within non-required properties. + (Nullable properties are not sufficient.) If ``$ref`` is set + on a sub-schema, no other properties, except for than those + starting as a ``$``, may be set. + + This field is a member of `oneof`_ ``_response_json_schema``. + routing_config (google.cloud.aiplatform_v1.types.GenerationConfig.RoutingConfig): + Optional. Routing configuration. + + This field is a member of `oneof`_ ``_routing_config``. + audio_timestamp (bool): + Optional. If enabled, audio timestamps will + be included in the request to the model. This + can be useful for synchronizing audio with other + modalities in the response. + + This field is a member of `oneof`_ ``_audio_timestamp``. + response_modalities (MutableSequence[google.cloud.aiplatform_v1.types.GenerationConfig.Modality]): + Optional. The modalities of the response. The model will + generate a response that includes all the specified + modalities. For example, if this is set to + ``[TEXT, IMAGE]``, the response will include both text and + an image. + media_resolution (google.cloud.aiplatform_v1.types.GenerationConfig.MediaResolution): + Optional. The token resolution at which input + media content is sampled. This is used to + control the trade-off between the quality of the + response and the number of tokens used to + represent the media. A higher resolution allows + the model to perceive more detail, which can + lead to a more nuanced response, but it will + also use more tokens. This does not affect the + image dimensions sent to the model. + + This field is a member of `oneof`_ ``_media_resolution``. + speech_config (google.cloud.aiplatform_v1.types.SpeechConfig): + Optional. The speech generation config. + + This field is a member of `oneof`_ ``_speech_config``. + thinking_config (google.cloud.aiplatform_v1.types.GenerationConfig.ThinkingConfig): + Optional. Config for thinking features. + An error will be returned if this field is set + for models that don't support thinking. + image_config (google.cloud.aiplatform_v1.types.ImageConfig): + Optional. Config for image generation + features. + + This field is a member of `oneof`_ ``_image_config``. + """ + + class Modality(proto.Enum): + r"""The modalities of the response. + + Values: + MODALITY_UNSPECIFIED (0): + Unspecified modality. Will be processed as + text. + TEXT (1): + Text modality. + IMAGE (2): + Image modality. + AUDIO (3): + Audio modality. + """ + + MODALITY_UNSPECIFIED = 0 + TEXT = 1 + IMAGE = 2 + AUDIO = 3 + + class MediaResolution(proto.Enum): + r"""Media resolution for the input media. + + Values: + MEDIA_RESOLUTION_UNSPECIFIED (0): + Media resolution has not been set. + MEDIA_RESOLUTION_LOW (1): + Media resolution set to low (64 tokens). + MEDIA_RESOLUTION_MEDIUM (2): + Media resolution set to medium (256 tokens). + MEDIA_RESOLUTION_HIGH (3): + Media resolution set to high (zoomed + reframing with 256 tokens). + """ + + MEDIA_RESOLUTION_UNSPECIFIED = 0 + MEDIA_RESOLUTION_LOW = 1 + MEDIA_RESOLUTION_MEDIUM = 2 + MEDIA_RESOLUTION_HIGH = 3 + + class RoutingConfig(proto.Message): + r"""The configuration for routing the request to a specific + model. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + auto_mode (google.cloud.aiplatform_v1.types.GenerationConfig.RoutingConfig.AutoRoutingMode): + Automated routing. + + This field is a member of `oneof`_ ``routing_config``. + manual_mode (google.cloud.aiplatform_v1.types.GenerationConfig.RoutingConfig.ManualRoutingMode): + Manual routing. + + This field is a member of `oneof`_ ``routing_config``. + """ + + class AutoRoutingMode(proto.Message): + r"""When automated routing is specified, the routing will be + determined by the pretrained routing model and customer provided + model routing preference. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model_routing_preference (google.cloud.aiplatform_v1.types.GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference): + The model routing preference. + + This field is a member of `oneof`_ ``_model_routing_preference``. + """ + + class ModelRoutingPreference(proto.Enum): + r"""The model routing preference. + + Values: + UNKNOWN (0): + Unspecified model routing preference. + PRIORITIZE_QUALITY (1): + Prefer higher quality over low cost. + BALANCED (2): + Balanced model routing preference. + PRIORITIZE_COST (3): + Prefer lower cost over higher quality. + """ + + UNKNOWN = 0 + PRIORITIZE_QUALITY = 1 + BALANCED = 2 + PRIORITIZE_COST = 3 + + model_routing_preference: ( + "GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference" + ) = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum="GenerationConfig.RoutingConfig.AutoRoutingMode.ModelRoutingPreference", + ) + + class ManualRoutingMode(proto.Message): + r"""When manual routing is set, the specified model will be used + directly. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model_name (str): + The model name to use. Only the public LLM + models are accepted. e.g. 'gemini-1.5-pro-001'. + + This field is a member of `oneof`_ ``_model_name``. + """ + + model_name: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + auto_mode: "GenerationConfig.RoutingConfig.AutoRoutingMode" = proto.Field( + proto.MESSAGE, + number=1, + oneof="routing_config", + message="GenerationConfig.RoutingConfig.AutoRoutingMode", + ) + manual_mode: "GenerationConfig.RoutingConfig.ManualRoutingMode" = proto.Field( + proto.MESSAGE, + number=2, + oneof="routing_config", + message="GenerationConfig.RoutingConfig.ManualRoutingMode", + ) + + class ThinkingConfig(proto.Message): + r"""Config for thinking features. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + include_thoughts (bool): + Indicates whether to include thoughts in the + response. If true, thoughts are returned only + when available. + + This field is a member of `oneof`_ ``_include_thoughts``. + thinking_budget (int): + Optional. Indicates the thinking budget in tokens. This is + only applied when enable_thinking is true. + + This field is a member of `oneof`_ ``_thinking_budget``. + thinking_level (google.cloud.aiplatform_v1.types.GenerationConfig.ThinkingConfig.ThinkingLevel): + Optional. The number of thoughts tokens that + the model should generate. + + This field is a member of `oneof`_ ``_thinking_level``. + """ + + class ThinkingLevel(proto.Enum): + r"""The thinking level for the model. + + Values: + THINKING_LEVEL_UNSPECIFIED (0): + Unspecified thinking level. + LOW (1): + Low thinking level. + MEDIUM (2): + Medium thinking level. + HIGH (3): + High thinking level. + MINIMAL (4): + MINIMAL thinking level. + """ + + THINKING_LEVEL_UNSPECIFIED = 0 + LOW = 1 + MEDIUM = 2 + HIGH = 3 + MINIMAL = 4 + + include_thoughts: bool = proto.Field( + proto.BOOL, + number=1, + optional=True, + ) + thinking_budget: int = proto.Field( + proto.INT32, + number=3, + optional=True, + ) + thinking_level: "GenerationConfig.ThinkingConfig.ThinkingLevel" = proto.Field( + proto.ENUM, + number=4, + optional=True, + enum="GenerationConfig.ThinkingConfig.ThinkingLevel", + ) + + temperature: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + top_p: float = proto.Field( + proto.FLOAT, + number=2, + optional=True, + ) + top_k: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + candidate_count: int = proto.Field( + proto.INT32, + number=4, + optional=True, + ) + max_output_tokens: int = proto.Field( + proto.INT32, + number=5, + optional=True, + ) + stop_sequences: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=6, + ) + response_logprobs: bool = proto.Field( + proto.BOOL, + number=18, + optional=True, + ) + logprobs: int = proto.Field( + proto.INT32, + number=7, + optional=True, + ) + presence_penalty: float = proto.Field( + proto.FLOAT, + number=8, + optional=True, + ) + frequency_penalty: float = proto.Field( + proto.FLOAT, + number=9, + optional=True, + ) + seed: int = proto.Field( + proto.INT32, + number=12, + optional=True, + ) + response_mime_type: str = proto.Field( + proto.STRING, + number=13, + ) + response_schema: openapi.Schema = proto.Field( + proto.MESSAGE, + number=16, + optional=True, + message=openapi.Schema, + ) + response_json_schema: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=28, + optional=True, + message=struct_pb2.Value, + ) + routing_config: RoutingConfig = proto.Field( + proto.MESSAGE, + number=17, + optional=True, + message=RoutingConfig, + ) + audio_timestamp: bool = proto.Field( + proto.BOOL, + number=20, + optional=True, + ) + response_modalities: MutableSequence[Modality] = proto.RepeatedField( + proto.ENUM, + number=21, + enum=Modality, + ) + media_resolution: MediaResolution = proto.Field( + proto.ENUM, + number=22, + optional=True, + enum=MediaResolution, + ) + speech_config: "SpeechConfig" = proto.Field( + proto.MESSAGE, + number=23, + optional=True, + message="SpeechConfig", + ) + thinking_config: ThinkingConfig = proto.Field( + proto.MESSAGE, + number=25, + message=ThinkingConfig, + ) + image_config: "ImageConfig" = proto.Field( + proto.MESSAGE, + number=30, + optional=True, + message="ImageConfig", + ) + + +class SafetySetting(proto.Message): + r"""Safety settings. + + Attributes: + category (google.cloud.aiplatform_v1.types.HarmCategory): + Required. Harm category. + threshold (google.cloud.aiplatform_v1.types.SafetySetting.HarmBlockThreshold): + Required. The harm block threshold. + method (google.cloud.aiplatform_v1.types.SafetySetting.HarmBlockMethod): + Optional. Specify if the threshold is used + for probability or severity score. If not + specified, the threshold is used for probability + score. + """ + + class HarmBlockThreshold(proto.Enum): + r"""Probability based thresholds levels for blocking. + + Values: + HARM_BLOCK_THRESHOLD_UNSPECIFIED (0): + Unspecified harm block threshold. + BLOCK_LOW_AND_ABOVE (1): + Block low threshold and above (i.e. block + more). + BLOCK_MEDIUM_AND_ABOVE (2): + Block medium threshold and above. + BLOCK_ONLY_HIGH (3): + Block only high threshold (i.e. block less). + BLOCK_NONE (4): + Block none. + OFF (5): + Turn off the safety filter. + """ + + HARM_BLOCK_THRESHOLD_UNSPECIFIED = 0 + BLOCK_LOW_AND_ABOVE = 1 + BLOCK_MEDIUM_AND_ABOVE = 2 + BLOCK_ONLY_HIGH = 3 + BLOCK_NONE = 4 + OFF = 5 + + class HarmBlockMethod(proto.Enum): + r"""Probability vs severity. + + Values: + HARM_BLOCK_METHOD_UNSPECIFIED (0): + The harm block method is unspecified. + SEVERITY (1): + The harm block method uses both probability + and severity scores. + PROBABILITY (2): + The harm block method uses the probability + score. + """ + + HARM_BLOCK_METHOD_UNSPECIFIED = 0 + SEVERITY = 1 + PROBABILITY = 2 + + category: "HarmCategory" = proto.Field( + proto.ENUM, + number=1, + enum="HarmCategory", + ) + threshold: HarmBlockThreshold = proto.Field( + proto.ENUM, + number=2, + enum=HarmBlockThreshold, + ) + method: HarmBlockMethod = proto.Field( + proto.ENUM, + number=4, + enum=HarmBlockMethod, + ) + + +class SafetyRating(proto.Message): + r"""Safety rating corresponding to the generated content. + + Attributes: + category (google.cloud.aiplatform_v1.types.HarmCategory): + Output only. Harm category. + probability (google.cloud.aiplatform_v1.types.SafetyRating.HarmProbability): + Output only. Harm probability levels in the + content. + probability_score (float): + Output only. Harm probability score. + severity (google.cloud.aiplatform_v1.types.SafetyRating.HarmSeverity): + Output only. Harm severity levels in the + content. + severity_score (float): + Output only. Harm severity score. + blocked (bool): + Output only. Indicates whether the content + was filtered out because of this rating. + """ + + class HarmProbability(proto.Enum): + r"""Harm probability levels in the content. + + Values: + HARM_PROBABILITY_UNSPECIFIED (0): + Harm probability unspecified. + NEGLIGIBLE (1): + Negligible level of harm. + LOW (2): + Low level of harm. + MEDIUM (3): + Medium level of harm. + HIGH (4): + High level of harm. + """ + + HARM_PROBABILITY_UNSPECIFIED = 0 + NEGLIGIBLE = 1 + LOW = 2 + MEDIUM = 3 + HIGH = 4 + + class HarmSeverity(proto.Enum): + r"""Harm severity levels. + + Values: + HARM_SEVERITY_UNSPECIFIED (0): + Harm severity unspecified. + HARM_SEVERITY_NEGLIGIBLE (1): + Negligible level of harm severity. + HARM_SEVERITY_LOW (2): + Low level of harm severity. + HARM_SEVERITY_MEDIUM (3): + Medium level of harm severity. + HARM_SEVERITY_HIGH (4): + High level of harm severity. + """ + + HARM_SEVERITY_UNSPECIFIED = 0 + HARM_SEVERITY_NEGLIGIBLE = 1 + HARM_SEVERITY_LOW = 2 + HARM_SEVERITY_MEDIUM = 3 + HARM_SEVERITY_HIGH = 4 + + category: "HarmCategory" = proto.Field( + proto.ENUM, + number=1, + enum="HarmCategory", + ) + probability: HarmProbability = proto.Field( + proto.ENUM, + number=2, + enum=HarmProbability, + ) + probability_score: float = proto.Field( + proto.FLOAT, + number=5, + ) + severity: HarmSeverity = proto.Field( + proto.ENUM, + number=6, + enum=HarmSeverity, + ) + severity_score: float = proto.Field( + proto.FLOAT, + number=7, + ) + blocked: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class CitationMetadata(proto.Message): + r"""A collection of source attributions for a piece of content. + + Attributes: + citations (MutableSequence[google.cloud.aiplatform_v1.types.Citation]): + Output only. List of citations. + """ + + citations: MutableSequence["Citation"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="Citation", + ) + + +class Citation(proto.Message): + r"""Source attributions for content. + + Attributes: + start_index (int): + Output only. Start index into the content. + end_index (int): + Output only. End index into the content. + uri (str): + Output only. Url reference of the + attribution. + title (str): + Output only. Title of the attribution. + license_ (str): + Output only. License of the attribution. + publication_date (google.type.date_pb2.Date): + Output only. Publication date of the + attribution. + """ + + start_index: int = proto.Field( + proto.INT32, + number=1, + ) + end_index: int = proto.Field( + proto.INT32, + number=2, + ) + uri: str = proto.Field( + proto.STRING, + number=3, + ) + title: str = proto.Field( + proto.STRING, + number=4, + ) + license_: str = proto.Field( + proto.STRING, + number=5, + ) + publication_date: date_pb2.Date = proto.Field( + proto.MESSAGE, + number=6, + message=date_pb2.Date, + ) + + +class Candidate(proto.Message): + r"""A response candidate generated from the model. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + index (int): + Output only. Index of the candidate. + content (google.cloud.aiplatform_v1.types.Content): + Output only. Content parts of the candidate. + score (float): + Output only. Confidence score of the + candidate. + avg_logprobs (float): + Output only. Average log probability score of + the candidate. + logprobs_result (google.cloud.aiplatform_v1.types.LogprobsResult): + Output only. Log-likelihood scores for the + response tokens and top tokens + finish_reason (google.cloud.aiplatform_v1.types.Candidate.FinishReason): + Output only. The reason why the model stopped + generating tokens. If empty, the model has not + stopped generating the tokens. + safety_ratings (MutableSequence[google.cloud.aiplatform_v1.types.SafetyRating]): + Output only. List of ratings for the safety + of a response candidate. + There is at most one rating per category. + finish_message (str): + Output only. Describes the reason the mode stopped + generating tokens in more detail. This is only filled when + ``finish_reason`` is set. + + This field is a member of `oneof`_ ``_finish_message``. + citation_metadata (google.cloud.aiplatform_v1.types.CitationMetadata): + Output only. Source attribution of the + generated content. + grounding_metadata (google.cloud.aiplatform_v1.types.GroundingMetadata): + Output only. Metadata specifies sources used + to ground generated content. + url_context_metadata (google.cloud.aiplatform_v1.types.UrlContextMetadata): + Output only. Metadata related to url context + retrieval tool. + """ + + class FinishReason(proto.Enum): + r"""The reason why the model stopped generating tokens. + If empty, the model has not stopped generating the tokens. + + Values: + FINISH_REASON_UNSPECIFIED (0): + The finish reason is unspecified. + STOP (1): + Token generation reached a natural stopping + point or a configured stop sequence. + MAX_TOKENS (2): + Token generation reached the configured + maximum output tokens. + SAFETY (3): + Token generation stopped because the content potentially + contains safety violations. NOTE: When streaming, + [content][google.cloud.aiplatform.v1.Candidate.content] is + empty if content filters blocks the output. + RECITATION (4): + Token generation stopped because the content + potentially contains copyright violations. + OTHER (5): + All other reasons that stopped the token + generation. + BLOCKLIST (6): + Token generation stopped because the content + contains forbidden terms. + PROHIBITED_CONTENT (7): + Token generation stopped for potentially + containing prohibited content. + SPII (8): + Token generation stopped because the content + potentially contains Sensitive Personally + Identifiable Information (SPII). + MALFORMED_FUNCTION_CALL (9): + The function call generated by the model is + invalid. + MODEL_ARMOR (10): + The model response was blocked by Model + Armor. + """ + + FINISH_REASON_UNSPECIFIED = 0 + STOP = 1 + MAX_TOKENS = 2 + SAFETY = 3 + RECITATION = 4 + OTHER = 5 + BLOCKLIST = 6 + PROHIBITED_CONTENT = 7 + SPII = 8 + MALFORMED_FUNCTION_CALL = 9 + MODEL_ARMOR = 10 + + index: int = proto.Field( + proto.INT32, + number=1, + ) + content: "Content" = proto.Field( + proto.MESSAGE, + number=2, + message="Content", + ) + score: float = proto.Field( + proto.DOUBLE, + number=8, + ) + avg_logprobs: float = proto.Field( + proto.DOUBLE, + number=9, + ) + logprobs_result: "LogprobsResult" = proto.Field( + proto.MESSAGE, + number=10, + message="LogprobsResult", + ) + finish_reason: FinishReason = proto.Field( + proto.ENUM, + number=3, + enum=FinishReason, + ) + safety_ratings: MutableSequence["SafetyRating"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="SafetyRating", + ) + finish_message: str = proto.Field( + proto.STRING, + number=5, + optional=True, + ) + citation_metadata: "CitationMetadata" = proto.Field( + proto.MESSAGE, + number=6, + message="CitationMetadata", + ) + grounding_metadata: "GroundingMetadata" = proto.Field( + proto.MESSAGE, + number=7, + message="GroundingMetadata", + ) + url_context_metadata: "UrlContextMetadata" = proto.Field( + proto.MESSAGE, + number=11, + message="UrlContextMetadata", + ) + + +class UrlContextMetadata(proto.Message): + r"""Metadata related to url context retrieval tool. + + Attributes: + url_metadata (MutableSequence[google.cloud.aiplatform_v1.types.UrlMetadata]): + Output only. List of url context. + """ + + url_metadata: MutableSequence["UrlMetadata"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="UrlMetadata", + ) + + +class UrlMetadata(proto.Message): + r"""Context of the a single url retrieval. + + Attributes: + retrieved_url (str): + Retrieved url by the tool. + url_retrieval_status (google.cloud.aiplatform_v1.types.UrlMetadata.UrlRetrievalStatus): + Status of the url retrieval. + """ + + class UrlRetrievalStatus(proto.Enum): + r"""Status of the url retrieval. + + Values: + URL_RETRIEVAL_STATUS_UNSPECIFIED (0): + Default value. This value is unused. + URL_RETRIEVAL_STATUS_SUCCESS (1): + Url retrieval is successful. + URL_RETRIEVAL_STATUS_ERROR (2): + Url retrieval is failed due to error. + """ + + URL_RETRIEVAL_STATUS_UNSPECIFIED = 0 + URL_RETRIEVAL_STATUS_SUCCESS = 1 + URL_RETRIEVAL_STATUS_ERROR = 2 + + retrieved_url: str = proto.Field( + proto.STRING, + number=1, + ) + url_retrieval_status: UrlRetrievalStatus = proto.Field( + proto.ENUM, + number=2, + enum=UrlRetrievalStatus, + ) + + +class LogprobsResult(proto.Message): + r"""Logprobs Result + + Attributes: + top_candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.TopCandidates]): + Length = total number of decoding steps. + chosen_candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.Candidate]): + Length = total number of decoding steps. The chosen + candidates may or may not be in top_candidates. + """ + + class Candidate(proto.Message): + r"""Candidate for the logprobs token and score. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + token (str): + The candidate’s token string value. + + This field is a member of `oneof`_ ``_token``. + token_id (int): + The candidate’s token id value. + + This field is a member of `oneof`_ ``_token_id``. + log_probability (float): + The candidate's log probability. + + This field is a member of `oneof`_ ``_log_probability``. + """ + + token: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + token_id: int = proto.Field( + proto.INT32, + number=3, + optional=True, + ) + log_probability: float = proto.Field( + proto.FLOAT, + number=2, + optional=True, + ) + + class TopCandidates(proto.Message): + r"""Candidates with top log probabilities at each decoding step. + + Attributes: + candidates (MutableSequence[google.cloud.aiplatform_v1.types.LogprobsResult.Candidate]): + Sorted by log probability in descending + order. + """ + + candidates: MutableSequence["LogprobsResult.Candidate"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="LogprobsResult.Candidate", + ) + + top_candidates: MutableSequence[TopCandidates] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=TopCandidates, + ) + chosen_candidates: MutableSequence[Candidate] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=Candidate, + ) + + +class Segment(proto.Message): + r"""Segment of the content. + + Attributes: + part_index (int): + Output only. The index of a Part object + within its parent Content object. + start_index (int): + Output only. Start index in the given Part, + measured in bytes. Offset from the start of the + Part, inclusive, starting at zero. + end_index (int): + Output only. End index in the given Part, + measured in bytes. Offset from the start of the + Part, exclusive, starting at zero. + text (str): + Output only. The text corresponding to the + segment from the response. + """ + + part_index: int = proto.Field( + proto.INT32, + number=1, + ) + start_index: int = proto.Field( + proto.INT32, + number=2, + ) + end_index: int = proto.Field( + proto.INT32, + number=3, + ) + text: str = proto.Field( + proto.STRING, + number=4, + ) + + +class GroundingChunk(proto.Message): + r"""Grounding chunk. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + web (google.cloud.aiplatform_v1.types.GroundingChunk.Web): + Grounding chunk from the web. + + This field is a member of `oneof`_ ``chunk_type``. + retrieved_context (google.cloud.aiplatform_v1.types.GroundingChunk.RetrievedContext): + Grounding chunk from context retrieved by the + retrieval tools. + + This field is a member of `oneof`_ ``chunk_type``. + maps (google.cloud.aiplatform_v1.types.GroundingChunk.Maps): + Grounding chunk from Google Maps. + + This field is a member of `oneof`_ ``chunk_type``. + """ + + class Web(proto.Message): + r"""Chunk from the web. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + uri (str): + URI reference of the chunk. + + This field is a member of `oneof`_ ``_uri``. + title (str): + Title of the chunk. + + This field is a member of `oneof`_ ``_title``. + """ + + uri: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + title: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + class RetrievedContext(proto.Message): + r"""Chunk from context retrieved by the retrieval tools. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rag_chunk (google.cloud.aiplatform_v1.types.RagChunk): + Additional context for the RAG retrieval + result. This is only populated when using the + RAG retrieval tool. + + This field is a member of `oneof`_ ``context_details``. + uri (str): + URI reference of the attribution. + + This field is a member of `oneof`_ ``_uri``. + title (str): + Title of the attribution. + + This field is a member of `oneof`_ ``_title``. + text (str): + Text of the attribution. + + This field is a member of `oneof`_ ``_text``. + document_name (str): + Output only. The full document name for the + referenced Vertex AI Search document. + + This field is a member of `oneof`_ ``_document_name``. + """ + + rag_chunk: vertex_rag_data.RagChunk = proto.Field( + proto.MESSAGE, + number=4, + oneof="context_details", + message=vertex_rag_data.RagChunk, + ) + uri: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + title: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + text: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + document_name: str = proto.Field( + proto.STRING, + number=6, + optional=True, + ) + + class Maps(proto.Message): + r"""Chunk from Google Maps. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + uri (str): + URI reference of the chunk. + + This field is a member of `oneof`_ ``_uri``. + title (str): + Title of the chunk. + + This field is a member of `oneof`_ ``_title``. + text (str): + Text of the chunk. + + This field is a member of `oneof`_ ``_text``. + place_id (str): + This Place's resource name, in ``places/{place_id}`` format. + Can be used to look up the Place. + + This field is a member of `oneof`_ ``_place_id``. + place_answer_sources (google.cloud.aiplatform_v1.types.GroundingChunk.Maps.PlaceAnswerSources): + Sources used to generate the place answer. + This includes review snippets and photos that + were used to generate the answer, as well as + uris to flag content. + """ + + class PlaceAnswerSources(proto.Message): + r""" + + Attributes: + review_snippets (MutableSequence[google.cloud.aiplatform_v1.types.GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet]): + Snippets of reviews that are used to generate + the answer. + """ + + class ReviewSnippet(proto.Message): + r"""Encapsulates a review snippet. + + Attributes: + review_id (str): + Id of the review referencing the place. + google_maps_uri (str): + A link to show the review on Google Maps. + title (str): + Title of the review. + """ + + review_id: str = proto.Field( + proto.STRING, + number=1, + ) + google_maps_uri: str = proto.Field( + proto.STRING, + number=2, + ) + title: str = proto.Field( + proto.STRING, + number=3, + ) + + review_snippets: MutableSequence[ + "GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="GroundingChunk.Maps.PlaceAnswerSources.ReviewSnippet", + ) + + uri: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + title: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + text: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + place_id: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + place_answer_sources: "GroundingChunk.Maps.PlaceAnswerSources" = proto.Field( + proto.MESSAGE, + number=5, + message="GroundingChunk.Maps.PlaceAnswerSources", + ) + + web: Web = proto.Field( + proto.MESSAGE, + number=1, + oneof="chunk_type", + message=Web, + ) + retrieved_context: RetrievedContext = proto.Field( + proto.MESSAGE, + number=2, + oneof="chunk_type", + message=RetrievedContext, + ) + maps: Maps = proto.Field( + proto.MESSAGE, + number=3, + oneof="chunk_type", + message=Maps, + ) + + +class GroundingSupport(proto.Message): + r"""Grounding support. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + segment (google.cloud.aiplatform_v1.types.Segment): + Segment of the content this support belongs + to. + + This field is a member of `oneof`_ ``_segment``. + grounding_chunk_indices (MutableSequence[int]): + A list of indices (into 'grounding_chunk') specifying the + citations associated with the claim. For instance [1,3,4] + means that grounding_chunk[1], grounding_chunk[3], + grounding_chunk[4] are the retrieved content attributed to + the claim. + confidence_scores (MutableSequence[float]): + Confidence score of the support references. Ranges from 0 to + 1. 1 is the most confident. This list must have the same + size as the grounding_chunk_indices. + """ + + segment: "Segment" = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message="Segment", + ) + grounding_chunk_indices: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=2, + ) + confidence_scores: MutableSequence[float] = proto.RepeatedField( + proto.FLOAT, + number=3, + ) + + +class GroundingMetadata(proto.Message): + r"""Metadata returned to client when grounding is enabled. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + web_search_queries (MutableSequence[str]): + Optional. Web search queries for the + following-up web search. + search_entry_point (google.cloud.aiplatform_v1.types.SearchEntryPoint): + Optional. Google search entry for the + following-up web searches. + + This field is a member of `oneof`_ ``_search_entry_point``. + grounding_chunks (MutableSequence[google.cloud.aiplatform_v1.types.GroundingChunk]): + List of supporting references retrieved from + specified grounding source. + grounding_supports (MutableSequence[google.cloud.aiplatform_v1.types.GroundingSupport]): + Optional. List of grounding support. + retrieval_metadata (google.cloud.aiplatform_v1.types.RetrievalMetadata): + Optional. Output only. Retrieval metadata. + + This field is a member of `oneof`_ ``_retrieval_metadata``. + google_maps_widget_context_token (str): + Optional. Output only. Resource name of the + Google Maps widget context token to be used with + the PlacesContextElement widget to render + contextual data. This is populated only for + Google Maps grounding. + + This field is a member of `oneof`_ ``_google_maps_widget_context_token``. + source_flagging_uris (MutableSequence[google.cloud.aiplatform_v1.types.GroundingMetadata.SourceFlaggingUri]): + List of source flagging uris. This is + currently populated only for Google Maps + grounding. + """ + + class SourceFlaggingUri(proto.Message): + r"""Source content flagging uri for a place or review. This is + currently populated only for Google Maps grounding. + + Attributes: + source_id (str): + Id of the place or review. + flag_content_uri (str): + A link where users can flag a problem with + the source (place or review). (-- The link is + generated by Google and it does not contain + information from the user query. It may contain + information of the content it is flagging, which + can be used to identify places. --) + """ + + source_id: str = proto.Field( + proto.STRING, + number=1, + ) + flag_content_uri: str = proto.Field( + proto.STRING, + number=2, + ) + + web_search_queries: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + search_entry_point: "SearchEntryPoint" = proto.Field( + proto.MESSAGE, + number=4, + optional=True, + message="SearchEntryPoint", + ) + grounding_chunks: MutableSequence["GroundingChunk"] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message="GroundingChunk", + ) + grounding_supports: MutableSequence["GroundingSupport"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="GroundingSupport", + ) + retrieval_metadata: "RetrievalMetadata" = proto.Field( + proto.MESSAGE, + number=7, + optional=True, + message="RetrievalMetadata", + ) + google_maps_widget_context_token: str = proto.Field( + proto.STRING, + number=8, + optional=True, + ) + source_flagging_uris: MutableSequence[SourceFlaggingUri] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message=SourceFlaggingUri, + ) + + +class SearchEntryPoint(proto.Message): + r"""Google search entry point. + + Attributes: + rendered_content (str): + Optional. Web content snippet that can be + embedded in a web page or an app webview. + sdk_blob (bytes): + Optional. Base64 encoded JSON representing + array of tuple. + """ + + rendered_content: str = proto.Field( + proto.STRING, + number=1, + ) + sdk_blob: bytes = proto.Field( + proto.BYTES, + number=2, + ) + + +class RetrievalMetadata(proto.Message): + r"""Metadata related to retrieval in the grounding flow. + + Attributes: + google_search_dynamic_retrieval_score (float): + Optional. Score indicating how likely information from + Google Search could help answer the prompt. The score is in + the range ``[0, 1]``, where 0 is the least likely and 1 is + the most likely. This score is only populated when Google + Search grounding and dynamic retrieval is enabled. It will + be compared to the threshold to determine whether to trigger + Google Search. + """ + + google_search_dynamic_retrieval_score: float = proto.Field( + proto.FLOAT, + number=2, + ) + + +class ModelArmorConfig(proto.Message): + r"""Configuration for Model Armor integrations of prompt and + responses. + + Attributes: + prompt_template_name (str): + Optional. The name of the Model Armor + template to use for prompt sanitization. + response_template_name (str): + Optional. The name of the Model Armor + template to use for response sanitization. + """ + + prompt_template_name: str = proto.Field( + proto.STRING, + number=1, + ) + response_template_name: str = proto.Field( + proto.STRING, + number=2, + ) + + +class ModalityTokenCount(proto.Message): + r"""Represents token counting info for a single modality. + + Attributes: + modality (google.cloud.aiplatform_v1.types.Modality): + The modality associated with this token + count. + token_count (int): + Number of tokens. + """ + + modality: "Modality" = proto.Field( + proto.ENUM, + number=1, + enum="Modality", + ) + token_count: int = proto.Field( + proto.INT32, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/custom_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/custom_job.py new file mode 100644 index 0000000000000000000000000000000000000000..ac4840216be382b610cedf913afae75b3ec821b1 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/custom_job.py @@ -0,0 +1,644 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import env_var +from google.cloud.aiplatform_v1.types import io +from google.cloud.aiplatform_v1.types import job_state +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import service_networking +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CustomJob", + "CustomJobSpec", + "WorkerPoolSpec", + "ContainerSpec", + "PythonPackageSpec", + "Scheduling", + }, +) + + +class CustomJob(proto.Message): + r"""Represents a job that runs custom workloads such as a Docker + container or a Python package. A CustomJob can have multiple + worker pools and each worker pool can have its own machine and + input spec. A CustomJob will be cleaned up once the job enters + terminal state (failed or succeeded). + + Attributes: + name (str): + Output only. Resource name of a CustomJob. + display_name (str): + Required. The display name of the CustomJob. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + job_spec (google.cloud.aiplatform_v1.types.CustomJobSpec): + Required. Job spec. + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the job. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the CustomJob was + created. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the CustomJob for the first time + entered the ``JOB_STATE_RUNNING`` state. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the CustomJob entered any of the + following states: ``JOB_STATE_SUCCEEDED``, + ``JOB_STATE_FAILED``, ``JOB_STATE_CANCELLED``. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the CustomJob was most + recently updated. + error (google.rpc.status_pb2.Status): + Output only. Only populated when job's state is + ``JOB_STATE_FAILED`` or ``JOB_STATE_CANCELLED``. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize CustomJobs. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key options for a + CustomJob. If this is set, then all resources + created by the CustomJob will be encrypted with + the provided encryption key. + web_access_uris (MutableMapping[str, str]): + Output only. URIs for accessing `interactive + shells `__ + (one URI for each training node). Only available if + [job_spec.enable_web_access][google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access] + is ``true``. + + The keys are names of each node in the training job; for + example, ``workerpool0-0`` for the primary node, + ``workerpool1-0`` for the first node in the second worker + pool, and ``workerpool1-1`` for the second node in the + second worker pool. + + The values are the URIs for each node's interactive shell. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + job_spec: "CustomJobSpec" = proto.Field( + proto.MESSAGE, + number=4, + message="CustomJobSpec", + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=5, + enum=job_state.JobState, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=10, + message=status_pb2.Status, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=11, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=12, + message=gca_encryption_spec.EncryptionSpec, + ) + web_access_uris: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=16, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=18, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=19, + ) + + +class CustomJobSpec(proto.Message): + r"""Represents the spec of a CustomJob. + + Attributes: + persistent_resource_id (str): + Optional. The ID of the PersistentResource in + the same Project and Location which to run + + If this is specified, the job will be run on + existing machines held by the PersistentResource + instead of on-demand short-live machines. The + network and CMEK configs on the job should be + consistent with those on the PersistentResource, + otherwise, the job will be rejected. + worker_pool_specs (MutableSequence[google.cloud.aiplatform_v1.types.WorkerPoolSpec]): + Required. The spec of the worker pools + including machine type and Docker image. All + worker pools except the first one are optional + and can be skipped by providing an empty value. + scheduling (google.cloud.aiplatform_v1.types.Scheduling): + Scheduling options for a CustomJob. + service_account (str): + Specifies the service account for workload run-as account. + Users submitting jobs must have act-as permission on this + run-as account. If unspecified, the `Vertex AI Custom Code + Service + Agent `__ + for the CustomJob's project is used. + network (str): + Optional. The full name of the Compute Engine + `network `__ + to which the Job should be peered. For example, + ``projects/12345/global/networks/myVPC``. + `Format `__ + is of the form + ``projects/{project}/global/networks/{network}``. Where + {project} is a project number, as in ``12345``, and + {network} is a network name. + + To specify this field, you must have already `configured VPC + Network Peering for Vertex + AI `__. + + If this field is left unspecified, the job is not peered + with any network. + reserved_ip_ranges (MutableSequence[str]): + Optional. A list of names for the reserved ip ranges under + the VPC network that can be used for this job. + + If set, we will deploy the job within the provided ip + ranges. Otherwise, the job will be deployed to any ip ranges + under the provided VPC network. + + Example: ['vertex-ai-ip-range']. + psc_interface_config (google.cloud.aiplatform_v1.types.PscInterfaceConfig): + Optional. Configuration for PSC-I for + CustomJob. + base_output_directory (google.cloud.aiplatform_v1.types.GcsDestination): + The Cloud Storage location to store the output of this + CustomJob or HyperparameterTuningJob. For + HyperparameterTuningJob, the baseOutputDirectory of each + child CustomJob backing a Trial is set to a subdirectory of + name [id][google.cloud.aiplatform.v1.Trial.id] under its + parent HyperparameterTuningJob's baseOutputDirectory. + + The following Vertex AI environment variables will be passed + to containers or python modules when this field is set: + + For CustomJob: + + - AIP_MODEL_DIR = ``/model/`` + - AIP_CHECKPOINT_DIR = + ``/checkpoints/`` + - AIP_TENSORBOARD_LOG_DIR = + ``/logs/`` + + For CustomJob backing a Trial of HyperparameterTuningJob: + + - AIP_MODEL_DIR = + ``//model/`` + - AIP_CHECKPOINT_DIR = + ``//checkpoints/`` + - AIP_TENSORBOARD_LOG_DIR = + ``//logs/`` + protected_artifact_location_id (str): + The ID of the location to store protected + artifacts. e.g. us-central1. Populate only when + the location is different than CustomJob + location. List of supported locations: + + https://cloud.google.com/vertex-ai/docs/general/locations + tensorboard (str): + Optional. The name of a Vertex AI + [Tensorboard][google.cloud.aiplatform.v1.Tensorboard] + resource to which this CustomJob will upload Tensorboard + logs. Format: + ``projects/{project}/locations/{location}/tensorboards/{tensorboard}`` + enable_web_access (bool): + Optional. Whether you want Vertex AI to enable `interactive + shell + access `__ + to training containers. + + If set to ``true``, you can access interactive shells at the + URIs given by + [CustomJob.web_access_uris][google.cloud.aiplatform.v1.CustomJob.web_access_uris] + or + [Trial.web_access_uris][google.cloud.aiplatform.v1.Trial.web_access_uris] + (within + [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]). + enable_dashboard_access (bool): + Optional. Whether you want Vertex AI to enable access to the + customized dashboard in training chief container. + + If set to ``true``, you can access the dashboard at the URIs + given by + [CustomJob.web_access_uris][google.cloud.aiplatform.v1.CustomJob.web_access_uris] + or + [Trial.web_access_uris][google.cloud.aiplatform.v1.Trial.web_access_uris] + (within + [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials]). + experiment (str): + Optional. The Experiment associated with this job. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}`` + experiment_run (str): + Optional. The Experiment Run associated with this job. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadataStores}/contexts/{experiment-name}-{experiment-run-name}`` + models (MutableSequence[str]): + Optional. The name of the Model resources for which to + generate a mapping to artifact URIs. Applicable only to some + of the Google-provided custom jobs. Format: + ``projects/{project}/locations/{location}/models/{model}`` + + In order to retrieve a specific version of the model, also + provide the version ID or version alias. Example: + ``projects/{project}/locations/{location}/models/{model}@2`` + or + ``projects/{project}/locations/{location}/models/{model}@golden`` + If no version ID or alias is specified, the "default" + version will be returned. The "default" version alias is + created for the first version of the model, and can be moved + to other versions later on. There will be exactly one + default version. + """ + + persistent_resource_id: str = proto.Field( + proto.STRING, + number=14, + ) + worker_pool_specs: MutableSequence["WorkerPoolSpec"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="WorkerPoolSpec", + ) + scheduling: "Scheduling" = proto.Field( + proto.MESSAGE, + number=3, + message="Scheduling", + ) + service_account: str = proto.Field( + proto.STRING, + number=4, + ) + network: str = proto.Field( + proto.STRING, + number=5, + ) + reserved_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=13, + ) + psc_interface_config: service_networking.PscInterfaceConfig = proto.Field( + proto.MESSAGE, + number=21, + message=service_networking.PscInterfaceConfig, + ) + base_output_directory: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=6, + message=io.GcsDestination, + ) + protected_artifact_location_id: str = proto.Field( + proto.STRING, + number=19, + ) + tensorboard: str = proto.Field( + proto.STRING, + number=7, + ) + enable_web_access: bool = proto.Field( + proto.BOOL, + number=10, + ) + enable_dashboard_access: bool = proto.Field( + proto.BOOL, + number=16, + ) + experiment: str = proto.Field( + proto.STRING, + number=17, + ) + experiment_run: str = proto.Field( + proto.STRING, + number=18, + ) + models: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=20, + ) + + +class WorkerPoolSpec(proto.Message): + r"""Represents the spec of a worker pool in a job. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + container_spec (google.cloud.aiplatform_v1.types.ContainerSpec): + The custom container task. + + This field is a member of `oneof`_ ``task``. + python_package_spec (google.cloud.aiplatform_v1.types.PythonPackageSpec): + The Python packaged task. + + This field is a member of `oneof`_ ``task``. + machine_spec (google.cloud.aiplatform_v1.types.MachineSpec): + Optional. Immutable. The specification of a + single machine. + replica_count (int): + Optional. The number of worker replicas to + use for this worker pool. + nfs_mounts (MutableSequence[google.cloud.aiplatform_v1.types.NfsMount]): + Optional. List of NFS mount spec. + lustre_mounts (MutableSequence[google.cloud.aiplatform_v1.types.LustreMount]): + Optional. List of Lustre mounts. + disk_spec (google.cloud.aiplatform_v1.types.DiskSpec): + Disk spec. + """ + + container_spec: "ContainerSpec" = proto.Field( + proto.MESSAGE, + number=6, + oneof="task", + message="ContainerSpec", + ) + python_package_spec: "PythonPackageSpec" = proto.Field( + proto.MESSAGE, + number=7, + oneof="task", + message="PythonPackageSpec", + ) + machine_spec: machine_resources.MachineSpec = proto.Field( + proto.MESSAGE, + number=1, + message=machine_resources.MachineSpec, + ) + replica_count: int = proto.Field( + proto.INT64, + number=2, + ) + nfs_mounts: MutableSequence[machine_resources.NfsMount] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=machine_resources.NfsMount, + ) + lustre_mounts: MutableSequence[machine_resources.LustreMount] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message=machine_resources.LustreMount, + ) + disk_spec: machine_resources.DiskSpec = proto.Field( + proto.MESSAGE, + number=5, + message=machine_resources.DiskSpec, + ) + + +class ContainerSpec(proto.Message): + r"""The spec of a Container. + + Attributes: + image_uri (str): + Required. The URI of a container image in the + Container Registry that is to be run on each + worker replica. + command (MutableSequence[str]): + The command to be invoked when the container + is started. It overrides the entrypoint + instruction in Dockerfile when provided. + args (MutableSequence[str]): + The arguments to be passed when starting the + container. + env (MutableSequence[google.cloud.aiplatform_v1.types.EnvVar]): + Environment variables to be passed to the + container. Maximum limit is 100. + """ + + image_uri: str = proto.Field( + proto.STRING, + number=1, + ) + command: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + args: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + env: MutableSequence[env_var.EnvVar] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=env_var.EnvVar, + ) + + +class PythonPackageSpec(proto.Message): + r"""The spec of a Python packaged code. + + Attributes: + executor_image_uri (str): + Required. The URI of a container image in Artifact Registry + that will run the provided Python package. Vertex AI + provides a wide range of executor images with pre-installed + packages to meet users' various use cases. See the list of + `pre-built containers for + training `__. + You must use an image from this list. + package_uris (MutableSequence[str]): + Required. The Google Cloud Storage location + of the Python package files which are the + training program and its dependent packages. The + maximum number of package URIs is 100. + python_module (str): + Required. The Python module name to run after + installing the packages. + args (MutableSequence[str]): + Command line arguments to be passed to the + Python task. + env (MutableSequence[google.cloud.aiplatform_v1.types.EnvVar]): + Environment variables to be passed to the + python module. Maximum limit is 100. + """ + + executor_image_uri: str = proto.Field( + proto.STRING, + number=1, + ) + package_uris: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + python_module: str = proto.Field( + proto.STRING, + number=3, + ) + args: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + env: MutableSequence[env_var.EnvVar] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=env_var.EnvVar, + ) + + +class Scheduling(proto.Message): + r"""All parameters related to queuing and scheduling of custom + jobs. + + Attributes: + timeout (google.protobuf.duration_pb2.Duration): + Optional. The maximum job running time. The + default is 7 days. + restart_job_on_worker_restart (bool): + Optional. Restarts the entire CustomJob if a + worker gets restarted. This feature can be used + by distributed training jobs that are not + resilient to workers leaving and joining a job. + strategy (google.cloud.aiplatform_v1.types.Scheduling.Strategy): + Optional. This determines which type of + scheduling strategy to use. + disable_retries (bool): + Optional. Indicates if the job should retry for internal + errors after the job starts running. If true, overrides + ``Scheduling.restart_job_on_worker_restart`` to false. + max_wait_duration (google.protobuf.duration_pb2.Duration): + Optional. This is the maximum duration that a job will wait + for the requested resources to be provisioned if the + scheduling strategy is set to [Strategy.DWS_FLEX_START]. If + set to 0, the job will wait indefinitely. The default is 24 + hours. + """ + + class Strategy(proto.Enum): + r"""Optional. This determines which type of scheduling strategy + to use. Right now users have two options such as STANDARD which + will use regular on demand resources to schedule the job, the + other is SPOT which would leverage spot resources alongwith + regular resources to schedule the job. + + Values: + STRATEGY_UNSPECIFIED (0): + Strategy will default to STANDARD. + ON_DEMAND (1): + Deprecated. Regular on-demand provisioning + strategy. + LOW_COST (2): + Deprecated. Low cost by making potential use + of spot resources. + STANDARD (3): + Standard provisioning strategy uses regular + on-demand resources. + SPOT (4): + Spot provisioning strategy uses spot + resources. + FLEX_START (6): + Flex Start strategy uses DWS to queue for + resources. + """ + + STRATEGY_UNSPECIFIED = 0 + ON_DEMAND = 1 + LOW_COST = 2 + STANDARD = 3 + SPOT = 4 + FLEX_START = 6 + + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + restart_job_on_worker_restart: bool = proto.Field( + proto.BOOL, + number=3, + ) + strategy: Strategy = proto.Field( + proto.ENUM, + number=4, + enum=Strategy, + ) + disable_retries: bool = proto.Field( + proto.BOOL, + number=5, + ) + max_wait_duration: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=6, + message=duration_pb2.Duration, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_foundry_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_foundry_service.py new file mode 100644 index 0000000000000000000000000000000000000000..8d1c9bb36aee2395bbb67583d37e392cea8ccddc --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_foundry_service.py @@ -0,0 +1,216 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content as gca_content + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "GenerateSyntheticDataRequest", + "SyntheticField", + "SyntheticExample", + "OutputFieldSpec", + "TaskDescriptionStrategy", + "GenerateSyntheticDataResponse", + }, +) + + +class GenerateSyntheticDataRequest(proto.Message): + r"""Request message for DataFoundryService.GenerateSyntheticData. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + task_description (google.cloud.aiplatform_v1.types.TaskDescriptionStrategy): + Generate data from a high-level task + description. + + This field is a member of `oneof`_ ``strategy``. + location (str): + Required. The resource name of the Location to run the job. + Format: ``projects/{project}/locations/{location}`` + count (int): + Required. The number of synthetic examples to + generate. For this stateless API, the count is + limited to a small number. + output_field_specs (MutableSequence[google.cloud.aiplatform_v1.types.OutputFieldSpec]): + Required. The schema of the desired output, + defined by a list of fields. + examples (MutableSequence[google.cloud.aiplatform_v1.types.SyntheticExample]): + Optional. A list of few-shot examples to + guide the model's output style and format. + """ + + task_description: "TaskDescriptionStrategy" = proto.Field( + proto.MESSAGE, + number=3, + oneof="strategy", + message="TaskDescriptionStrategy", + ) + location: str = proto.Field( + proto.STRING, + number=1, + ) + count: int = proto.Field( + proto.INT32, + number=2, + ) + output_field_specs: MutableSequence["OutputFieldSpec"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="OutputFieldSpec", + ) + examples: MutableSequence["SyntheticExample"] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message="SyntheticExample", + ) + + +class SyntheticField(proto.Message): + r"""Represents a single named field within a SyntheticExample. + + Attributes: + field_name (str): + Optional. The name of the field. + content (google.cloud.aiplatform_v1.types.Content): + Required. The content of the field. + """ + + field_name: str = proto.Field( + proto.STRING, + number=1, + ) + content: gca_content.Content = proto.Field( + proto.MESSAGE, + number=2, + message=gca_content.Content, + ) + + +class SyntheticExample(proto.Message): + r"""Represents a single synthetic example, composed of multiple + fields. Used for providing few-shot examples in the request and + for returning generated examples in the response. + + Attributes: + fields (MutableSequence[google.cloud.aiplatform_v1.types.SyntheticField]): + Required. A list of fields that constitute an + example. + """ + + fields: MutableSequence["SyntheticField"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="SyntheticField", + ) + + +class OutputFieldSpec(proto.Message): + r"""Defines a specification for a single output field. + + Attributes: + field_name (str): + Required. The name of the output field. + guidance (str): + Optional. Optional, but recommended. + Additional guidance specific to this field to + provide targeted instructions for the LLM to + generate the content of a single output field. + While the LLM can sometimes infer content from + the field name, providing explicit guidance is + preferred. + field_type (google.cloud.aiplatform_v1.types.OutputFieldSpec.FieldType): + Optional. The data type of the field. + Defaults to CONTENT if not set. + """ + + class FieldType(proto.Enum): + r"""The data type of the field. + + Values: + FIELD_TYPE_UNSPECIFIED (0): + Field type is unspecified. + CONTENT (1): + Arbitrary content field type. + TEXT (2): + Text field type. + IMAGE (3): + Image field type. + AUDIO (4): + Audio field type. + """ + + FIELD_TYPE_UNSPECIFIED = 0 + CONTENT = 1 + TEXT = 2 + IMAGE = 3 + AUDIO = 4 + + field_name: str = proto.Field( + proto.STRING, + number=1, + ) + guidance: str = proto.Field( + proto.STRING, + number=2, + ) + field_type: FieldType = proto.Field( + proto.ENUM, + number=3, + enum=FieldType, + ) + + +class TaskDescriptionStrategy(proto.Message): + r"""Defines a generation strategy based on a high-level task + description. + + Attributes: + task_description (str): + Required. A high-level description of the + synthetic data to be generated. + """ + + task_description: str = proto.Field( + proto.STRING, + number=1, + ) + + +class GenerateSyntheticDataResponse(proto.Message): + r"""The response containing the generated data. + + Attributes: + synthetic_examples (MutableSequence[google.cloud.aiplatform_v1.types.SyntheticExample]): + A list of generated synthetic examples. + """ + + synthetic_examples: MutableSequence["SyntheticExample"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="SyntheticExample", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_item.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_item.py new file mode 100644 index 0000000000000000000000000000000000000000..41dff36c0e6323737a3058e06ace5182b4bd8edf --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_item.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "DataItem", + }, +) + + +class DataItem(proto.Message): + r"""A piece of data in a Dataset. Could be an image, a video, a + document or plain text. + + Attributes: + name (str): + Output only. The resource name of the + DataItem. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this DataItem was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this DataItem was + last updated. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your DataItems. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. No more than 64 user labels can be + associated with one DataItem(System labels are + excluded). + + See https://goo.gl/xmQnxf for more information + and examples of labels. System reserved label + keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + payload (google.protobuf.struct_pb2.Value): + Required. The data that the DataItem represents (for + example, an image or a text snippet). The schema of the + payload is stored in the parent Dataset's [metadata + schema's][google.cloud.aiplatform.v1.Dataset.metadata_schema_uri] + dataItemSchemaUri field. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=3, + ) + payload: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=4, + message=struct_pb2.Value, + ) + etag: str = proto.Field( + proto.STRING, + number=7, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=10, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=11, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_labeling_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_labeling_job.py new file mode 100644 index 0000000000000000000000000000000000000000..c65d5e03dd1d643f3e147fc54c1575988ae9e80c --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/data_labeling_job.py @@ -0,0 +1,363 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import job_state +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore +import google.type.money_pb2 as money_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "DataLabelingJob", + "ActiveLearningConfig", + "SampleConfig", + "TrainingConfig", + }, +) + + +class DataLabelingJob(proto.Message): + r"""DataLabelingJob is used to trigger a human labeling job on + unlabeled data from the following Dataset: + + Attributes: + name (str): + Output only. Resource name of the + DataLabelingJob. + display_name (str): + Required. The user-defined name of the + DataLabelingJob. The name can be up to 128 + characters long and can consist of any UTF-8 + characters. + Display name of a DataLabelingJob. + datasets (MutableSequence[str]): + Required. Dataset resource names. Right now we only support + labeling from a single Dataset. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + annotation_labels (MutableMapping[str, str]): + Labels to assign to annotations generated by + this DataLabelingJob. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. See https://goo.gl/xmQnxf for more + information and examples of labels. System + reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + labeler_count (int): + Required. Number of labelers to work on each + DataItem. + instruction_uri (str): + Required. The Google Cloud Storage location + of the instruction pdf. This pdf is shared with + labelers, and provides detailed description on + how to label DataItems in Datasets. + inputs_schema_uri (str): + Required. Points to a YAML file stored on + Google Cloud Storage describing the config for a + specific type of DataLabelingJob. The schema + files that can be used here are found in the + https://storage.googleapis.com/google-cloud-aiplatform + bucket in the /schema/datalabelingjob/inputs/ + folder. + inputs (google.protobuf.struct_pb2.Value): + Required. Input config parameters for the + DataLabelingJob. + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the job. + labeling_progress (int): + Output only. Current labeling job progress percentage scaled + in interval [0, 100], indicating the percentage of DataItems + that has been finished. + current_spend (google.type.money_pb2.Money): + Output only. Estimated cost(in US dollars) + that the DataLabelingJob has incurred to date. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + DataLabelingJob was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + DataLabelingJob was updated most recently. + error (google.rpc.status_pb2.Status): + Output only. DataLabelingJob errors. It is only populated + when job's state is ``JOB_STATE_FAILED`` or + ``JOB_STATE_CANCELLED``. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to organize your + DataLabelingJobs. + + Label keys and values can be no longer than 64 characters + (Unicode codepoints), can only contain lowercase letters, + numeric characters, underscores and dashes. International + characters are allowed. + + See https://goo.gl/xmQnxf for more information and examples + of labels. System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. Following + system labels exist for each DataLabelingJob: + + - "aiplatform.googleapis.com/schema": output only, its value + is the + [inputs_schema][google.cloud.aiplatform.v1.DataLabelingJob.inputs_schema_uri]'s + title. + specialist_pools (MutableSequence[str]): + The SpecialistPools' resource names + associated with this job. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for a + DataLabelingJob. If set, this DataLabelingJob + will be secured by this key. + + Note: Annotations created in the DataLabelingJob + are associated with the EncryptionSpec of the + Dataset they are exported to. + active_learning_config (google.cloud.aiplatform_v1.types.ActiveLearningConfig): + Parameters that configure the active learning + pipeline. Active learning will label the data + incrementally via several iterations. For every + iteration, it will select a batch of data based + on the sampling strategy. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + datasets: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + annotation_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=12, + ) + labeler_count: int = proto.Field( + proto.INT32, + number=4, + ) + instruction_uri: str = proto.Field( + proto.STRING, + number=5, + ) + inputs_schema_uri: str = proto.Field( + proto.STRING, + number=6, + ) + inputs: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=7, + message=struct_pb2.Value, + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=8, + enum=job_state.JobState, + ) + labeling_progress: int = proto.Field( + proto.INT32, + number=13, + ) + current_spend: money_pb2.Money = proto.Field( + proto.MESSAGE, + number=14, + message=money_pb2.Money, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=10, + message=timestamp_pb2.Timestamp, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=22, + message=status_pb2.Status, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=11, + ) + specialist_pools: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=16, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=20, + message=gca_encryption_spec.EncryptionSpec, + ) + active_learning_config: "ActiveLearningConfig" = proto.Field( + proto.MESSAGE, + number=21, + message="ActiveLearningConfig", + ) + + +class ActiveLearningConfig(proto.Message): + r"""Parameters that configure the active learning pipeline. + Active learning will label the data incrementally by several + iterations. For every iteration, it will select a batch of data + based on the sampling strategy. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + max_data_item_count (int): + Max number of human labeled DataItems. + + This field is a member of `oneof`_ ``human_labeling_budget``. + max_data_item_percentage (int): + Max percent of total DataItems for human + labeling. + + This field is a member of `oneof`_ ``human_labeling_budget``. + sample_config (google.cloud.aiplatform_v1.types.SampleConfig): + Active learning data sampling config. For + every active learning labeling iteration, it + will select a batch of data based on the + sampling strategy. + training_config (google.cloud.aiplatform_v1.types.TrainingConfig): + CMLE training config. For every active + learning labeling iteration, system will train a + machine learning model on CMLE. The trained + model will be used by data sampling algorithm to + select DataItems. + """ + + max_data_item_count: int = proto.Field( + proto.INT64, + number=1, + oneof="human_labeling_budget", + ) + max_data_item_percentage: int = proto.Field( + proto.INT32, + number=2, + oneof="human_labeling_budget", + ) + sample_config: "SampleConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="SampleConfig", + ) + training_config: "TrainingConfig" = proto.Field( + proto.MESSAGE, + number=4, + message="TrainingConfig", + ) + + +class SampleConfig(proto.Message): + r"""Active learning data sampling config. For every active + learning labeling iteration, it will select a batch of data + based on the sampling strategy. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + initial_batch_sample_percentage (int): + The percentage of data needed to be labeled + in the first batch. + + This field is a member of `oneof`_ ``initial_batch_sample_size``. + following_batch_sample_percentage (int): + The percentage of data needed to be labeled + in each following batch (except the first + batch). + + This field is a member of `oneof`_ ``following_batch_sample_size``. + sample_strategy (google.cloud.aiplatform_v1.types.SampleConfig.SampleStrategy): + Field to choose sampling strategy. Sampling + strategy will decide which data should be + selected for human labeling in every batch. + """ + + class SampleStrategy(proto.Enum): + r"""Sample strategy decides which subset of DataItems should be + selected for human labeling in every batch. + + Values: + SAMPLE_STRATEGY_UNSPECIFIED (0): + Default will be treated as UNCERTAINTY. + UNCERTAINTY (1): + Sample the most uncertain data to label. + """ + + SAMPLE_STRATEGY_UNSPECIFIED = 0 + UNCERTAINTY = 1 + + initial_batch_sample_percentage: int = proto.Field( + proto.INT32, + number=1, + oneof="initial_batch_sample_size", + ) + following_batch_sample_percentage: int = proto.Field( + proto.INT32, + number=3, + oneof="following_batch_sample_size", + ) + sample_strategy: SampleStrategy = proto.Field( + proto.ENUM, + number=5, + enum=SampleStrategy, + ) + + +class TrainingConfig(proto.Message): + r"""CMLE training config. For every active learning labeling + iteration, system will train a machine learning model on CMLE. + The trained model will be used by data sampling algorithm to + select DataItems. + + Attributes: + timeout_training_milli_hours (int): + The timeout hours for the CMLE training job, + expressed in milli hours i.e. 1,000 value in + this field means 1 hour. + """ + + timeout_training_milli_hours: int = proto.Field( + proto.INT64, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_service.py new file mode 100644 index 0000000000000000000000000000000000000000..6c490b504975ab10b224e0fb2ef2c92bde3ff498 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_service.py @@ -0,0 +1,1134 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import annotation +from google.cloud.aiplatform_v1.types import data_item as gca_data_item +from google.cloud.aiplatform_v1.types import dataset as gca_dataset +from google.cloud.aiplatform_v1.types import dataset_version as gca_dataset_version +from google.cloud.aiplatform_v1.types import model +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import saved_query as gca_saved_query +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateDatasetRequest", + "CreateDatasetOperationMetadata", + "GetDatasetRequest", + "UpdateDatasetRequest", + "UpdateDatasetVersionRequest", + "ListDatasetsRequest", + "ListDatasetsResponse", + "DeleteDatasetRequest", + "ImportDataRequest", + "ImportDataResponse", + "ImportDataOperationMetadata", + "ExportDataRequest", + "ExportDataResponse", + "ExportDataOperationMetadata", + "CreateDatasetVersionRequest", + "CreateDatasetVersionOperationMetadata", + "DeleteDatasetVersionRequest", + "GetDatasetVersionRequest", + "ListDatasetVersionsRequest", + "ListDatasetVersionsResponse", + "RestoreDatasetVersionRequest", + "RestoreDatasetVersionOperationMetadata", + "ListDataItemsRequest", + "ListDataItemsResponse", + "SearchDataItemsRequest", + "SearchDataItemsResponse", + "DataItemView", + "ListSavedQueriesRequest", + "ListSavedQueriesResponse", + "DeleteSavedQueryRequest", + "GetAnnotationSpecRequest", + "ListAnnotationsRequest", + "ListAnnotationsResponse", + }, +) + + +class CreateDatasetRequest(proto.Message): + r"""Request message for + [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + Dataset in. Format: + ``projects/{project}/locations/{location}`` + dataset (google.cloud.aiplatform_v1.types.Dataset): + Required. The Dataset to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + dataset: gca_dataset.Dataset = proto.Field( + proto.MESSAGE, + number=2, + message=gca_dataset.Dataset, + ) + + +class CreateDatasetOperationMetadata(proto.Message): + r"""Runtime operation information for + [DatasetService.CreateDataset][google.cloud.aiplatform.v1.DatasetService.CreateDataset]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetDatasetRequest(proto.Message): + r"""Request message for + [DatasetService.GetDataset][google.cloud.aiplatform.v1.DatasetService.GetDataset]. + + Attributes: + name (str): + Required. The name of the Dataset resource. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class UpdateDatasetRequest(proto.Message): + r"""Request message for + [DatasetService.UpdateDataset][google.cloud.aiplatform.v1.DatasetService.UpdateDataset]. + + Attributes: + dataset (google.cloud.aiplatform_v1.types.Dataset): + Required. The Dataset which replaces the + resource on the server. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask applies to the resource. For the + ``FieldMask`` definition, see + [google.protobuf.FieldMask][google.protobuf.FieldMask]. + Updatable fields: + + - ``display_name`` + - ``description`` + - ``labels`` + """ + + dataset: gca_dataset.Dataset = proto.Field( + proto.MESSAGE, + number=1, + message=gca_dataset.Dataset, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class UpdateDatasetVersionRequest(proto.Message): + r"""Request message for + [DatasetService.UpdateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.UpdateDatasetVersion]. + + Attributes: + dataset_version (google.cloud.aiplatform_v1.types.DatasetVersion): + Required. The DatasetVersion which replaces + the resource on the server. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask applies to the resource. For the + ``FieldMask`` definition, see + [google.protobuf.FieldMask][google.protobuf.FieldMask]. + Updatable fields: + + - ``display_name`` + """ + + dataset_version: gca_dataset_version.DatasetVersion = proto.Field( + proto.MESSAGE, + number=1, + message=gca_dataset_version.DatasetVersion, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class ListDatasetsRequest(proto.Message): + r"""Request message for + [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. + + Attributes: + parent (str): + Required. The name of the Dataset's parent resource. Format: + ``projects/{project}/locations/{location}`` + filter (str): + An expression for filtering the results of the request. For + field names both snake_case and camelCase are supported. + + - ``display_name``: supports = and != + - ``metadata_schema_uri``: supports = and != + - ``labels`` supports general map functions that is: + + - ``labels.key=value`` - key:value equality + - \`labels.key:\* or labels:key - key existence + - A key including a space must be quoted. + ``labels."a key"``. + + Some examples: + + - ``displayName="myDisplayName"`` + - ``labels.myKey="myValue"`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + order_by (str): + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: + + - ``display_name`` + - ``create_time`` + - ``update_time`` + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListDatasetsResponse(proto.Message): + r"""Response message for + [DatasetService.ListDatasets][google.cloud.aiplatform.v1.DatasetService.ListDatasets]. + + Attributes: + datasets (MutableSequence[google.cloud.aiplatform_v1.types.Dataset]): + A list of Datasets that matches the specified + filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + datasets: MutableSequence[gca_dataset.Dataset] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_dataset.Dataset, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteDatasetRequest(proto.Message): + r"""Request message for + [DatasetService.DeleteDataset][google.cloud.aiplatform.v1.DatasetService.DeleteDataset]. + + Attributes: + name (str): + Required. The resource name of the Dataset to delete. + Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ImportDataRequest(proto.Message): + r"""Request message for + [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. + + Attributes: + name (str): + Required. The name of the Dataset resource. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + import_configs (MutableSequence[google.cloud.aiplatform_v1.types.ImportDataConfig]): + Required. The desired input locations. The + contents of all input locations will be imported + in one batch. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + import_configs: MutableSequence[gca_dataset.ImportDataConfig] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=gca_dataset.ImportDataConfig, + ) + + +class ImportDataResponse(proto.Message): + r"""Response message for + [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. + + """ + + +class ImportDataOperationMetadata(proto.Message): + r"""Runtime operation information for + [DatasetService.ImportData][google.cloud.aiplatform.v1.DatasetService.ImportData]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class ExportDataRequest(proto.Message): + r"""Request message for + [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. + + Attributes: + name (str): + Required. The name of the Dataset resource. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + export_config (google.cloud.aiplatform_v1.types.ExportDataConfig): + Required. The desired output location. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + export_config: gca_dataset.ExportDataConfig = proto.Field( + proto.MESSAGE, + number=2, + message=gca_dataset.ExportDataConfig, + ) + + +class ExportDataResponse(proto.Message): + r"""Response message for + [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. + + Attributes: + exported_files (MutableSequence[str]): + All of the files that are exported in this export operation. + For custom code training export, only three (training, + validation and test) Cloud Storage paths in wildcard format + are populated (for example, gs://.../training-\*). + data_stats (google.cloud.aiplatform_v1.types.Model.DataStats): + Only present for custom code training export + use case. Records data stats, i.e., + train/validation/test item/annotation counts + calculated during the export operation. + """ + + exported_files: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + data_stats: model.Model.DataStats = proto.Field( + proto.MESSAGE, + number=2, + message=model.Model.DataStats, + ) + + +class ExportDataOperationMetadata(proto.Message): + r"""Runtime operation information for + [DatasetService.ExportData][google.cloud.aiplatform.v1.DatasetService.ExportData]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + gcs_output_directory (str): + A Google Cloud Storage directory which path + ends with '/'. The exported data is stored in + the directory. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + gcs_output_directory: str = proto.Field( + proto.STRING, + number=2, + ) + + +class CreateDatasetVersionRequest(proto.Message): + r"""Request message for + [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion]. + + Attributes: + parent (str): + Required. The name of the Dataset resource. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + dataset_version (google.cloud.aiplatform_v1.types.DatasetVersion): + Required. The version to be created. The same + CMEK policies with the original Dataset will be + applied the dataset version. So here we don't + need to specify the EncryptionSpecType here. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + dataset_version: gca_dataset_version.DatasetVersion = proto.Field( + proto.MESSAGE, + number=2, + message=gca_dataset_version.DatasetVersion, + ) + + +class CreateDatasetVersionOperationMetadata(proto.Message): + r"""Runtime operation information for + [DatasetService.CreateDatasetVersion][google.cloud.aiplatform.v1.DatasetService.CreateDatasetVersion]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class DeleteDatasetVersionRequest(proto.Message): + r"""Request message for + [DatasetService.DeleteDatasetVersion][google.cloud.aiplatform.v1.DatasetService.DeleteDatasetVersion]. + + Attributes: + name (str): + Required. The resource name of the Dataset version to + delete. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class GetDatasetVersionRequest(proto.Message): + r"""Request message for + [DatasetService.GetDatasetVersion][google.cloud.aiplatform.v1.DatasetService.GetDatasetVersion]. + + Attributes: + name (str): + Required. The resource name of the Dataset version to + delete. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class ListDatasetVersionsRequest(proto.Message): + r"""Request message for + [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions]. + + Attributes: + parent (str): + Required. The resource name of the Dataset to list + DatasetVersions from. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + filter (str): + Optional. The standard list filter. + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. Mask specifying which fields to + read. + order_by (str): + Optional. A comma-separated list of fields to + order by, sorted in ascending order. Use "desc" + after a field name for descending. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListDatasetVersionsResponse(proto.Message): + r"""Response message for + [DatasetService.ListDatasetVersions][google.cloud.aiplatform.v1.DatasetService.ListDatasetVersions]. + + Attributes: + dataset_versions (MutableSequence[google.cloud.aiplatform_v1.types.DatasetVersion]): + A list of DatasetVersions that matches the + specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + dataset_versions: MutableSequence[gca_dataset_version.DatasetVersion] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_dataset_version.DatasetVersion, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class RestoreDatasetVersionRequest(proto.Message): + r"""Request message for + [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion]. + + Attributes: + name (str): + Required. The name of the DatasetVersion resource. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class RestoreDatasetVersionOperationMetadata(proto.Message): + r"""Runtime operation information for + [DatasetService.RestoreDatasetVersion][google.cloud.aiplatform.v1.DatasetService.RestoreDatasetVersion]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class ListDataItemsRequest(proto.Message): + r"""Request message for + [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. + + Attributes: + parent (str): + Required. The resource name of the Dataset to list DataItems + from. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + filter (str): + The standard list filter. + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + order_by (str): + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListDataItemsResponse(proto.Message): + r"""Response message for + [DatasetService.ListDataItems][google.cloud.aiplatform.v1.DatasetService.ListDataItems]. + + Attributes: + data_items (MutableSequence[google.cloud.aiplatform_v1.types.DataItem]): + A list of DataItems that matches the + specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + data_items: MutableSequence[gca_data_item.DataItem] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_data_item.DataItem, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class SearchDataItemsRequest(proto.Message): + r"""Request message for + [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + order_by_data_item (str): + A comma-separated list of data item fields to + order by, sorted in ascending order. Use "desc" + after a field name for descending. + + This field is a member of `oneof`_ ``order``. + order_by_annotation (google.cloud.aiplatform_v1.types.SearchDataItemsRequest.OrderByAnnotation): + Expression that allows ranking results based + on annotation's property. + + This field is a member of `oneof`_ ``order``. + dataset (str): + Required. The resource name of the Dataset from which to + search DataItems. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + saved_query (str): + The resource name of a SavedQuery(annotation set in UI). + Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`` + All of the search will be done in the context of this + SavedQuery. + data_labeling_job (str): + The resource name of a DataLabelingJob. Format: + ``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`` + If this field is set, all of the search will be done in the + context of this DataLabelingJob. + data_item_filter (str): + An expression for filtering the DataItem that will be + returned. + + - ``data_item_id`` - for = or !=. + - ``labeled`` - for = or !=. + - ``has_annotation(ANNOTATION_SPEC_ID)`` - true only for + DataItem that have at least one annotation with + annotation_spec_id = ``ANNOTATION_SPEC_ID`` in the context + of SavedQuery or DataLabelingJob. + + For example: + + - ``data_item=1`` + - ``has_annotation(5)`` + annotations_filter (str): + An expression for filtering the Annotations that will be + returned per DataItem. + + - ``annotation_spec_id`` - for = or !=. + annotation_filters (MutableSequence[str]): + An expression that specifies what Annotations will be + returned per DataItem. Annotations satisfied either of the + conditions will be returned. + + - ``annotation_spec_id`` - for = or !=. Must specify + ``saved_query_id=`` - saved query id that annotations + should belong to. + field_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields of + [DataItemView][google.cloud.aiplatform.v1.DataItemView] to + read. + annotations_limit (int): + If set, only up to this many of Annotations + will be returned per DataItemView. The maximum + value is 1000. If not set, the maximum value + will be used. + page_size (int): + Requested page size. Server may return fewer + results than requested. Default and maximum page + size is 100. + order_by (str): + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. + page_token (str): + A token identifying a page of results for the server to + return Typically obtained via + [SearchDataItemsResponse.next_page_token][google.cloud.aiplatform.v1.SearchDataItemsResponse.next_page_token] + of the previous + [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems] + call. + """ + + class OrderByAnnotation(proto.Message): + r"""Expression that allows ranking results based on annotation's + property. + + Attributes: + saved_query (str): + Required. Saved query of the Annotation. Only + Annotations belong to this saved query will be + considered for ordering. + order_by (str): + A comma-separated list of annotation fields to order by, + sorted in ascending order. Use "desc" after a field name for + descending. Must also specify saved_query. + """ + + saved_query: str = proto.Field( + proto.STRING, + number=1, + ) + order_by: str = proto.Field( + proto.STRING, + number=2, + ) + + order_by_data_item: str = proto.Field( + proto.STRING, + number=12, + oneof="order", + ) + order_by_annotation: OrderByAnnotation = proto.Field( + proto.MESSAGE, + number=13, + oneof="order", + message=OrderByAnnotation, + ) + dataset: str = proto.Field( + proto.STRING, + number=1, + ) + saved_query: str = proto.Field( + proto.STRING, + number=2, + ) + data_labeling_job: str = proto.Field( + proto.STRING, + number=3, + ) + data_item_filter: str = proto.Field( + proto.STRING, + number=4, + ) + annotations_filter: str = proto.Field( + proto.STRING, + number=5, + ) + annotation_filters: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=11, + ) + field_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=6, + message=field_mask_pb2.FieldMask, + ) + annotations_limit: int = proto.Field( + proto.INT32, + number=7, + ) + page_size: int = proto.Field( + proto.INT32, + number=8, + ) + order_by: str = proto.Field( + proto.STRING, + number=9, + ) + page_token: str = proto.Field( + proto.STRING, + number=10, + ) + + +class SearchDataItemsResponse(proto.Message): + r"""Response message for + [DatasetService.SearchDataItems][google.cloud.aiplatform.v1.DatasetService.SearchDataItems]. + + Attributes: + data_item_views (MutableSequence[google.cloud.aiplatform_v1.types.DataItemView]): + The DataItemViews read. + next_page_token (str): + A token to retrieve next page of results. Pass to + [SearchDataItemsRequest.page_token][google.cloud.aiplatform.v1.SearchDataItemsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + data_item_views: MutableSequence["DataItemView"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="DataItemView", + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DataItemView(proto.Message): + r"""A container for a single DataItem and Annotations on it. + + Attributes: + data_item (google.cloud.aiplatform_v1.types.DataItem): + The DataItem. + annotations (MutableSequence[google.cloud.aiplatform_v1.types.Annotation]): + The Annotations on the DataItem. If too many Annotations + should be returned for the DataItem, this field will be + truncated per annotations_limit in request. If it was, then + the has_truncated_annotations will be set to true. + has_truncated_annotations (bool): + True if and only if the Annotations field has been + truncated. It happens if more Annotations for this DataItem + met the request's annotation_filter than are allowed to be + returned by annotations_limit. Note that if Annotations + field is not being returned due to field mask, then this + field will not be set to true no matter how many Annotations + are there. + """ + + data_item: gca_data_item.DataItem = proto.Field( + proto.MESSAGE, + number=1, + message=gca_data_item.DataItem, + ) + annotations: MutableSequence[annotation.Annotation] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=annotation.Annotation, + ) + has_truncated_annotations: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class ListSavedQueriesRequest(proto.Message): + r"""Request message for + [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries]. + + Attributes: + parent (str): + Required. The resource name of the Dataset to list + SavedQueries from. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + filter (str): + The standard list filter. + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + order_by (str): + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListSavedQueriesResponse(proto.Message): + r"""Response message for + [DatasetService.ListSavedQueries][google.cloud.aiplatform.v1.DatasetService.ListSavedQueries]. + + Attributes: + saved_queries (MutableSequence[google.cloud.aiplatform_v1.types.SavedQuery]): + A list of SavedQueries that match the + specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + saved_queries: MutableSequence[gca_saved_query.SavedQuery] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_saved_query.SavedQuery, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteSavedQueryRequest(proto.Message): + r"""Request message for + [DatasetService.DeleteSavedQuery][google.cloud.aiplatform.v1.DatasetService.DeleteSavedQuery]. + + Attributes: + name (str): + Required. The resource name of the SavedQuery to delete. + Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/savedQueries/{saved_query}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class GetAnnotationSpecRequest(proto.Message): + r"""Request message for + [DatasetService.GetAnnotationSpec][google.cloud.aiplatform.v1.DatasetService.GetAnnotationSpec]. + + Attributes: + name (str): + Required. The name of the AnnotationSpec resource. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/annotationSpecs/{annotation_spec}`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class ListAnnotationsRequest(proto.Message): + r"""Request message for + [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. + + Attributes: + parent (str): + Required. The resource name of the DataItem to list + Annotations from. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/dataItems/{data_item}`` + filter (str): + The standard list filter. + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + order_by (str): + A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a + field name for descending. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListAnnotationsResponse(proto.Message): + r"""Response message for + [DatasetService.ListAnnotations][google.cloud.aiplatform.v1.DatasetService.ListAnnotations]. + + Attributes: + annotations (MutableSequence[google.cloud.aiplatform_v1.types.Annotation]): + A list of Annotations that matches the + specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + annotations: MutableSequence[annotation.Annotation] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=annotation.Annotation, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_version.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_version.py new file mode 100644 index 0000000000000000000000000000000000000000..771bc1714da47819a78b3ad94fb9bf5a61887e67 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/dataset_version.py @@ -0,0 +1,117 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "DatasetVersion", + }, +) + + +class DatasetVersion(proto.Message): + r"""Describes the dataset version. + + Attributes: + name (str): + Output only. Identifier. The resource name of the + DatasetVersion. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}/datasetVersions/{dataset_version}`` + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + DatasetVersion was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + DatasetVersion was last updated. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + big_query_dataset_name (str): + Output only. Name of the associated BigQuery + dataset. + display_name (str): + The user-defined name of the DatasetVersion. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + metadata (google.protobuf.struct_pb2.Value): + Required. Output only. Additional information + about the DatasetVersion. + model_reference (str): + Output only. Reference to the public base + model last used by the dataset version. Only set + for prompt dataset versions. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=3, + ) + big_query_dataset_name: str = proto.Field( + proto.STRING, + number=4, + ) + display_name: str = proto.Field( + proto.STRING, + number=7, + ) + metadata: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=8, + message=struct_pb2.Value, + ) + model_reference: str = proto.Field( + proto.STRING, + number=9, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=10, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=11, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployed_model_ref.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployed_model_ref.py new file mode 100644 index 0000000000000000000000000000000000000000..11855dc98e9006de9830f9ffdb8a35e73828bbc8 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployed_model_ref.py @@ -0,0 +1,52 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "DeployedModelRef", + }, +) + + +class DeployedModelRef(proto.Message): + r"""Points to a DeployedModel. + + Attributes: + endpoint (str): + Immutable. A resource name of an Endpoint. + deployed_model_id (str): + Immutable. An ID of a DeployedModel in the + above Endpoint. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_resource_pool_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_resource_pool_service.py new file mode 100644 index 0000000000000000000000000000000000000000..689b3265aeffc383b787dd79ae9125c1fd94e3ec --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_resource_pool_service.py @@ -0,0 +1,330 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import deployed_model_ref +from google.cloud.aiplatform_v1.types import ( + deployment_resource_pool as gca_deployment_resource_pool, +) +from google.cloud.aiplatform_v1.types import endpoint +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateDeploymentResourcePoolRequest", + "CreateDeploymentResourcePoolOperationMetadata", + "GetDeploymentResourcePoolRequest", + "ListDeploymentResourcePoolsRequest", + "ListDeploymentResourcePoolsResponse", + "UpdateDeploymentResourcePoolRequest", + "UpdateDeploymentResourcePoolOperationMetadata", + "DeleteDeploymentResourcePoolRequest", + "QueryDeployedModelsRequest", + "QueryDeployedModelsResponse", + }, +) + + +class CreateDeploymentResourcePoolRequest(proto.Message): + r"""Request message for CreateDeploymentResourcePool method. + + Attributes: + parent (str): + Required. The parent location resource where this + DeploymentResourcePool will be created. Format: + ``projects/{project}/locations/{location}`` + deployment_resource_pool (google.cloud.aiplatform_v1.types.DeploymentResourcePool): + Required. The DeploymentResourcePool to + create. + deployment_resource_pool_id (str): + Required. The ID to use for the DeploymentResourcePool, + which will become the final component of the + DeploymentResourcePool's resource name. + + The maximum length is 63 characters, and valid characters + are ``/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/``. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + deployment_resource_pool: gca_deployment_resource_pool.DeploymentResourcePool = ( + proto.Field( + proto.MESSAGE, + number=2, + message=gca_deployment_resource_pool.DeploymentResourcePool, + ) + ) + deployment_resource_pool_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CreateDeploymentResourcePoolOperationMetadata(proto.Message): + r"""Runtime operation information for + CreateDeploymentResourcePool method. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetDeploymentResourcePoolRequest(proto.Message): + r"""Request message for GetDeploymentResourcePool method. + + Attributes: + name (str): + Required. The name of the DeploymentResourcePool to + retrieve. Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListDeploymentResourcePoolsRequest(proto.Message): + r"""Request message for ListDeploymentResourcePools method. + + Attributes: + parent (str): + Required. The parent Location which owns this collection of + DeploymentResourcePools. Format: + ``projects/{project}/locations/{location}`` + page_size (int): + The maximum number of DeploymentResourcePools + to return. The service may return fewer than + this value. + page_token (str): + A page token, received from a previous + ``ListDeploymentResourcePools`` call. Provide this to + retrieve the subsequent page. + + When paginating, all other parameters provided to + ``ListDeploymentResourcePools`` must match the call that + provided the page token. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListDeploymentResourcePoolsResponse(proto.Message): + r"""Response message for ListDeploymentResourcePools method. + + Attributes: + deployment_resource_pools (MutableSequence[google.cloud.aiplatform_v1.types.DeploymentResourcePool]): + The DeploymentResourcePools from the + specified location. + next_page_token (str): + A token, which can be sent as ``page_token`` to retrieve the + next page. If this field is omitted, there are no subsequent + pages. + """ + + @property + def raw_page(self): + return self + + deployment_resource_pools: MutableSequence[ + gca_deployment_resource_pool.DeploymentResourcePool + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_deployment_resource_pool.DeploymentResourcePool, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateDeploymentResourcePoolRequest(proto.Message): + r"""Request message for UpdateDeploymentResourcePool method. + + Attributes: + deployment_resource_pool (google.cloud.aiplatform_v1.types.DeploymentResourcePool): + Required. The DeploymentResourcePool to update. + + The DeploymentResourcePool's ``name`` field is used to + identify the DeploymentResourcePool to update. Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The list of fields to update. + """ + + deployment_resource_pool: gca_deployment_resource_pool.DeploymentResourcePool = ( + proto.Field( + proto.MESSAGE, + number=1, + message=gca_deployment_resource_pool.DeploymentResourcePool, + ) + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class UpdateDeploymentResourcePoolOperationMetadata(proto.Message): + r"""Runtime operation information for + UpdateDeploymentResourcePool method. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class DeleteDeploymentResourcePoolRequest(proto.Message): + r"""Request message for DeleteDeploymentResourcePool method. + + Attributes: + name (str): + Required. The name of the DeploymentResourcePool to delete. + Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class QueryDeployedModelsRequest(proto.Message): + r"""Request message for QueryDeployedModels method. + + Attributes: + deployment_resource_pool (str): + Required. The name of the target DeploymentResourcePool to + query. Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + page_size (int): + The maximum number of DeployedModels to + return. The service may return fewer than this + value. + page_token (str): + A page token, received from a previous + ``QueryDeployedModels`` call. Provide this to retrieve the + subsequent page. + + When paginating, all other parameters provided to + ``QueryDeployedModels`` must match the call that provided + the page token. + """ + + deployment_resource_pool: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class QueryDeployedModelsResponse(proto.Message): + r"""Response message for QueryDeployedModels method. + + Attributes: + deployed_models (MutableSequence[google.cloud.aiplatform_v1.types.DeployedModel]): + DEPRECATED Use deployed_model_refs instead. + next_page_token (str): + A token, which can be sent as ``page_token`` to retrieve the + next page. If this field is omitted, there are no subsequent + pages. + deployed_model_refs (MutableSequence[google.cloud.aiplatform_v1.types.DeployedModelRef]): + References to the DeployedModels that share + the specified deploymentResourcePool. + total_deployed_model_count (int): + The total number of DeployedModels on this + DeploymentResourcePool. + total_endpoint_count (int): + The total number of Endpoints that have + DeployedModels on this DeploymentResourcePool. + """ + + @property + def raw_page(self): + return self + + deployed_models: MutableSequence[endpoint.DeployedModel] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=endpoint.DeployedModel, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + deployed_model_refs: MutableSequence[deployed_model_ref.DeployedModelRef] = ( + proto.RepeatedField( + proto.MESSAGE, + number=3, + message=deployed_model_ref.DeployedModelRef, + ) + ) + total_deployed_model_count: int = proto.Field( + proto.INT32, + number=4, + ) + total_endpoint_count: int = proto.Field( + proto.INT32, + number=5, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_stage.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_stage.py new file mode 100644 index 0000000000000000000000000000000000000000..33ebadc7c9ba9e4ae2edc39c63fc19c7a59a612d --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/deployment_stage.py @@ -0,0 +1,77 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "DeploymentStage", + }, +) + + +class DeploymentStage(proto.Enum): + r"""Stage field indicating the current progress of a deployment. + + Values: + DEPLOYMENT_STAGE_UNSPECIFIED (0): + Default value. This value is unused. + STARTING_DEPLOYMENT (5): + The deployment is initializing and setting up + the environment. + PREPARING_MODEL (6): + The deployment is preparing the model assets. + CREATING_SERVING_CLUSTER (7): + The deployment is creating the underlying + serving cluster. + ADDING_NODES_TO_CLUSTER (8): + The deployment is adding nodes to the serving + cluster. + GETTING_CONTAINER_IMAGE (9): + The deployment is getting the container image + for the model server. + STARTING_MODEL_SERVER (3): + The deployment is starting the model server. + FINISHING_UP (4): + The deployment is performing finalization + steps. + DEPLOYMENT_TERMINATED (10): + The deployment has terminated. + SUCCESSFULLY_DEPLOYED (11): + The deployment has succeeded. + FAILED_TO_DEPLOY (12): + The deployment has failed. + """ + + DEPLOYMENT_STAGE_UNSPECIFIED = 0 + STARTING_DEPLOYMENT = 5 + PREPARING_MODEL = 6 + CREATING_SERVING_CLUSTER = 7 + ADDING_NODES_TO_CLUSTER = 8 + GETTING_CONTAINER_IMAGE = 9 + STARTING_MODEL_SERVER = 3 + FINISHING_UP = 4 + DEPLOYMENT_TERMINATED = 10 + SUCCESSFULLY_DEPLOYED = 11 + FAILED_TO_DEPLOY = 12 + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/encryption_spec.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/encryption_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..d3e36bdf3dd0f1bc5baf0e73667905647073cc5e --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/encryption_spec.py @@ -0,0 +1,51 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "EncryptionSpec", + }, +) + + +class EncryptionSpec(proto.Message): + r"""Represents a customer-managed encryption key spec that can be + applied to a top-level resource. + + Attributes: + kms_key_name (str): + Required. The Cloud KMS resource identifier of the customer + managed encryption key used to protect a resource. Has the + form: + ``projects/my-project/locations/my-region/keyRings/my-kr/cryptoKeys/my-key``. + The key needs to be in the same region as where the compute + resource is created. + """ + + kms_key_name: str = proto.Field( + proto.STRING, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/endpoint.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/endpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..51593479c917d13473fad849307c89b7b5e66545 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/endpoint.py @@ -0,0 +1,754 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import explanation +from google.cloud.aiplatform_v1.types import io +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import service_networking +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Endpoint", + "DeployedModel", + "PrivateEndpoints", + "PredictRequestResponseLoggingConfig", + "ClientConnectionConfig", + "FasterDeploymentConfig", + "GenAiAdvancedFeaturesConfig", + "SpeculativeDecodingSpec", + }, +) + + +class Endpoint(proto.Message): + r"""Models are deployed into it, and afterwards Endpoint is + called to obtain predictions and explanations. + + Attributes: + name (str): + Output only. The resource name of the + Endpoint. + display_name (str): + Required. The display name of the Endpoint. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + description (str): + The description of the Endpoint. + deployed_models (MutableSequence[google.cloud.aiplatform_v1.types.DeployedModel]): + Output only. The models deployed in this Endpoint. To add or + remove DeployedModels use + [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel] + and + [EndpointService.UndeployModel][google.cloud.aiplatform.v1.EndpointService.UndeployModel] + respectively. + traffic_split (MutableMapping[str, int]): + A map from a DeployedModel's ID to the + percentage of this Endpoint's traffic that + should be forwarded to that DeployedModel. + + If a DeployedModel's ID is not listed in this + map, then it receives no traffic. + + The traffic percentage values must add up to + 100, or map must be empty if the Endpoint is to + not accept any traffic at a moment. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Endpoints. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Endpoint was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Endpoint was + last updated. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for an + Endpoint. If set, this Endpoint and all + sub-resources of this Endpoint will be secured + by this key. + network (str): + Optional. The full name of the Google Compute Engine + `network `__ + to which the Endpoint should be peered. + + Private services access must already be configured for the + network. If left unspecified, the Endpoint is not peered + with any network. + + Only one of the fields, + [network][google.cloud.aiplatform.v1.Endpoint.network] or + [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect], + can be set. + + `Format `__: + ``projects/{project}/global/networks/{network}``. Where + ``{project}`` is a project number, as in ``12345``, and + ``{network}`` is network name. + enable_private_service_connect (bool): + Deprecated: If true, expose the Endpoint via private service + connect. + + Only one of the fields, + [network][google.cloud.aiplatform.v1.Endpoint.network] or + [enable_private_service_connect][google.cloud.aiplatform.v1.Endpoint.enable_private_service_connect], + can be set. + private_service_connect_config (google.cloud.aiplatform_v1.types.PrivateServiceConnectConfig): + Optional. Configuration for private service connect. + + [network][google.cloud.aiplatform.v1.Endpoint.network] and + [private_service_connect_config][google.cloud.aiplatform.v1.Endpoint.private_service_connect_config] + are mutually exclusive. + model_deployment_monitoring_job (str): + Output only. Resource name of the Model Monitoring job + associated with this Endpoint if monitoring is enabled by + [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]. + Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + predict_request_response_logging_config (google.cloud.aiplatform_v1.types.PredictRequestResponseLoggingConfig): + Configures the request-response logging for + online prediction. + dedicated_endpoint_enabled (bool): + If true, the endpoint will be exposed through a dedicated + DNS [Endpoint.dedicated_endpoint_dns]. Your request to the + dedicated DNS will be isolated from other users' traffic and + will have better performance and reliability. Note: Once you + enabled dedicated endpoint, you won't be able to send + request to the shared DNS + {region}-aiplatform.googleapis.com. The limitation will be + removed soon. + dedicated_endpoint_dns (str): + Output only. DNS of the dedicated endpoint. Will only be + populated if dedicated_endpoint_enabled is true. Depending + on the features enabled, uid might be a random number or a + string. For example, if fast_tryout is enabled, uid will be + fasttryout. Format: + ``https://{endpoint_id}.{region}-{uid}.prediction.vertexai.goog``. + client_connection_config (google.cloud.aiplatform_v1.types.ClientConnectionConfig): + Configurations that are applied to the + endpoint for online prediction. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + gen_ai_advanced_features_config (google.cloud.aiplatform_v1.types.GenAiAdvancedFeaturesConfig): + Optional. Configuration for + GenAiAdvancedFeatures. If the endpoint is + serving GenAI models, advanced features like + native RAG integration can be configured. + Currently, only Model Garden models are + supported. + private_model_server_enabled (bool): + If true, the model server will be isolated + from the external internet. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + deployed_models: MutableSequence["DeployedModel"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="DeployedModel", + ) + traffic_split: MutableMapping[str, int] = proto.MapField( + proto.STRING, + proto.INT32, + number=5, + ) + etag: str = proto.Field( + proto.STRING, + number=6, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=7, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=10, + message=gca_encryption_spec.EncryptionSpec, + ) + network: str = proto.Field( + proto.STRING, + number=13, + ) + enable_private_service_connect: bool = proto.Field( + proto.BOOL, + number=17, + ) + private_service_connect_config: service_networking.PrivateServiceConnectConfig = ( + proto.Field( + proto.MESSAGE, + number=21, + message=service_networking.PrivateServiceConnectConfig, + ) + ) + model_deployment_monitoring_job: str = proto.Field( + proto.STRING, + number=14, + ) + predict_request_response_logging_config: "PredictRequestResponseLoggingConfig" = ( + proto.Field( + proto.MESSAGE, + number=18, + message="PredictRequestResponseLoggingConfig", + ) + ) + dedicated_endpoint_enabled: bool = proto.Field( + proto.BOOL, + number=24, + ) + dedicated_endpoint_dns: str = proto.Field( + proto.STRING, + number=25, + ) + client_connection_config: "ClientConnectionConfig" = proto.Field( + proto.MESSAGE, + number=23, + message="ClientConnectionConfig", + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=27, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=28, + ) + gen_ai_advanced_features_config: "GenAiAdvancedFeaturesConfig" = proto.Field( + proto.MESSAGE, + number=29, + message="GenAiAdvancedFeaturesConfig", + ) + private_model_server_enabled: bool = proto.Field( + proto.BOOL, + number=30, + ) + + +class DeployedModel(proto.Message): + r"""A deployment of a Model. Endpoints contain one or more + DeployedModels. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dedicated_resources (google.cloud.aiplatform_v1.types.DedicatedResources): + A description of resources that are dedicated + to the DeployedModel, and that need a higher + degree of manual configuration. + + This field is a member of `oneof`_ ``prediction_resources``. + automatic_resources (google.cloud.aiplatform_v1.types.AutomaticResources): + A description of resources that to large + degree are decided by Vertex AI, and require + only a modest additional configuration. + + This field is a member of `oneof`_ ``prediction_resources``. + shared_resources (str): + The resource name of the shared DeploymentResourcePool to + deploy on. Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + + This field is a member of `oneof`_ ``prediction_resources``. + id (str): + Immutable. The ID of the DeployedModel. If not provided upon + deployment, Vertex AI will generate a value for this ID. + + This value should be 1-10 characters, and valid characters + are ``/[0-9]/``. + model (str): + The resource name of the Model that this is the deployment + of. Note that the Model may be in a different location than + the DeployedModel's Endpoint. + + The resource name may contain version id or version alias to + specify the version. Example: + ``projects/{project}/locations/{location}/models/{model}@2`` + or + ``projects/{project}/locations/{location}/models/{model}@golden`` + if no version is specified, the default version will be + deployed. + model_version_id (str): + Output only. The version ID of the model that + is deployed. + display_name (str): + The display name of the DeployedModel. If not provided upon + creation, the Model's display_name is used. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when the DeployedModel + was created. + explanation_spec (google.cloud.aiplatform_v1.types.ExplanationSpec): + Explanation configuration for this DeployedModel. + + When deploying a Model using + [EndpointService.DeployModel][google.cloud.aiplatform.v1.EndpointService.DeployModel], + this value overrides the value of + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec]. + All fields of + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + are optional in the request. If a field of + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + is not populated, the value of the same field of + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + is inherited. If the corresponding + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + is not populated, all fields of the + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + will be used for the explanation configuration. + disable_explanations (bool): + If true, deploy the model without explainable feature, + regardless the existence of + [Model.explanation_spec][google.cloud.aiplatform.v1.Model.explanation_spec] + or + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec]. + service_account (str): + The service account that the DeployedModel's container runs + as. Specify the email address of the service account. If + this service account is not specified, the container runs as + a service account that doesn't have access to the resource + project. + + Users deploying the Model must have the + ``iam.serviceAccounts.actAs`` permission on this service + account. + disable_container_logging (bool): + For custom-trained Models and AutoML Tabular Models, the + container of the DeployedModel instances will send + ``stderr`` and ``stdout`` streams to Cloud Logging by + default. Please note that the logs incur cost, which are + subject to `Cloud Logging + pricing `__. + + User can disable container logging by setting this flag to + true. + enable_access_logging (bool): + If true, online prediction access logs are + sent to Cloud Logging. + These logs are like standard server access logs, + containing information like timestamp and + latency for each prediction request. + + Note that logs may incur a cost, especially if + your project receives prediction requests at a + high queries per second rate (QPS). Estimate + your costs before enabling this option. + private_endpoints (google.cloud.aiplatform_v1.types.PrivateEndpoints): + Output only. Provide paths for users to send + predict/explain/health requests directly to the deployed + model services running on Cloud via private services access. + This field is populated if + [network][google.cloud.aiplatform.v1.Endpoint.network] is + configured. + faster_deployment_config (google.cloud.aiplatform_v1.types.FasterDeploymentConfig): + Configuration for faster model deployment. + status (google.cloud.aiplatform_v1.types.DeployedModel.Status): + Output only. Runtime status of the deployed + model. + system_labels (MutableMapping[str, str]): + System labels to apply to Model Garden + deployments. System labels are managed by Google + for internal use only. + checkpoint_id (str): + The checkpoint id of the model. + speculative_decoding_spec (google.cloud.aiplatform_v1.types.SpeculativeDecodingSpec): + Optional. Spec for configuring speculative + decoding. + """ + + class Status(proto.Message): + r"""Runtime status of the deployed model. + + Attributes: + message (str): + Output only. The latest deployed model's + status message (if any). + last_update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time at which the status was + last updated. + available_replica_count (int): + Output only. The number of available replicas + of the deployed model. + """ + + message: str = proto.Field( + proto.STRING, + number=1, + ) + last_update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + available_replica_count: int = proto.Field( + proto.INT32, + number=3, + ) + + dedicated_resources: machine_resources.DedicatedResources = proto.Field( + proto.MESSAGE, + number=7, + oneof="prediction_resources", + message=machine_resources.DedicatedResources, + ) + automatic_resources: machine_resources.AutomaticResources = proto.Field( + proto.MESSAGE, + number=8, + oneof="prediction_resources", + message=machine_resources.AutomaticResources, + ) + shared_resources: str = proto.Field( + proto.STRING, + number=17, + oneof="prediction_resources", + ) + id: str = proto.Field( + proto.STRING, + number=1, + ) + model: str = proto.Field( + proto.STRING, + number=2, + ) + model_version_id: str = proto.Field( + proto.STRING, + number=18, + ) + display_name: str = proto.Field( + proto.STRING, + number=3, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + explanation_spec: explanation.ExplanationSpec = proto.Field( + proto.MESSAGE, + number=9, + message=explanation.ExplanationSpec, + ) + disable_explanations: bool = proto.Field( + proto.BOOL, + number=19, + ) + service_account: str = proto.Field( + proto.STRING, + number=11, + ) + disable_container_logging: bool = proto.Field( + proto.BOOL, + number=15, + ) + enable_access_logging: bool = proto.Field( + proto.BOOL, + number=13, + ) + private_endpoints: "PrivateEndpoints" = proto.Field( + proto.MESSAGE, + number=14, + message="PrivateEndpoints", + ) + faster_deployment_config: "FasterDeploymentConfig" = proto.Field( + proto.MESSAGE, + number=23, + message="FasterDeploymentConfig", + ) + status: Status = proto.Field( + proto.MESSAGE, + number=26, + message=Status, + ) + system_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=28, + ) + checkpoint_id: str = proto.Field( + proto.STRING, + number=29, + ) + speculative_decoding_spec: "SpeculativeDecodingSpec" = proto.Field( + proto.MESSAGE, + number=30, + message="SpeculativeDecodingSpec", + ) + + +class PrivateEndpoints(proto.Message): + r"""PrivateEndpoints proto is used to provide paths for users to send + requests privately. To send request via private service access, use + predict_http_uri, explain_http_uri or health_http_uri. To send + request via private service connect, use service_attachment. + + Attributes: + predict_http_uri (str): + Output only. Http(s) path to send prediction + requests. + explain_http_uri (str): + Output only. Http(s) path to send explain + requests. + health_http_uri (str): + Output only. Http(s) path to send health + check requests. + service_attachment (str): + Output only. The name of the service + attachment resource. Populated if private + service connect is enabled. + """ + + predict_http_uri: str = proto.Field( + proto.STRING, + number=1, + ) + explain_http_uri: str = proto.Field( + proto.STRING, + number=2, + ) + health_http_uri: str = proto.Field( + proto.STRING, + number=3, + ) + service_attachment: str = proto.Field( + proto.STRING, + number=4, + ) + + +class PredictRequestResponseLoggingConfig(proto.Message): + r"""Configuration for logging request-response to a BigQuery + table. + + Attributes: + enabled (bool): + If logging is enabled or not. + sampling_rate (float): + Percentage of requests to be logged, expressed as a fraction + in range(0,1]. + bigquery_destination (google.cloud.aiplatform_v1.types.BigQueryDestination): + BigQuery table for logging. If only given a project, a new + dataset will be created with name + ``logging__`` where will + be made BigQuery-dataset-name compatible (e.g. most special + characters will become underscores). If no table name is + given, a new table will be created with name + ``request_response_logging`` + """ + + enabled: bool = proto.Field( + proto.BOOL, + number=1, + ) + sampling_rate: float = proto.Field( + proto.DOUBLE, + number=2, + ) + bigquery_destination: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=3, + message=io.BigQueryDestination, + ) + + +class ClientConnectionConfig(proto.Message): + r"""Configurations (e.g. inference timeout) that are applied on + your endpoints. + + Attributes: + inference_timeout (google.protobuf.duration_pb2.Duration): + Customizable online prediction request + timeout. + """ + + inference_timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + + +class FasterDeploymentConfig(proto.Message): + r"""Configuration for faster model deployment. + + Attributes: + fast_tryout_enabled (bool): + If true, enable fast tryout feature for this + deployed model. + """ + + fast_tryout_enabled: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class GenAiAdvancedFeaturesConfig(proto.Message): + r"""Configuration for GenAiAdvancedFeatures. + + Attributes: + rag_config (google.cloud.aiplatform_v1.types.GenAiAdvancedFeaturesConfig.RagConfig): + Configuration for Retrieval Augmented + Generation feature. + """ + + class RagConfig(proto.Message): + r"""Configuration for Retrieval Augmented Generation feature. + + Attributes: + enable_rag (bool): + If true, enable Retrieval Augmented + Generation in ChatCompletion request. Once + enabled, the endpoint will be identified as + GenAI endpoint and Arthedain router will be + used. + """ + + enable_rag: bool = proto.Field( + proto.BOOL, + number=1, + ) + + rag_config: RagConfig = proto.Field( + proto.MESSAGE, + number=1, + message=RagConfig, + ) + + +class SpeculativeDecodingSpec(proto.Message): + r"""Configuration for Speculative Decoding. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + draft_model_speculation (google.cloud.aiplatform_v1.types.SpeculativeDecodingSpec.DraftModelSpeculation): + draft model speculation. + + This field is a member of `oneof`_ ``speculation``. + ngram_speculation (google.cloud.aiplatform_v1.types.SpeculativeDecodingSpec.NgramSpeculation): + N-Gram speculation. + + This field is a member of `oneof`_ ``speculation``. + speculative_token_count (int): + The number of speculative tokens to generate + at each step. + """ + + class DraftModelSpeculation(proto.Message): + r"""Draft model speculation works by using the smaller model to + generate candidate tokens for speculative decoding. + + Attributes: + draft_model (str): + Required. The resource name of the draft + model. + """ + + draft_model: str = proto.Field( + proto.STRING, + number=1, + ) + + class NgramSpeculation(proto.Message): + r"""N-Gram speculation works by trying to find matching tokens in + the previous prompt sequence and use those as speculation for + generating new tokens. + + Attributes: + ngram_size (int): + The number of last N input tokens used as + ngram to search/match against the previous + prompt sequence. This is equal to the N in + N-Gram. + The default value is 3 if not specified. + """ + + ngram_size: int = proto.Field( + proto.INT32, + number=1, + ) + + draft_model_speculation: DraftModelSpeculation = proto.Field( + proto.MESSAGE, + number=2, + oneof="speculation", + message=DraftModelSpeculation, + ) + ngram_speculation: NgramSpeculation = proto.Field( + proto.MESSAGE, + number=3, + oneof="speculation", + message=NgramSpeculation, + ) + speculative_token_count: int = proto.Field( + proto.INT32, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/entity_type.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/entity_type.py new file mode 100644 index 0000000000000000000000000000000000000000..75fb6a684afdab2626044002128e6ed96990e252 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/entity_type.py @@ -0,0 +1,150 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import featurestore_monitoring +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "EntityType", + }, +) + + +class EntityType(proto.Message): + r"""An entity type is a type of object in a system that needs to + be modeled and have stored information about. For example, + driver is an entity type, and driver0 is an instance of an + entity type driver. + + Attributes: + name (str): + Immutable. Name of the EntityType. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + + The last part entity_type is assigned by the client. The + entity_type can be up to 64 characters long and can consist + only of ASCII Latin letters A-Z and a-z and underscore(\_), + and ASCII digits 0-9 starting with a letter. The value will + be unique given a featurestore. + description (str): + Optional. Description of the EntityType. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this EntityType + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this EntityType + was most recently updated. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your EntityTypes. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one EntityType + (System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + etag (str): + Optional. Used to perform a consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + monitoring_config (google.cloud.aiplatform_v1.types.FeaturestoreMonitoringConfig): + Optional. The default monitoring configuration for all + Features with value type + ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) + BOOL, STRING, DOUBLE or INT64 under this EntityType. + + If this is populated with + [FeaturestoreMonitoringConfig.monitoring_interval] + specified, snapshot analysis monitoring is enabled. + Otherwise, snapshot analysis monitoring is disabled. + offline_storage_ttl_days (int): + Optional. Config for data retention policy in offline + storage. TTL in days for feature values that will be stored + in offline storage. The Feature Store offline storage + periodically removes obsolete feature values older than + ``offline_storage_ttl_days`` since the feature generation + time. If unset (or explicitly set to 0), default to 4000 + days TTL. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + etag: str = proto.Field( + proto.STRING, + number=7, + ) + monitoring_config: featurestore_monitoring.FeaturestoreMonitoringConfig = ( + proto.Field( + proto.MESSAGE, + number=8, + message=featurestore_monitoring.FeaturestoreMonitoringConfig, + ) + ) + offline_storage_ttl_days: int = proto.Field( + proto.INT32, + number=10, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=11, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=12, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/env_var.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/env_var.py new file mode 100644 index 0000000000000000000000000000000000000000..9e34bca7c5eb142ce17bf727f670d1bd18af38fa --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/env_var.py @@ -0,0 +1,112 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "EnvVar", + "SecretRef", + "SecretEnvVar", + }, +) + + +class EnvVar(proto.Message): + r"""Represents an environment variable present in a Container or + Python Module. + + Attributes: + name (str): + Required. Name of the environment variable. + Must be a valid C identifier. + value (str): + Required. Variables that reference a $(VAR_NAME) are + expanded using the previous defined environment variables in + the container and any service environment variables. If a + variable cannot be resolved, the reference in the input + string will be unchanged. The $(VAR_NAME) syntax can be + escaped with a double $$, ie: $$(VAR_NAME). Escaped + references will never be expanded, regardless of whether the + variable exists or not. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + value: str = proto.Field( + proto.STRING, + number=2, + ) + + +class SecretRef(proto.Message): + r"""Reference to a secret stored in the Cloud Secret Manager that + will provide the value for this environment variable. + + Attributes: + secret (str): + Required. The name of the secret in Cloud Secret Manager. + Format: {secret_name}. + version (str): + The Cloud Secret Manager secret version. + Can be 'latest' for the latest version, an + integer for a specific version, or a version + alias. + """ + + secret: str = proto.Field( + proto.STRING, + number=1, + ) + version: str = proto.Field( + proto.STRING, + number=2, + ) + + +class SecretEnvVar(proto.Message): + r"""Represents an environment variable where the value is a + secret in Cloud Secret Manager. + + Attributes: + name (str): + Required. Name of the secret environment + variable. + secret_ref (google.cloud.aiplatform_v1.types.SecretRef): + Required. Reference to a secret stored in the + Cloud Secret Manager that will provide the value + for this environment variable. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + secret_ref: "SecretRef" = proto.Field( + proto.MESSAGE, + number=2, + message="SecretRef", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/evaluation_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/evaluation_service.py new file mode 100644 index 0000000000000000000000000000000000000000..9ba05390ac1788a6a13d52039109eb31a1a458b8 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/evaluation_service.py @@ -0,0 +1,4377 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content +from google.cloud.aiplatform_v1.types import io +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PairwiseChoice", + "EvaluateInstancesRequest", + "Metric", + "AutoraterConfig", + "EvaluateInstancesResponse", + "MetricResult", + "OutputConfig", + "EvaluationDataset", + "EvaluateDatasetResponse", + "OutputInfo", + "AggregationOutput", + "AggregationResult", + "PredefinedMetricSpec", + "ComputationBasedMetricSpec", + "LLMBasedMetricSpec", + "ExactMatchInput", + "ExactMatchInstance", + "ExactMatchSpec", + "ExactMatchResults", + "ExactMatchMetricValue", + "BleuInput", + "BleuInstance", + "BleuSpec", + "BleuResults", + "BleuMetricValue", + "RougeInput", + "RougeInstance", + "RougeSpec", + "RougeResults", + "RougeMetricValue", + "CoherenceInput", + "CoherenceInstance", + "CoherenceSpec", + "CoherenceResult", + "FluencyInput", + "FluencyInstance", + "FluencySpec", + "FluencyResult", + "SafetyInput", + "SafetyInstance", + "SafetySpec", + "SafetyResult", + "GroundednessInput", + "GroundednessInstance", + "GroundednessSpec", + "GroundednessResult", + "FulfillmentInput", + "FulfillmentInstance", + "FulfillmentSpec", + "FulfillmentResult", + "SummarizationQualityInput", + "SummarizationQualityInstance", + "SummarizationQualitySpec", + "SummarizationQualityResult", + "PairwiseSummarizationQualityInput", + "PairwiseSummarizationQualityInstance", + "PairwiseSummarizationQualitySpec", + "PairwiseSummarizationQualityResult", + "SummarizationHelpfulnessInput", + "SummarizationHelpfulnessInstance", + "SummarizationHelpfulnessSpec", + "SummarizationHelpfulnessResult", + "SummarizationVerbosityInput", + "SummarizationVerbosityInstance", + "SummarizationVerbositySpec", + "SummarizationVerbosityResult", + "QuestionAnsweringQualityInput", + "QuestionAnsweringQualityInstance", + "QuestionAnsweringQualitySpec", + "QuestionAnsweringQualityResult", + "PairwiseQuestionAnsweringQualityInput", + "PairwiseQuestionAnsweringQualityInstance", + "PairwiseQuestionAnsweringQualitySpec", + "PairwiseQuestionAnsweringQualityResult", + "QuestionAnsweringRelevanceInput", + "QuestionAnsweringRelevanceInstance", + "QuestionAnsweringRelevanceSpec", + "QuestionAnsweringRelevanceResult", + "QuestionAnsweringHelpfulnessInput", + "QuestionAnsweringHelpfulnessInstance", + "QuestionAnsweringHelpfulnessSpec", + "QuestionAnsweringHelpfulnessResult", + "QuestionAnsweringCorrectnessInput", + "QuestionAnsweringCorrectnessInstance", + "QuestionAnsweringCorrectnessSpec", + "QuestionAnsweringCorrectnessResult", + "PointwiseMetricInput", + "PointwiseMetricInstance", + "PointwiseMetricSpec", + "CustomOutputFormatConfig", + "PointwiseMetricResult", + "CustomOutput", + "RawOutput", + "PairwiseMetricInput", + "PairwiseMetricInstance", + "PairwiseMetricSpec", + "PairwiseMetricResult", + "ToolCallValidInput", + "ToolCallValidSpec", + "ToolCallValidInstance", + "ToolCallValidResults", + "ToolCallValidMetricValue", + "ToolNameMatchInput", + "ToolNameMatchSpec", + "ToolNameMatchInstance", + "ToolNameMatchResults", + "ToolNameMatchMetricValue", + "ToolParameterKeyMatchInput", + "ToolParameterKeyMatchSpec", + "ToolParameterKeyMatchInstance", + "ToolParameterKeyMatchResults", + "ToolParameterKeyMatchMetricValue", + "ToolParameterKVMatchInput", + "ToolParameterKVMatchSpec", + "ToolParameterKVMatchInstance", + "ToolParameterKVMatchResults", + "ToolParameterKVMatchMetricValue", + "CometInput", + "CometSpec", + "CometInstance", + "CometResult", + "MetricxInput", + "MetricxSpec", + "MetricxInstance", + "MetricxResult", + "ContentMap", + }, +) + + +class PairwiseChoice(proto.Enum): + r"""Pairwise prediction autorater preference. + + Values: + PAIRWISE_CHOICE_UNSPECIFIED (0): + Unspecified prediction choice. + BASELINE (1): + Baseline prediction wins + CANDIDATE (2): + Candidate prediction wins + TIE (3): + Winner cannot be determined + """ + + PAIRWISE_CHOICE_UNSPECIFIED = 0 + BASELINE = 1 + CANDIDATE = 2 + TIE = 3 + + +class EvaluateInstancesRequest(proto.Message): + r"""Request message for EvaluationService.EvaluateInstances. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exact_match_input (google.cloud.aiplatform_v1.types.ExactMatchInput): + Auto metric instances. + Instances and metric spec for exact match + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + bleu_input (google.cloud.aiplatform_v1.types.BleuInput): + Instances and metric spec for bleu metric. + + This field is a member of `oneof`_ ``metric_inputs``. + rouge_input (google.cloud.aiplatform_v1.types.RougeInput): + Instances and metric spec for rouge metric. + + This field is a member of `oneof`_ ``metric_inputs``. + fluency_input (google.cloud.aiplatform_v1.types.FluencyInput): + LLM-based metric instance. + General text generation metrics, applicable to + other categories. Input for fluency metric. + + This field is a member of `oneof`_ ``metric_inputs``. + coherence_input (google.cloud.aiplatform_v1.types.CoherenceInput): + Input for coherence metric. + + This field is a member of `oneof`_ ``metric_inputs``. + safety_input (google.cloud.aiplatform_v1.types.SafetyInput): + Input for safety metric. + + This field is a member of `oneof`_ ``metric_inputs``. + groundedness_input (google.cloud.aiplatform_v1.types.GroundednessInput): + Input for groundedness metric. + + This field is a member of `oneof`_ ``metric_inputs``. + fulfillment_input (google.cloud.aiplatform_v1.types.FulfillmentInput): + Input for fulfillment metric. + + This field is a member of `oneof`_ ``metric_inputs``. + summarization_quality_input (google.cloud.aiplatform_v1.types.SummarizationQualityInput): + Input for summarization quality metric. + + This field is a member of `oneof`_ ``metric_inputs``. + pairwise_summarization_quality_input (google.cloud.aiplatform_v1.types.PairwiseSummarizationQualityInput): + Input for pairwise summarization quality + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + summarization_helpfulness_input (google.cloud.aiplatform_v1.types.SummarizationHelpfulnessInput): + Input for summarization helpfulness metric. + + This field is a member of `oneof`_ ``metric_inputs``. + summarization_verbosity_input (google.cloud.aiplatform_v1.types.SummarizationVerbosityInput): + Input for summarization verbosity metric. + + This field is a member of `oneof`_ ``metric_inputs``. + question_answering_quality_input (google.cloud.aiplatform_v1.types.QuestionAnsweringQualityInput): + Input for question answering quality metric. + + This field is a member of `oneof`_ ``metric_inputs``. + pairwise_question_answering_quality_input (google.cloud.aiplatform_v1.types.PairwiseQuestionAnsweringQualityInput): + Input for pairwise question answering quality + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + question_answering_relevance_input (google.cloud.aiplatform_v1.types.QuestionAnsweringRelevanceInput): + Input for question answering relevance + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + question_answering_helpfulness_input (google.cloud.aiplatform_v1.types.QuestionAnsweringHelpfulnessInput): + Input for question answering helpfulness + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + question_answering_correctness_input (google.cloud.aiplatform_v1.types.QuestionAnsweringCorrectnessInput): + Input for question answering correctness + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + pointwise_metric_input (google.cloud.aiplatform_v1.types.PointwiseMetricInput): + Input for pointwise metric. + + This field is a member of `oneof`_ ``metric_inputs``. + pairwise_metric_input (google.cloud.aiplatform_v1.types.PairwiseMetricInput): + Input for pairwise metric. + + This field is a member of `oneof`_ ``metric_inputs``. + tool_call_valid_input (google.cloud.aiplatform_v1.types.ToolCallValidInput): + Tool call metric instances. + Input for tool call valid metric. + + This field is a member of `oneof`_ ``metric_inputs``. + tool_name_match_input (google.cloud.aiplatform_v1.types.ToolNameMatchInput): + Input for tool name match metric. + + This field is a member of `oneof`_ ``metric_inputs``. + tool_parameter_key_match_input (google.cloud.aiplatform_v1.types.ToolParameterKeyMatchInput): + Input for tool parameter key match metric. + + This field is a member of `oneof`_ ``metric_inputs``. + tool_parameter_kv_match_input (google.cloud.aiplatform_v1.types.ToolParameterKVMatchInput): + Input for tool parameter key value match + metric. + + This field is a member of `oneof`_ ``metric_inputs``. + comet_input (google.cloud.aiplatform_v1.types.CometInput): + Translation metrics. + Input for Comet metric. + + This field is a member of `oneof`_ ``metric_inputs``. + metricx_input (google.cloud.aiplatform_v1.types.MetricxInput): + Input for Metricx metric. + + This field is a member of `oneof`_ ``metric_inputs``. + location (str): + Required. The resource name of the Location to evaluate the + instances. Format: + ``projects/{project}/locations/{location}`` + """ + + exact_match_input: "ExactMatchInput" = proto.Field( + proto.MESSAGE, + number=2, + oneof="metric_inputs", + message="ExactMatchInput", + ) + bleu_input: "BleuInput" = proto.Field( + proto.MESSAGE, + number=3, + oneof="metric_inputs", + message="BleuInput", + ) + rouge_input: "RougeInput" = proto.Field( + proto.MESSAGE, + number=4, + oneof="metric_inputs", + message="RougeInput", + ) + fluency_input: "FluencyInput" = proto.Field( + proto.MESSAGE, + number=5, + oneof="metric_inputs", + message="FluencyInput", + ) + coherence_input: "CoherenceInput" = proto.Field( + proto.MESSAGE, + number=6, + oneof="metric_inputs", + message="CoherenceInput", + ) + safety_input: "SafetyInput" = proto.Field( + proto.MESSAGE, + number=8, + oneof="metric_inputs", + message="SafetyInput", + ) + groundedness_input: "GroundednessInput" = proto.Field( + proto.MESSAGE, + number=9, + oneof="metric_inputs", + message="GroundednessInput", + ) + fulfillment_input: "FulfillmentInput" = proto.Field( + proto.MESSAGE, + number=12, + oneof="metric_inputs", + message="FulfillmentInput", + ) + summarization_quality_input: "SummarizationQualityInput" = proto.Field( + proto.MESSAGE, + number=7, + oneof="metric_inputs", + message="SummarizationQualityInput", + ) + pairwise_summarization_quality_input: "PairwiseSummarizationQualityInput" = ( + proto.Field( + proto.MESSAGE, + number=23, + oneof="metric_inputs", + message="PairwiseSummarizationQualityInput", + ) + ) + summarization_helpfulness_input: "SummarizationHelpfulnessInput" = proto.Field( + proto.MESSAGE, + number=14, + oneof="metric_inputs", + message="SummarizationHelpfulnessInput", + ) + summarization_verbosity_input: "SummarizationVerbosityInput" = proto.Field( + proto.MESSAGE, + number=15, + oneof="metric_inputs", + message="SummarizationVerbosityInput", + ) + question_answering_quality_input: "QuestionAnsweringQualityInput" = proto.Field( + proto.MESSAGE, + number=10, + oneof="metric_inputs", + message="QuestionAnsweringQualityInput", + ) + pairwise_question_answering_quality_input: ( + "PairwiseQuestionAnsweringQualityInput" + ) = proto.Field( + proto.MESSAGE, + number=24, + oneof="metric_inputs", + message="PairwiseQuestionAnsweringQualityInput", + ) + question_answering_relevance_input: "QuestionAnsweringRelevanceInput" = proto.Field( + proto.MESSAGE, + number=16, + oneof="metric_inputs", + message="QuestionAnsweringRelevanceInput", + ) + question_answering_helpfulness_input: "QuestionAnsweringHelpfulnessInput" = ( + proto.Field( + proto.MESSAGE, + number=17, + oneof="metric_inputs", + message="QuestionAnsweringHelpfulnessInput", + ) + ) + question_answering_correctness_input: "QuestionAnsweringCorrectnessInput" = ( + proto.Field( + proto.MESSAGE, + number=18, + oneof="metric_inputs", + message="QuestionAnsweringCorrectnessInput", + ) + ) + pointwise_metric_input: "PointwiseMetricInput" = proto.Field( + proto.MESSAGE, + number=28, + oneof="metric_inputs", + message="PointwiseMetricInput", + ) + pairwise_metric_input: "PairwiseMetricInput" = proto.Field( + proto.MESSAGE, + number=29, + oneof="metric_inputs", + message="PairwiseMetricInput", + ) + tool_call_valid_input: "ToolCallValidInput" = proto.Field( + proto.MESSAGE, + number=19, + oneof="metric_inputs", + message="ToolCallValidInput", + ) + tool_name_match_input: "ToolNameMatchInput" = proto.Field( + proto.MESSAGE, + number=20, + oneof="metric_inputs", + message="ToolNameMatchInput", + ) + tool_parameter_key_match_input: "ToolParameterKeyMatchInput" = proto.Field( + proto.MESSAGE, + number=21, + oneof="metric_inputs", + message="ToolParameterKeyMatchInput", + ) + tool_parameter_kv_match_input: "ToolParameterKVMatchInput" = proto.Field( + proto.MESSAGE, + number=22, + oneof="metric_inputs", + message="ToolParameterKVMatchInput", + ) + comet_input: "CometInput" = proto.Field( + proto.MESSAGE, + number=31, + oneof="metric_inputs", + message="CometInput", + ) + metricx_input: "MetricxInput" = proto.Field( + proto.MESSAGE, + number=32, + oneof="metric_inputs", + message="MetricxInput", + ) + location: str = proto.Field( + proto.STRING, + number=1, + ) + + +class Metric(proto.Message): + r"""The metric used for running evaluations. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + predefined_metric_spec (google.cloud.aiplatform_v1.types.PredefinedMetricSpec): + The spec for a pre-defined metric. + + This field is a member of `oneof`_ ``metric_spec``. + computation_based_metric_spec (google.cloud.aiplatform_v1.types.ComputationBasedMetricSpec): + Spec for a computation based metric. + + This field is a member of `oneof`_ ``metric_spec``. + llm_based_metric_spec (google.cloud.aiplatform_v1.types.LLMBasedMetricSpec): + Spec for an LLM based metric. + + This field is a member of `oneof`_ ``metric_spec``. + pointwise_metric_spec (google.cloud.aiplatform_v1.types.PointwiseMetricSpec): + Spec for pointwise metric. + + This field is a member of `oneof`_ ``metric_spec``. + pairwise_metric_spec (google.cloud.aiplatform_v1.types.PairwiseMetricSpec): + Spec for pairwise metric. + + This field is a member of `oneof`_ ``metric_spec``. + exact_match_spec (google.cloud.aiplatform_v1.types.ExactMatchSpec): + Spec for exact match metric. + + This field is a member of `oneof`_ ``metric_spec``. + bleu_spec (google.cloud.aiplatform_v1.types.BleuSpec): + Spec for bleu metric. + + This field is a member of `oneof`_ ``metric_spec``. + rouge_spec (google.cloud.aiplatform_v1.types.RougeSpec): + Spec for rouge metric. + + This field is a member of `oneof`_ ``metric_spec``. + aggregation_metrics (MutableSequence[google.cloud.aiplatform_v1.types.Metric.AggregationMetric]): + Optional. The aggregation metrics to use. + """ + + class AggregationMetric(proto.Enum): + r"""The per-metric statistics on evaluation results supported by + ``EvaluationService.EvaluateDataset``. + + Values: + AGGREGATION_METRIC_UNSPECIFIED (0): + Unspecified aggregation metric. + AVERAGE (1): + Average aggregation metric. Not supported for + Pairwise metric. + MODE (2): + Mode aggregation metric. + STANDARD_DEVIATION (3): + Standard deviation aggregation metric. Not + supported for pairwise metric. + VARIANCE (4): + Variance aggregation metric. Not supported + for pairwise metric. + MINIMUM (5): + Minimum aggregation metric. Not supported for + pairwise metric. + MAXIMUM (6): + Maximum aggregation metric. Not supported for + pairwise metric. + MEDIAN (7): + Median aggregation metric. Not supported for + pairwise metric. + PERCENTILE_P90 (8): + 90th percentile aggregation metric. Not + supported for pairwise metric. + PERCENTILE_P95 (9): + 95th percentile aggregation metric. Not + supported for pairwise metric. + PERCENTILE_P99 (10): + 99th percentile aggregation metric. Not + supported for pairwise metric. + """ + + AGGREGATION_METRIC_UNSPECIFIED = 0 + AVERAGE = 1 + MODE = 2 + STANDARD_DEVIATION = 3 + VARIANCE = 4 + MINIMUM = 5 + MAXIMUM = 6 + MEDIAN = 7 + PERCENTILE_P90 = 8 + PERCENTILE_P95 = 9 + PERCENTILE_P99 = 10 + + predefined_metric_spec: "PredefinedMetricSpec" = proto.Field( + proto.MESSAGE, + number=8, + oneof="metric_spec", + message="PredefinedMetricSpec", + ) + computation_based_metric_spec: "ComputationBasedMetricSpec" = proto.Field( + proto.MESSAGE, + number=9, + oneof="metric_spec", + message="ComputationBasedMetricSpec", + ) + llm_based_metric_spec: "LLMBasedMetricSpec" = proto.Field( + proto.MESSAGE, + number=10, + oneof="metric_spec", + message="LLMBasedMetricSpec", + ) + pointwise_metric_spec: "PointwiseMetricSpec" = proto.Field( + proto.MESSAGE, + number=2, + oneof="metric_spec", + message="PointwiseMetricSpec", + ) + pairwise_metric_spec: "PairwiseMetricSpec" = proto.Field( + proto.MESSAGE, + number=3, + oneof="metric_spec", + message="PairwiseMetricSpec", + ) + exact_match_spec: "ExactMatchSpec" = proto.Field( + proto.MESSAGE, + number=4, + oneof="metric_spec", + message="ExactMatchSpec", + ) + bleu_spec: "BleuSpec" = proto.Field( + proto.MESSAGE, + number=5, + oneof="metric_spec", + message="BleuSpec", + ) + rouge_spec: "RougeSpec" = proto.Field( + proto.MESSAGE, + number=6, + oneof="metric_spec", + message="RougeSpec", + ) + aggregation_metrics: MutableSequence[AggregationMetric] = proto.RepeatedField( + proto.ENUM, + number=1, + enum=AggregationMetric, + ) + + +class AutoraterConfig(proto.Message): + r"""The configs for autorater. This is applicable to both + EvaluateInstances and EvaluateDataset. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + sampling_count (int): + Optional. Number of samples for each instance + in the dataset. If not specified, the default is + 4. Minimum value is 1, maximum value is 32. + + This field is a member of `oneof`_ ``_sampling_count``. + flip_enabled (bool): + Optional. Default is true. Whether to flip the candidate and + baseline responses. This is only applicable to the pairwise + metric. If enabled, also provide + PairwiseMetricSpec.candidate_response_field_name and + PairwiseMetricSpec.baseline_response_field_name. When + rendering PairwiseMetricSpec.metric_prompt_template, the + candidate and baseline fields will be flipped for half of + the samples to reduce bias. + + This field is a member of `oneof`_ ``_flip_enabled``. + autorater_model (str): + Optional. The fully qualified name of the publisher model or + tuned autorater endpoint to use. + + Publisher model format: + ``projects/{project}/locations/{location}/publishers/*/models/*`` + + Tuned model endpoint format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + generation_config (google.cloud.aiplatform_v1.types.GenerationConfig): + Optional. Configuration options for model + generation and outputs. + """ + + sampling_count: int = proto.Field( + proto.INT32, + number=1, + optional=True, + ) + flip_enabled: bool = proto.Field( + proto.BOOL, + number=2, + optional=True, + ) + autorater_model: str = proto.Field( + proto.STRING, + number=3, + ) + generation_config: content.GenerationConfig = proto.Field( + proto.MESSAGE, + number=4, + message=content.GenerationConfig, + ) + + +class EvaluateInstancesResponse(proto.Message): + r"""Response message for EvaluationService.EvaluateInstances. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exact_match_results (google.cloud.aiplatform_v1.types.ExactMatchResults): + Auto metric evaluation results. + Results for exact match metric. + + This field is a member of `oneof`_ ``evaluation_results``. + bleu_results (google.cloud.aiplatform_v1.types.BleuResults): + Results for bleu metric. + + This field is a member of `oneof`_ ``evaluation_results``. + rouge_results (google.cloud.aiplatform_v1.types.RougeResults): + Results for rouge metric. + + This field is a member of `oneof`_ ``evaluation_results``. + fluency_result (google.cloud.aiplatform_v1.types.FluencyResult): + LLM-based metric evaluation result. + General text generation metrics, applicable to + other categories. Result for fluency metric. + + This field is a member of `oneof`_ ``evaluation_results``. + coherence_result (google.cloud.aiplatform_v1.types.CoherenceResult): + Result for coherence metric. + + This field is a member of `oneof`_ ``evaluation_results``. + safety_result (google.cloud.aiplatform_v1.types.SafetyResult): + Result for safety metric. + + This field is a member of `oneof`_ ``evaluation_results``. + groundedness_result (google.cloud.aiplatform_v1.types.GroundednessResult): + Result for groundedness metric. + + This field is a member of `oneof`_ ``evaluation_results``. + fulfillment_result (google.cloud.aiplatform_v1.types.FulfillmentResult): + Result for fulfillment metric. + + This field is a member of `oneof`_ ``evaluation_results``. + summarization_quality_result (google.cloud.aiplatform_v1.types.SummarizationQualityResult): + Summarization only metrics. + Result for summarization quality metric. + + This field is a member of `oneof`_ ``evaluation_results``. + pairwise_summarization_quality_result (google.cloud.aiplatform_v1.types.PairwiseSummarizationQualityResult): + Result for pairwise summarization quality + metric. + + This field is a member of `oneof`_ ``evaluation_results``. + summarization_helpfulness_result (google.cloud.aiplatform_v1.types.SummarizationHelpfulnessResult): + Result for summarization helpfulness metric. + + This field is a member of `oneof`_ ``evaluation_results``. + summarization_verbosity_result (google.cloud.aiplatform_v1.types.SummarizationVerbosityResult): + Result for summarization verbosity metric. + + This field is a member of `oneof`_ ``evaluation_results``. + question_answering_quality_result (google.cloud.aiplatform_v1.types.QuestionAnsweringQualityResult): + Question answering only metrics. + Result for question answering quality metric. + + This field is a member of `oneof`_ ``evaluation_results``. + pairwise_question_answering_quality_result (google.cloud.aiplatform_v1.types.PairwiseQuestionAnsweringQualityResult): + Result for pairwise question answering + quality metric. + + This field is a member of `oneof`_ ``evaluation_results``. + question_answering_relevance_result (google.cloud.aiplatform_v1.types.QuestionAnsweringRelevanceResult): + Result for question answering relevance + metric. + + This field is a member of `oneof`_ ``evaluation_results``. + question_answering_helpfulness_result (google.cloud.aiplatform_v1.types.QuestionAnsweringHelpfulnessResult): + Result for question answering helpfulness + metric. + + This field is a member of `oneof`_ ``evaluation_results``. + question_answering_correctness_result (google.cloud.aiplatform_v1.types.QuestionAnsweringCorrectnessResult): + Result for question answering correctness + metric. + + This field is a member of `oneof`_ ``evaluation_results``. + pointwise_metric_result (google.cloud.aiplatform_v1.types.PointwiseMetricResult): + Generic metrics. + Result for pointwise metric. + + This field is a member of `oneof`_ ``evaluation_results``. + pairwise_metric_result (google.cloud.aiplatform_v1.types.PairwiseMetricResult): + Result for pairwise metric. + + This field is a member of `oneof`_ ``evaluation_results``. + tool_call_valid_results (google.cloud.aiplatform_v1.types.ToolCallValidResults): + Tool call metrics. + Results for tool call valid metric. + + This field is a member of `oneof`_ ``evaluation_results``. + tool_name_match_results (google.cloud.aiplatform_v1.types.ToolNameMatchResults): + Results for tool name match metric. + + This field is a member of `oneof`_ ``evaluation_results``. + tool_parameter_key_match_results (google.cloud.aiplatform_v1.types.ToolParameterKeyMatchResults): + Results for tool parameter key match metric. + + This field is a member of `oneof`_ ``evaluation_results``. + tool_parameter_kv_match_results (google.cloud.aiplatform_v1.types.ToolParameterKVMatchResults): + Results for tool parameter key value match + metric. + + This field is a member of `oneof`_ ``evaluation_results``. + comet_result (google.cloud.aiplatform_v1.types.CometResult): + Translation metrics. + Result for Comet metric. + + This field is a member of `oneof`_ ``evaluation_results``. + metricx_result (google.cloud.aiplatform_v1.types.MetricxResult): + Result for Metricx metric. + + This field is a member of `oneof`_ ``evaluation_results``. + metric_results (MutableSequence[google.cloud.aiplatform_v1.types.MetricResult]): + Metric results for each instance. + The order of the metric results is guaranteed to + be the same as the order of the instances in the + request. + """ + + exact_match_results: "ExactMatchResults" = proto.Field( + proto.MESSAGE, + number=1, + oneof="evaluation_results", + message="ExactMatchResults", + ) + bleu_results: "BleuResults" = proto.Field( + proto.MESSAGE, + number=2, + oneof="evaluation_results", + message="BleuResults", + ) + rouge_results: "RougeResults" = proto.Field( + proto.MESSAGE, + number=3, + oneof="evaluation_results", + message="RougeResults", + ) + fluency_result: "FluencyResult" = proto.Field( + proto.MESSAGE, + number=4, + oneof="evaluation_results", + message="FluencyResult", + ) + coherence_result: "CoherenceResult" = proto.Field( + proto.MESSAGE, + number=5, + oneof="evaluation_results", + message="CoherenceResult", + ) + safety_result: "SafetyResult" = proto.Field( + proto.MESSAGE, + number=7, + oneof="evaluation_results", + message="SafetyResult", + ) + groundedness_result: "GroundednessResult" = proto.Field( + proto.MESSAGE, + number=8, + oneof="evaluation_results", + message="GroundednessResult", + ) + fulfillment_result: "FulfillmentResult" = proto.Field( + proto.MESSAGE, + number=11, + oneof="evaluation_results", + message="FulfillmentResult", + ) + summarization_quality_result: "SummarizationQualityResult" = proto.Field( + proto.MESSAGE, + number=6, + oneof="evaluation_results", + message="SummarizationQualityResult", + ) + pairwise_summarization_quality_result: "PairwiseSummarizationQualityResult" = ( + proto.Field( + proto.MESSAGE, + number=22, + oneof="evaluation_results", + message="PairwiseSummarizationQualityResult", + ) + ) + summarization_helpfulness_result: "SummarizationHelpfulnessResult" = proto.Field( + proto.MESSAGE, + number=13, + oneof="evaluation_results", + message="SummarizationHelpfulnessResult", + ) + summarization_verbosity_result: "SummarizationVerbosityResult" = proto.Field( + proto.MESSAGE, + number=14, + oneof="evaluation_results", + message="SummarizationVerbosityResult", + ) + question_answering_quality_result: "QuestionAnsweringQualityResult" = proto.Field( + proto.MESSAGE, + number=9, + oneof="evaluation_results", + message="QuestionAnsweringQualityResult", + ) + pairwise_question_answering_quality_result: ( + "PairwiseQuestionAnsweringQualityResult" + ) = proto.Field( + proto.MESSAGE, + number=23, + oneof="evaluation_results", + message="PairwiseQuestionAnsweringQualityResult", + ) + question_answering_relevance_result: "QuestionAnsweringRelevanceResult" = ( + proto.Field( + proto.MESSAGE, + number=15, + oneof="evaluation_results", + message="QuestionAnsweringRelevanceResult", + ) + ) + question_answering_helpfulness_result: "QuestionAnsweringHelpfulnessResult" = ( + proto.Field( + proto.MESSAGE, + number=16, + oneof="evaluation_results", + message="QuestionAnsweringHelpfulnessResult", + ) + ) + question_answering_correctness_result: "QuestionAnsweringCorrectnessResult" = ( + proto.Field( + proto.MESSAGE, + number=17, + oneof="evaluation_results", + message="QuestionAnsweringCorrectnessResult", + ) + ) + pointwise_metric_result: "PointwiseMetricResult" = proto.Field( + proto.MESSAGE, + number=27, + oneof="evaluation_results", + message="PointwiseMetricResult", + ) + pairwise_metric_result: "PairwiseMetricResult" = proto.Field( + proto.MESSAGE, + number=28, + oneof="evaluation_results", + message="PairwiseMetricResult", + ) + tool_call_valid_results: "ToolCallValidResults" = proto.Field( + proto.MESSAGE, + number=18, + oneof="evaluation_results", + message="ToolCallValidResults", + ) + tool_name_match_results: "ToolNameMatchResults" = proto.Field( + proto.MESSAGE, + number=19, + oneof="evaluation_results", + message="ToolNameMatchResults", + ) + tool_parameter_key_match_results: "ToolParameterKeyMatchResults" = proto.Field( + proto.MESSAGE, + number=20, + oneof="evaluation_results", + message="ToolParameterKeyMatchResults", + ) + tool_parameter_kv_match_results: "ToolParameterKVMatchResults" = proto.Field( + proto.MESSAGE, + number=21, + oneof="evaluation_results", + message="ToolParameterKVMatchResults", + ) + comet_result: "CometResult" = proto.Field( + proto.MESSAGE, + number=29, + oneof="evaluation_results", + message="CometResult", + ) + metricx_result: "MetricxResult" = proto.Field( + proto.MESSAGE, + number=30, + oneof="evaluation_results", + message="MetricxResult", + ) + metric_results: MutableSequence["MetricResult"] = proto.RepeatedField( + proto.MESSAGE, + number=43, + message="MetricResult", + ) + + +class MetricResult(proto.Message): + r"""Result for a single metric on a single instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. The score for the metric. + Please refer to each metric's documentation for + the meaning of the score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. The explanation for the metric + result. + + This field is a member of `oneof`_ ``_explanation``. + error (google.rpc.status_pb2.Status): + Output only. The error status for the metric + result. + + This field is a member of `oneof`_ ``_error``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=4, + optional=True, + message=status_pb2.Status, + ) + + +class OutputConfig(proto.Message): + r"""Config for evaluation output. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_destination (google.cloud.aiplatform_v1.types.GcsDestination): + Cloud storage destination for evaluation + output. + + This field is a member of `oneof`_ ``destination``. + """ + + gcs_destination: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=1, + oneof="destination", + message=io.GcsDestination, + ) + + +class EvaluationDataset(proto.Message): + r"""The dataset used for evaluation. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + Cloud storage source holds the dataset. + Currently only one Cloud Storage file path is + supported. + + This field is a member of `oneof`_ ``source``. + bigquery_source (google.cloud.aiplatform_v1.types.BigQuerySource): + BigQuery source holds the dataset. + + This field is a member of `oneof`_ ``source``. + """ + + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=1, + oneof="source", + message=io.GcsSource, + ) + bigquery_source: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=2, + oneof="source", + message=io.BigQuerySource, + ) + + +class EvaluateDatasetResponse(proto.Message): + r"""The results from an evaluation run performed by the + EvaluationService. + + Attributes: + aggregation_output (google.cloud.aiplatform_v1.types.AggregationOutput): + Output only. Aggregation statistics derived + from results of EvaluationService. + output_info (google.cloud.aiplatform_v1.types.OutputInfo): + Output only. Output info for + EvaluationService. + """ + + aggregation_output: "AggregationOutput" = proto.Field( + proto.MESSAGE, + number=1, + message="AggregationOutput", + ) + output_info: "OutputInfo" = proto.Field( + proto.MESSAGE, + number=3, + message="OutputInfo", + ) + + +class OutputInfo(proto.Message): + r"""Describes the info for output of EvaluationService. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_output_directory (str): + Output only. The full path of the Cloud + Storage directory created, into which the + evaluation results and aggregation results are + written. + + This field is a member of `oneof`_ ``output_location``. + """ + + gcs_output_directory: str = proto.Field( + proto.STRING, + number=1, + oneof="output_location", + ) + + +class AggregationOutput(proto.Message): + r"""The aggregation result for the entire dataset and all + metrics. + + Attributes: + dataset (google.cloud.aiplatform_v1.types.EvaluationDataset): + The dataset used for evaluation & + aggregation. + aggregation_results (MutableSequence[google.cloud.aiplatform_v1.types.AggregationResult]): + One AggregationResult per metric. + """ + + dataset: "EvaluationDataset" = proto.Field( + proto.MESSAGE, + number=1, + message="EvaluationDataset", + ) + aggregation_results: MutableSequence["AggregationResult"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="AggregationResult", + ) + + +class AggregationResult(proto.Message): + r"""The aggregation result for a single metric. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pointwise_metric_result (google.cloud.aiplatform_v1.types.PointwiseMetricResult): + Result for pointwise metric. + + This field is a member of `oneof`_ ``aggregation_result``. + pairwise_metric_result (google.cloud.aiplatform_v1.types.PairwiseMetricResult): + Result for pairwise metric. + + This field is a member of `oneof`_ ``aggregation_result``. + exact_match_metric_value (google.cloud.aiplatform_v1.types.ExactMatchMetricValue): + Results for exact match metric. + + This field is a member of `oneof`_ ``aggregation_result``. + bleu_metric_value (google.cloud.aiplatform_v1.types.BleuMetricValue): + Results for bleu metric. + + This field is a member of `oneof`_ ``aggregation_result``. + rouge_metric_value (google.cloud.aiplatform_v1.types.RougeMetricValue): + Results for rouge metric. + + This field is a member of `oneof`_ ``aggregation_result``. + aggregation_metric (google.cloud.aiplatform_v1.types.Metric.AggregationMetric): + Aggregation metric. + """ + + pointwise_metric_result: "PointwiseMetricResult" = proto.Field( + proto.MESSAGE, + number=5, + oneof="aggregation_result", + message="PointwiseMetricResult", + ) + pairwise_metric_result: "PairwiseMetricResult" = proto.Field( + proto.MESSAGE, + number=6, + oneof="aggregation_result", + message="PairwiseMetricResult", + ) + exact_match_metric_value: "ExactMatchMetricValue" = proto.Field( + proto.MESSAGE, + number=7, + oneof="aggregation_result", + message="ExactMatchMetricValue", + ) + bleu_metric_value: "BleuMetricValue" = proto.Field( + proto.MESSAGE, + number=8, + oneof="aggregation_result", + message="BleuMetricValue", + ) + rouge_metric_value: "RougeMetricValue" = proto.Field( + proto.MESSAGE, + number=9, + oneof="aggregation_result", + message="RougeMetricValue", + ) + aggregation_metric: "Metric.AggregationMetric" = proto.Field( + proto.ENUM, + number=4, + enum="Metric.AggregationMetric", + ) + + +class PredefinedMetricSpec(proto.Message): + r"""The spec for a pre-defined metric. + + Attributes: + metric_spec_name (str): + Required. The name of a pre-defined metric, such as + "instruction_following_v1" or "text_quality_v1". + metric_spec_parameters (google.protobuf.struct_pb2.Struct): + Optional. The parameters needed to run the + pre-defined metric. + """ + + metric_spec_name: str = proto.Field( + proto.STRING, + number=1, + ) + metric_spec_parameters: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Struct, + ) + + +class ComputationBasedMetricSpec(proto.Message): + r"""Specification for a computation based metric. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + type_ (google.cloud.aiplatform_v1.types.ComputationBasedMetricSpec.ComputationBasedMetricType): + Required. The type of the computation based + metric. + + This field is a member of `oneof`_ ``_type``. + parameters (google.protobuf.struct_pb2.Struct): + Optional. A map of parameters for the metric, e.g. + {"rouge_type": "rougeL"}. + + This field is a member of `oneof`_ ``_parameters``. + """ + + class ComputationBasedMetricType(proto.Enum): + r"""Types of computation based metrics. + + Values: + COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED (0): + Unspecified computation based metric type. + EXACT_MATCH (1): + Exact match metric. + BLEU (2): + BLEU metric. + ROUGE (3): + ROUGE metric. + """ + + COMPUTATION_BASED_METRIC_TYPE_UNSPECIFIED = 0 + EXACT_MATCH = 1 + BLEU = 2 + ROUGE = 3 + + type_: ComputationBasedMetricType = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=ComputationBasedMetricType, + ) + parameters: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + optional=True, + message=struct_pb2.Struct, + ) + + +class LLMBasedMetricSpec(proto.Message): + r"""Specification for an LLM based metric. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rubric_group_key (str): + Use a pre-defined group of rubrics associated with the + input. Refers to a key in the rubric_groups map of + EvaluationInstance. + + This field is a member of `oneof`_ ``rubrics_source``. + predefined_rubric_generation_spec (google.cloud.aiplatform_v1.types.PredefinedMetricSpec): + Dynamically generate rubrics using a + predefined spec. + + This field is a member of `oneof`_ ``rubrics_source``. + metric_prompt_template (str): + Required. Template for the prompt sent to the + judge model. + + This field is a member of `oneof`_ ``_metric_prompt_template``. + system_instruction (str): + Optional. System instructions for the judge + model. + + This field is a member of `oneof`_ ``_system_instruction``. + judge_autorater_config (google.cloud.aiplatform_v1.types.AutoraterConfig): + Optional. Optional configuration for the + judge LLM (Autorater). + + This field is a member of `oneof`_ ``_judge_autorater_config``. + additional_config (google.protobuf.struct_pb2.Struct): + Optional. Optional additional configuration + for the metric. + + This field is a member of `oneof`_ ``_additional_config``. + """ + + rubric_group_key: str = proto.Field( + proto.STRING, + number=4, + oneof="rubrics_source", + ) + predefined_rubric_generation_spec: "PredefinedMetricSpec" = proto.Field( + proto.MESSAGE, + number=6, + oneof="rubrics_source", + message="PredefinedMetricSpec", + ) + metric_prompt_template: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + system_instruction: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + judge_autorater_config: "AutoraterConfig" = proto.Field( + proto.MESSAGE, + number=3, + optional=True, + message="AutoraterConfig", + ) + additional_config: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=7, + optional=True, + message=struct_pb2.Struct, + ) + + +class ExactMatchInput(proto.Message): + r"""Input for exact match metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.ExactMatchSpec): + Required. Spec for exact match metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.ExactMatchInstance]): + Required. Repeated exact match instances. + """ + + metric_spec: "ExactMatchSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="ExactMatchSpec", + ) + instances: MutableSequence["ExactMatchInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ExactMatchInstance", + ) + + +class ExactMatchInstance(proto.Message): + r"""Spec for exact match instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class ExactMatchSpec(proto.Message): + r"""Spec for exact match metric - returns 1 if prediction and + reference exactly matches, otherwise 0. + + """ + + +class ExactMatchResults(proto.Message): + r"""Results for exact match metric. + + Attributes: + exact_match_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.ExactMatchMetricValue]): + Output only. Exact match metric values. + """ + + exact_match_metric_values: MutableSequence["ExactMatchMetricValue"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message="ExactMatchMetricValue", + ) + ) + + +class ExactMatchMetricValue(proto.Message): + r"""Exact match metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Exact match score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class BleuInput(proto.Message): + r"""Input for bleu metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.BleuSpec): + Required. Spec for bleu score metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.BleuInstance]): + Required. Repeated bleu instances. + """ + + metric_spec: "BleuSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="BleuSpec", + ) + instances: MutableSequence["BleuInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="BleuInstance", + ) + + +class BleuInstance(proto.Message): + r"""Spec for bleu instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class BleuSpec(proto.Message): + r"""Spec for bleu score metric - calculates the precision of + n-grams in the prediction as compared to reference - returns a + score ranging between 0 to 1. + + Attributes: + use_effective_order (bool): + Optional. Whether to use_effective_order to compute bleu + score. + """ + + use_effective_order: bool = proto.Field( + proto.BOOL, + number=1, + ) + + +class BleuResults(proto.Message): + r"""Results for bleu metric. + + Attributes: + bleu_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.BleuMetricValue]): + Output only. Bleu metric values. + """ + + bleu_metric_values: MutableSequence["BleuMetricValue"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="BleuMetricValue", + ) + + +class BleuMetricValue(proto.Message): + r"""Bleu metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Bleu score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class RougeInput(proto.Message): + r"""Input for rouge metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.RougeSpec): + Required. Spec for rouge score metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.RougeInstance]): + Required. Repeated rouge instances. + """ + + metric_spec: "RougeSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="RougeSpec", + ) + instances: MutableSequence["RougeInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="RougeInstance", + ) + + +class RougeInstance(proto.Message): + r"""Spec for rouge instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class RougeSpec(proto.Message): + r"""Spec for rouge score metric - calculates the recall of + n-grams in prediction as compared to reference - returns a score + ranging between 0 and 1. + + Attributes: + rouge_type (str): + Optional. Supported rouge types are rougen[1-9], rougeL, and + rougeLsum. + use_stemmer (bool): + Optional. Whether to use stemmer to compute + rouge score. + split_summaries (bool): + Optional. Whether to split summaries while + using rougeLsum. + """ + + rouge_type: str = proto.Field( + proto.STRING, + number=1, + ) + use_stemmer: bool = proto.Field( + proto.BOOL, + number=2, + ) + split_summaries: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class RougeResults(proto.Message): + r"""Results for rouge metric. + + Attributes: + rouge_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.RougeMetricValue]): + Output only. Rouge metric values. + """ + + rouge_metric_values: MutableSequence["RougeMetricValue"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="RougeMetricValue", + ) + + +class RougeMetricValue(proto.Message): + r"""Rouge metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Rouge score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class CoherenceInput(proto.Message): + r"""Input for coherence metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.CoherenceSpec): + Required. Spec for coherence score metric. + instance (google.cloud.aiplatform_v1.types.CoherenceInstance): + Required. Coherence instance. + """ + + metric_spec: "CoherenceSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="CoherenceSpec", + ) + instance: "CoherenceInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="CoherenceInstance", + ) + + +class CoherenceInstance(proto.Message): + r"""Spec for coherence instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + +class CoherenceSpec(proto.Message): + r"""Spec for coherence score metric. + + Attributes: + version (int): + Optional. Which version to use for + evaluation. + """ + + version: int = proto.Field( + proto.INT32, + number=1, + ) + + +class CoherenceResult(proto.Message): + r"""Spec for coherence result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Coherence score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for coherence score. + confidence (float): + Output only. Confidence for coherence score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class FluencyInput(proto.Message): + r"""Input for fluency metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.FluencySpec): + Required. Spec for fluency score metric. + instance (google.cloud.aiplatform_v1.types.FluencyInstance): + Required. Fluency instance. + """ + + metric_spec: "FluencySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="FluencySpec", + ) + instance: "FluencyInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="FluencyInstance", + ) + + +class FluencyInstance(proto.Message): + r"""Spec for fluency instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + +class FluencySpec(proto.Message): + r"""Spec for fluency score metric. + + Attributes: + version (int): + Optional. Which version to use for + evaluation. + """ + + version: int = proto.Field( + proto.INT32, + number=1, + ) + + +class FluencyResult(proto.Message): + r"""Spec for fluency result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Fluency score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for fluency score. + confidence (float): + Output only. Confidence for fluency score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class SafetyInput(proto.Message): + r"""Input for safety metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.SafetySpec): + Required. Spec for safety metric. + instance (google.cloud.aiplatform_v1.types.SafetyInstance): + Required. Safety instance. + """ + + metric_spec: "SafetySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="SafetySpec", + ) + instance: "SafetyInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="SafetyInstance", + ) + + +class SafetyInstance(proto.Message): + r"""Spec for safety instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + +class SafetySpec(proto.Message): + r"""Spec for safety metric. + + Attributes: + version (int): + Optional. Which version to use for + evaluation. + """ + + version: int = proto.Field( + proto.INT32, + number=1, + ) + + +class SafetyResult(proto.Message): + r"""Spec for safety result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Safety score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for safety score. + confidence (float): + Output only. Confidence for safety score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class GroundednessInput(proto.Message): + r"""Input for groundedness metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.GroundednessSpec): + Required. Spec for groundedness metric. + instance (google.cloud.aiplatform_v1.types.GroundednessInstance): + Required. Groundedness instance. + """ + + metric_spec: "GroundednessSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="GroundednessSpec", + ) + instance: "GroundednessInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="GroundednessInstance", + ) + + +class GroundednessInstance(proto.Message): + r"""Spec for groundedness instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + context (str): + Required. Background information provided in + context used to compare against the prediction. + + This field is a member of `oneof`_ ``_context``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class GroundednessSpec(proto.Message): + r"""Spec for groundedness metric. + + Attributes: + version (int): + Optional. Which version to use for + evaluation. + """ + + version: int = proto.Field( + proto.INT32, + number=1, + ) + + +class GroundednessResult(proto.Message): + r"""Spec for groundedness result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Groundedness score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for groundedness + score. + confidence (float): + Output only. Confidence for groundedness + score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class FulfillmentInput(proto.Message): + r"""Input for fulfillment metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.FulfillmentSpec): + Required. Spec for fulfillment score metric. + instance (google.cloud.aiplatform_v1.types.FulfillmentInstance): + Required. Fulfillment instance. + """ + + metric_spec: "FulfillmentSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="FulfillmentSpec", + ) + instance: "FulfillmentInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="FulfillmentInstance", + ) + + +class FulfillmentInstance(proto.Message): + r"""Spec for fulfillment instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + instruction (str): + Required. Inference instruction prompt to + compare prediction with. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class FulfillmentSpec(proto.Message): + r"""Spec for fulfillment metric. + + Attributes: + version (int): + Optional. Which version to use for + evaluation. + """ + + version: int = proto.Field( + proto.INT32, + number=1, + ) + + +class FulfillmentResult(proto.Message): + r"""Spec for fulfillment result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Fulfillment score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for fulfillment + score. + confidence (float): + Output only. Confidence for fulfillment + score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class SummarizationQualityInput(proto.Message): + r"""Input for summarization quality metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.SummarizationQualitySpec): + Required. Spec for summarization quality + score metric. + instance (google.cloud.aiplatform_v1.types.SummarizationQualityInstance): + Required. Summarization quality instance. + """ + + metric_spec: "SummarizationQualitySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="SummarizationQualitySpec", + ) + instance: "SummarizationQualityInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="SummarizationQualityInstance", + ) + + +class SummarizationQualityInstance(proto.Message): + r"""Spec for summarization quality instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to be summarized. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. Summarization prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class SummarizationQualitySpec(proto.Message): + r"""Spec for summarization quality score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute summarization quality. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class SummarizationQualityResult(proto.Message): + r"""Spec for summarization quality result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Summarization Quality score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for summarization + quality score. + confidence (float): + Output only. Confidence for summarization + quality score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class PairwiseSummarizationQualityInput(proto.Message): + r"""Input for pairwise summarization quality metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.PairwiseSummarizationQualitySpec): + Required. Spec for pairwise summarization + quality score metric. + instance (google.cloud.aiplatform_v1.types.PairwiseSummarizationQualityInstance): + Required. Pairwise summarization quality + instance. + """ + + metric_spec: "PairwiseSummarizationQualitySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="PairwiseSummarizationQualitySpec", + ) + instance: "PairwiseSummarizationQualityInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="PairwiseSummarizationQualityInstance", + ) + + +class PairwiseSummarizationQualityInstance(proto.Message): + r"""Spec for pairwise summarization quality instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the candidate model. + + This field is a member of `oneof`_ ``_prediction``. + baseline_prediction (str): + Required. Output of the baseline model. + + This field is a member of `oneof`_ ``_baseline_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to be summarized. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. Summarization prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + baseline_prediction: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=5, + optional=True, + ) + + +class PairwiseSummarizationQualitySpec(proto.Message): + r"""Spec for pairwise summarization quality score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute pairwise summarization quality. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class PairwiseSummarizationQualityResult(proto.Message): + r"""Spec for pairwise summarization quality result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pairwise_choice (google.cloud.aiplatform_v1.types.PairwiseChoice): + Output only. Pairwise summarization + prediction choice. + explanation (str): + Output only. Explanation for summarization + quality score. + confidence (float): + Output only. Confidence for summarization + quality score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + pairwise_choice: "PairwiseChoice" = proto.Field( + proto.ENUM, + number=1, + enum="PairwiseChoice", + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class SummarizationHelpfulnessInput(proto.Message): + r"""Input for summarization helpfulness metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.SummarizationHelpfulnessSpec): + Required. Spec for summarization helpfulness + score metric. + instance (google.cloud.aiplatform_v1.types.SummarizationHelpfulnessInstance): + Required. Summarization helpfulness instance. + """ + + metric_spec: "SummarizationHelpfulnessSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="SummarizationHelpfulnessSpec", + ) + instance: "SummarizationHelpfulnessInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="SummarizationHelpfulnessInstance", + ) + + +class SummarizationHelpfulnessInstance(proto.Message): + r"""Spec for summarization helpfulness instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to be summarized. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Optional. Summarization prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class SummarizationHelpfulnessSpec(proto.Message): + r"""Spec for summarization helpfulness score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute summarization helpfulness. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class SummarizationHelpfulnessResult(proto.Message): + r"""Spec for summarization helpfulness result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Summarization Helpfulness score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for summarization + helpfulness score. + confidence (float): + Output only. Confidence for summarization + helpfulness score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class SummarizationVerbosityInput(proto.Message): + r"""Input for summarization verbosity metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.SummarizationVerbositySpec): + Required. Spec for summarization verbosity + score metric. + instance (google.cloud.aiplatform_v1.types.SummarizationVerbosityInstance): + Required. Summarization verbosity instance. + """ + + metric_spec: "SummarizationVerbositySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="SummarizationVerbositySpec", + ) + instance: "SummarizationVerbosityInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="SummarizationVerbosityInstance", + ) + + +class SummarizationVerbosityInstance(proto.Message): + r"""Spec for summarization verbosity instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to be summarized. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Optional. Summarization prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class SummarizationVerbositySpec(proto.Message): + r"""Spec for summarization verbosity score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute summarization verbosity. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class SummarizationVerbosityResult(proto.Message): + r"""Spec for summarization verbosity result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Summarization Verbosity score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for summarization + verbosity score. + confidence (float): + Output only. Confidence for summarization + verbosity score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class QuestionAnsweringQualityInput(proto.Message): + r"""Input for question answering quality metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.QuestionAnsweringQualitySpec): + Required. Spec for question answering quality + score metric. + instance (google.cloud.aiplatform_v1.types.QuestionAnsweringQualityInstance): + Required. Question answering quality + instance. + """ + + metric_spec: "QuestionAnsweringQualitySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="QuestionAnsweringQualitySpec", + ) + instance: "QuestionAnsweringQualityInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="QuestionAnsweringQualityInstance", + ) + + +class QuestionAnsweringQualityInstance(proto.Message): + r"""Spec for question answering quality instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to answer the question. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. Question Answering prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class QuestionAnsweringQualitySpec(proto.Message): + r"""Spec for question answering quality score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute question answering quality. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class QuestionAnsweringQualityResult(proto.Message): + r"""Spec for question answering quality result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Question Answering Quality + score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for question + answering quality score. + confidence (float): + Output only. Confidence for question + answering quality score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class PairwiseQuestionAnsweringQualityInput(proto.Message): + r"""Input for pairwise question answering quality metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.PairwiseQuestionAnsweringQualitySpec): + Required. Spec for pairwise question + answering quality score metric. + instance (google.cloud.aiplatform_v1.types.PairwiseQuestionAnsweringQualityInstance): + Required. Pairwise question answering quality + instance. + """ + + metric_spec: "PairwiseQuestionAnsweringQualitySpec" = proto.Field( + proto.MESSAGE, + number=1, + message="PairwiseQuestionAnsweringQualitySpec", + ) + instance: "PairwiseQuestionAnsweringQualityInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="PairwiseQuestionAnsweringQualityInstance", + ) + + +class PairwiseQuestionAnsweringQualityInstance(proto.Message): + r"""Spec for pairwise question answering quality instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the candidate model. + + This field is a member of `oneof`_ ``_prediction``. + baseline_prediction (str): + Required. Output of the baseline model. + + This field is a member of `oneof`_ ``_baseline_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Required. Text to answer the question. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. Question Answering prompt for LLM. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + baseline_prediction: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=5, + optional=True, + ) + + +class PairwiseQuestionAnsweringQualitySpec(proto.Message): + r"""Spec for pairwise question answering quality score metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute question answering quality. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class PairwiseQuestionAnsweringQualityResult(proto.Message): + r"""Spec for pairwise question answering quality result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + pairwise_choice (google.cloud.aiplatform_v1.types.PairwiseChoice): + Output only. Pairwise question answering + prediction choice. + explanation (str): + Output only. Explanation for question + answering quality score. + confidence (float): + Output only. Confidence for question + answering quality score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + pairwise_choice: "PairwiseChoice" = proto.Field( + proto.ENUM, + number=1, + enum="PairwiseChoice", + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class QuestionAnsweringRelevanceInput(proto.Message): + r"""Input for question answering relevance metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.QuestionAnsweringRelevanceSpec): + Required. Spec for question answering + relevance score metric. + instance (google.cloud.aiplatform_v1.types.QuestionAnsweringRelevanceInstance): + Required. Question answering relevance + instance. + """ + + metric_spec: "QuestionAnsweringRelevanceSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="QuestionAnsweringRelevanceSpec", + ) + instance: "QuestionAnsweringRelevanceInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="QuestionAnsweringRelevanceInstance", + ) + + +class QuestionAnsweringRelevanceInstance(proto.Message): + r"""Spec for question answering relevance instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Optional. Text provided as context to answer + the question. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. The question asked and other + instruction in the inference prompt. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class QuestionAnsweringRelevanceSpec(proto.Message): + r"""Spec for question answering relevance metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute question answering relevance. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class QuestionAnsweringRelevanceResult(proto.Message): + r"""Spec for question answering relevance result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Question Answering Relevance + score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for question + answering relevance score. + confidence (float): + Output only. Confidence for question + answering relevance score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class QuestionAnsweringHelpfulnessInput(proto.Message): + r"""Input for question answering helpfulness metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.QuestionAnsweringHelpfulnessSpec): + Required. Spec for question answering + helpfulness score metric. + instance (google.cloud.aiplatform_v1.types.QuestionAnsweringHelpfulnessInstance): + Required. Question answering helpfulness + instance. + """ + + metric_spec: "QuestionAnsweringHelpfulnessSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="QuestionAnsweringHelpfulnessSpec", + ) + instance: "QuestionAnsweringHelpfulnessInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="QuestionAnsweringHelpfulnessInstance", + ) + + +class QuestionAnsweringHelpfulnessInstance(proto.Message): + r"""Spec for question answering helpfulness instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Optional. Text provided as context to answer + the question. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. The question asked and other + instruction in the inference prompt. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class QuestionAnsweringHelpfulnessSpec(proto.Message): + r"""Spec for question answering helpfulness metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute question answering helpfulness. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class QuestionAnsweringHelpfulnessResult(proto.Message): + r"""Spec for question answering helpfulness result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Question Answering Helpfulness + score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for question + answering helpfulness score. + confidence (float): + Output only. Confidence for question + answering helpfulness score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class QuestionAnsweringCorrectnessInput(proto.Message): + r"""Input for question answering correctness metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.QuestionAnsweringCorrectnessSpec): + Required. Spec for question answering + correctness score metric. + instance (google.cloud.aiplatform_v1.types.QuestionAnsweringCorrectnessInstance): + Required. Question answering correctness + instance. + """ + + metric_spec: "QuestionAnsweringCorrectnessSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="QuestionAnsweringCorrectnessSpec", + ) + instance: "QuestionAnsweringCorrectnessInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="QuestionAnsweringCorrectnessInstance", + ) + + +class QuestionAnsweringCorrectnessInstance(proto.Message): + r"""Spec for question answering correctness instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + context (str): + Optional. Text provided as context to answer + the question. + + This field is a member of `oneof`_ ``_context``. + instruction (str): + Required. The question asked and other + instruction in the inference prompt. + + This field is a member of `oneof`_ ``_instruction``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + context: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + + +class QuestionAnsweringCorrectnessSpec(proto.Message): + r"""Spec for question answering correctness metric. + + Attributes: + use_reference (bool): + Optional. Whether to use instance.reference + to compute question answering correctness. + version (int): + Optional. Which version to use for + evaluation. + """ + + use_reference: bool = proto.Field( + proto.BOOL, + number=1, + ) + version: int = proto.Field( + proto.INT32, + number=2, + ) + + +class QuestionAnsweringCorrectnessResult(proto.Message): + r"""Spec for question answering correctness result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Question Answering Correctness + score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for question + answering correctness score. + confidence (float): + Output only. Confidence for question + answering correctness score. + + This field is a member of `oneof`_ ``_confidence``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + confidence: float = proto.Field( + proto.FLOAT, + number=3, + optional=True, + ) + + +class PointwiseMetricInput(proto.Message): + r"""Input for pointwise metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.PointwiseMetricSpec): + Required. Spec for pointwise metric. + instance (google.cloud.aiplatform_v1.types.PointwiseMetricInstance): + Required. Pointwise metric instance. + """ + + metric_spec: "PointwiseMetricSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="PointwiseMetricSpec", + ) + instance: "PointwiseMetricInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="PointwiseMetricInstance", + ) + + +class PointwiseMetricInstance(proto.Message): + r"""Pointwise metric instance. Usually one instance corresponds + to one row in an evaluation dataset. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + json_instance (str): + Instance specified as a json string. String key-value pairs + are expected in the json_instance to render + PointwiseMetricSpec.instance_prompt_template. + + This field is a member of `oneof`_ ``instance``. + content_map_instance (google.cloud.aiplatform_v1.types.ContentMap): + Key-value contents for the mutlimodality + input, including text, image, video, audio, and + pdf, etc. The key is placeholder in metric + prompt template, and the value is the multimodal + content. + + This field is a member of `oneof`_ ``instance``. + """ + + json_instance: str = proto.Field( + proto.STRING, + number=1, + oneof="instance", + ) + content_map_instance: "ContentMap" = proto.Field( + proto.MESSAGE, + number=2, + oneof="instance", + message="ContentMap", + ) + + +class PointwiseMetricSpec(proto.Message): + r"""Spec for pointwise metric. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + metric_prompt_template (str): + Required. Metric prompt template for + pointwise metric. + + This field is a member of `oneof`_ ``_metric_prompt_template``. + system_instruction (str): + Optional. System instructions for pointwise + metric. + + This field is a member of `oneof`_ ``_system_instruction``. + custom_output_format_config (google.cloud.aiplatform_v1.types.CustomOutputFormatConfig): + Optional. CustomOutputFormatConfig allows customization of + metric output. By default, metrics return a score and + explanation. When this config is set, the default output is + replaced with either: + + - The raw output string. + - A parsed output based on a user-defined schema. If a + custom format is chosen, the ``score`` and ``explanation`` + fields in the corresponding metric result will be empty. + """ + + metric_prompt_template: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + system_instruction: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + custom_output_format_config: "CustomOutputFormatConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="CustomOutputFormatConfig", + ) + + +class CustomOutputFormatConfig(proto.Message): + r"""Spec for custom output format configuration. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + return_raw_output (bool): + Optional. Whether to return raw output. + + This field is a member of `oneof`_ ``custom_output_format_config``. + """ + + return_raw_output: bool = proto.Field( + proto.BOOL, + number=1, + oneof="custom_output_format_config", + ) + + +class PointwiseMetricResult(proto.Message): + r"""Spec for pointwise metric result. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Pointwise metric score. + + This field is a member of `oneof`_ ``_score``. + explanation (str): + Output only. Explanation for pointwise metric + score. + custom_output (google.cloud.aiplatform_v1.types.CustomOutput): + Output only. Spec for custom output. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + custom_output: "CustomOutput" = proto.Field( + proto.MESSAGE, + number=3, + message="CustomOutput", + ) + + +class CustomOutput(proto.Message): + r"""Spec for custom output. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + raw_outputs (google.cloud.aiplatform_v1.types.RawOutput): + Output only. List of raw output strings. + + This field is a member of `oneof`_ ``custom_output``. + """ + + raw_outputs: "RawOutput" = proto.Field( + proto.MESSAGE, + number=1, + oneof="custom_output", + message="RawOutput", + ) + + +class RawOutput(proto.Message): + r"""Raw output. + + Attributes: + raw_output (MutableSequence[str]): + Output only. Raw output string. + """ + + raw_output: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class PairwiseMetricInput(proto.Message): + r"""Input for pairwise metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.PairwiseMetricSpec): + Required. Spec for pairwise metric. + instance (google.cloud.aiplatform_v1.types.PairwiseMetricInstance): + Required. Pairwise metric instance. + """ + + metric_spec: "PairwiseMetricSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="PairwiseMetricSpec", + ) + instance: "PairwiseMetricInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="PairwiseMetricInstance", + ) + + +class PairwiseMetricInstance(proto.Message): + r"""Pairwise metric instance. Usually one instance corresponds to + one row in an evaluation dataset. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + json_instance (str): + Instance specified as a json string. String key-value pairs + are expected in the json_instance to render + PairwiseMetricSpec.instance_prompt_template. + + This field is a member of `oneof`_ ``instance``. + content_map_instance (google.cloud.aiplatform_v1.types.ContentMap): + Key-value contents for the mutlimodality + input, including text, image, video, audio, and + pdf, etc. The key is placeholder in metric + prompt template, and the value is the multimodal + content. + + This field is a member of `oneof`_ ``instance``. + """ + + json_instance: str = proto.Field( + proto.STRING, + number=1, + oneof="instance", + ) + content_map_instance: "ContentMap" = proto.Field( + proto.MESSAGE, + number=2, + oneof="instance", + message="ContentMap", + ) + + +class PairwiseMetricSpec(proto.Message): + r"""Spec for pairwise metric. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + metric_prompt_template (str): + Required. Metric prompt template for pairwise + metric. + + This field is a member of `oneof`_ ``_metric_prompt_template``. + candidate_response_field_name (str): + Optional. The field name of the candidate + response. + baseline_response_field_name (str): + Optional. The field name of the baseline + response. + system_instruction (str): + Optional. System instructions for pairwise + metric. + + This field is a member of `oneof`_ ``_system_instruction``. + custom_output_format_config (google.cloud.aiplatform_v1.types.CustomOutputFormatConfig): + Optional. CustomOutputFormatConfig allows customization of + metric output. When this config is set, the default output + is replaced with the raw output string. If a custom format + is chosen, the ``pairwise_choice`` and ``explanation`` + fields in the corresponding metric result will be empty. + """ + + metric_prompt_template: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + candidate_response_field_name: str = proto.Field( + proto.STRING, + number=2, + ) + baseline_response_field_name: str = proto.Field( + proto.STRING, + number=3, + ) + system_instruction: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + custom_output_format_config: "CustomOutputFormatConfig" = proto.Field( + proto.MESSAGE, + number=5, + message="CustomOutputFormatConfig", + ) + + +class PairwiseMetricResult(proto.Message): + r"""Spec for pairwise metric result. + + Attributes: + pairwise_choice (google.cloud.aiplatform_v1.types.PairwiseChoice): + Output only. Pairwise metric choice. + explanation (str): + Output only. Explanation for pairwise metric + score. + custom_output (google.cloud.aiplatform_v1.types.CustomOutput): + Output only. Spec for custom output. + """ + + pairwise_choice: "PairwiseChoice" = proto.Field( + proto.ENUM, + number=1, + enum="PairwiseChoice", + ) + explanation: str = proto.Field( + proto.STRING, + number=2, + ) + custom_output: "CustomOutput" = proto.Field( + proto.MESSAGE, + number=3, + message="CustomOutput", + ) + + +class ToolCallValidInput(proto.Message): + r"""Input for tool call valid metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.ToolCallValidSpec): + Required. Spec for tool call valid metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.ToolCallValidInstance]): + Required. Repeated tool call valid instances. + """ + + metric_spec: "ToolCallValidSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="ToolCallValidSpec", + ) + instances: MutableSequence["ToolCallValidInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ToolCallValidInstance", + ) + + +class ToolCallValidSpec(proto.Message): + r"""Spec for tool call valid metric.""" + + +class ToolCallValidInstance(proto.Message): + r"""Spec for tool call valid instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class ToolCallValidResults(proto.Message): + r"""Results for tool call valid metric. + + Attributes: + tool_call_valid_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.ToolCallValidMetricValue]): + Output only. Tool call valid metric values. + """ + + tool_call_valid_metric_values: MutableSequence["ToolCallValidMetricValue"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message="ToolCallValidMetricValue", + ) + ) + + +class ToolCallValidMetricValue(proto.Message): + r"""Tool call valid metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Tool call valid score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class ToolNameMatchInput(proto.Message): + r"""Input for tool name match metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.ToolNameMatchSpec): + Required. Spec for tool name match metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.ToolNameMatchInstance]): + Required. Repeated tool name match instances. + """ + + metric_spec: "ToolNameMatchSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="ToolNameMatchSpec", + ) + instances: MutableSequence["ToolNameMatchInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ToolNameMatchInstance", + ) + + +class ToolNameMatchSpec(proto.Message): + r"""Spec for tool name match metric.""" + + +class ToolNameMatchInstance(proto.Message): + r"""Spec for tool name match instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class ToolNameMatchResults(proto.Message): + r"""Results for tool name match metric. + + Attributes: + tool_name_match_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.ToolNameMatchMetricValue]): + Output only. Tool name match metric values. + """ + + tool_name_match_metric_values: MutableSequence["ToolNameMatchMetricValue"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message="ToolNameMatchMetricValue", + ) + ) + + +class ToolNameMatchMetricValue(proto.Message): + r"""Tool name match metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Tool name match score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class ToolParameterKeyMatchInput(proto.Message): + r"""Input for tool parameter key match metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.ToolParameterKeyMatchSpec): + Required. Spec for tool parameter key match + metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.ToolParameterKeyMatchInstance]): + Required. Repeated tool parameter key match + instances. + """ + + metric_spec: "ToolParameterKeyMatchSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="ToolParameterKeyMatchSpec", + ) + instances: MutableSequence["ToolParameterKeyMatchInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ToolParameterKeyMatchInstance", + ) + + +class ToolParameterKeyMatchSpec(proto.Message): + r"""Spec for tool parameter key match metric.""" + + +class ToolParameterKeyMatchInstance(proto.Message): + r"""Spec for tool parameter key match instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class ToolParameterKeyMatchResults(proto.Message): + r"""Results for tool parameter key match metric. + + Attributes: + tool_parameter_key_match_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.ToolParameterKeyMatchMetricValue]): + Output only. Tool parameter key match metric + values. + """ + + tool_parameter_key_match_metric_values: MutableSequence[ + "ToolParameterKeyMatchMetricValue" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="ToolParameterKeyMatchMetricValue", + ) + + +class ToolParameterKeyMatchMetricValue(proto.Message): + r"""Tool parameter key match metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Tool parameter key match score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class ToolParameterKVMatchInput(proto.Message): + r"""Input for tool parameter key value match metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.ToolParameterKVMatchSpec): + Required. Spec for tool parameter key value + match metric. + instances (MutableSequence[google.cloud.aiplatform_v1.types.ToolParameterKVMatchInstance]): + Required. Repeated tool parameter key value + match instances. + """ + + metric_spec: "ToolParameterKVMatchSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="ToolParameterKVMatchSpec", + ) + instances: MutableSequence["ToolParameterKVMatchInstance"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ToolParameterKVMatchInstance", + ) + + +class ToolParameterKVMatchSpec(proto.Message): + r"""Spec for tool parameter key value match metric. + + Attributes: + use_strict_string_match (bool): + Optional. Whether to use STRICT string match + on parameter values. + """ + + use_strict_string_match: bool = proto.Field( + proto.BOOL, + number=1, + ) + + +class ToolParameterKVMatchInstance(proto.Message): + r"""Spec for tool parameter key value match instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Required. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class ToolParameterKVMatchResults(proto.Message): + r"""Results for tool parameter key value match metric. + + Attributes: + tool_parameter_kv_match_metric_values (MutableSequence[google.cloud.aiplatform_v1.types.ToolParameterKVMatchMetricValue]): + Output only. Tool parameter key value match + metric values. + """ + + tool_parameter_kv_match_metric_values: MutableSequence[ + "ToolParameterKVMatchMetricValue" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="ToolParameterKVMatchMetricValue", + ) + + +class ToolParameterKVMatchMetricValue(proto.Message): + r"""Tool parameter key value match metric value for an instance. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Tool parameter key value match + score. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class CometInput(proto.Message): + r"""Input for Comet metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.CometSpec): + Required. Spec for comet metric. + instance (google.cloud.aiplatform_v1.types.CometInstance): + Required. Comet instance. + """ + + metric_spec: "CometSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="CometSpec", + ) + instance: "CometInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="CometInstance", + ) + + +class CometSpec(proto.Message): + r"""Spec for Comet metric. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + version (google.cloud.aiplatform_v1.types.CometSpec.CometVersion): + Required. Which version to use for + evaluation. + + This field is a member of `oneof`_ ``_version``. + source_language (str): + Optional. Source language in BCP-47 format. + target_language (str): + Optional. Target language in BCP-47 format. + Covers both prediction and reference. + """ + + class CometVersion(proto.Enum): + r"""Comet version options. + + Values: + COMET_VERSION_UNSPECIFIED (0): + Comet version unspecified. + COMET_22_SRC_REF (2): + Comet 22 for translation + source + reference + (source-reference-combined). + """ + + COMET_VERSION_UNSPECIFIED = 0 + COMET_22_SRC_REF = 2 + + version: CometVersion = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=CometVersion, + ) + source_language: str = proto.Field( + proto.STRING, + number=2, + ) + target_language: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CometInstance(proto.Message): + r"""Spec for Comet instance - The fields used for evaluation are + dependent on the comet version. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + source (str): + Optional. Source text in original language. + + This field is a member of `oneof`_ ``_source``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + source: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + + +class CometResult(proto.Message): + r"""Spec for Comet result - calculates the comet score for the + given instance using the version specified in the spec. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. Comet score. Range depends on + version. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class MetricxInput(proto.Message): + r"""Input for MetricX metric. + + Attributes: + metric_spec (google.cloud.aiplatform_v1.types.MetricxSpec): + Required. Spec for Metricx metric. + instance (google.cloud.aiplatform_v1.types.MetricxInstance): + Required. Metricx instance. + """ + + metric_spec: "MetricxSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="MetricxSpec", + ) + instance: "MetricxInstance" = proto.Field( + proto.MESSAGE, + number=2, + message="MetricxInstance", + ) + + +class MetricxSpec(proto.Message): + r"""Spec for MetricX metric. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + version (google.cloud.aiplatform_v1.types.MetricxSpec.MetricxVersion): + Required. Which version to use for + evaluation. + + This field is a member of `oneof`_ ``_version``. + source_language (str): + Optional. Source language in BCP-47 format. + target_language (str): + Optional. Target language in BCP-47 format. + Covers both prediction and reference. + """ + + class MetricxVersion(proto.Enum): + r"""MetricX Version options. + + Values: + METRICX_VERSION_UNSPECIFIED (0): + MetricX version unspecified. + METRICX_24_REF (1): + MetricX 2024 (2.6) for translation + + reference (reference-based). + METRICX_24_SRC (2): + MetricX 2024 (2.6) for translation + source + (QE). + METRICX_24_SRC_REF (3): + MetricX 2024 (2.6) for translation + source + + reference (source-reference-combined). + """ + + METRICX_VERSION_UNSPECIFIED = 0 + METRICX_24_REF = 1 + METRICX_24_SRC = 2 + METRICX_24_SRC_REF = 3 + + version: MetricxVersion = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=MetricxVersion, + ) + source_language: str = proto.Field( + proto.STRING, + number=2, + ) + target_language: str = proto.Field( + proto.STRING, + number=3, + ) + + +class MetricxInstance(proto.Message): + r"""Spec for MetricX instance - The fields used for evaluation + are dependent on the MetricX version. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + prediction (str): + Required. Output of the evaluated model. + + This field is a member of `oneof`_ ``_prediction``. + reference (str): + Optional. Ground truth used to compare + against the prediction. + + This field is a member of `oneof`_ ``_reference``. + source (str): + Optional. Source text in original language. + + This field is a member of `oneof`_ ``_source``. + """ + + prediction: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + reference: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + source: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + + +class MetricxResult(proto.Message): + r"""Spec for MetricX result - calculates the MetricX score for + the given instance using the version specified in the spec. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + score (float): + Output only. MetricX score. Range depends on + version. + + This field is a member of `oneof`_ ``_score``. + """ + + score: float = proto.Field( + proto.FLOAT, + number=1, + optional=True, + ) + + +class ContentMap(proto.Message): + r"""Map of placeholder in metric prompt template to contents of + model input. + + Attributes: + values (MutableMapping[str, google.cloud.aiplatform_v1.types.ContentMap.Contents]): + Optional. Map of placeholder to contents. + """ + + class Contents(proto.Message): + r"""Repeated Content type. + + Attributes: + contents (MutableSequence[google.cloud.aiplatform_v1.types.Content]): + Optional. Repeated contents. + """ + + contents: MutableSequence[content.Content] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=content.Content, + ) + + values: MutableMapping[str, Contents] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message=Contents, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation.py new file mode 100644 index 0000000000000000000000000000000000000000..3d0e5097344cc2d959f43e6c35643a53409c9080 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation.py @@ -0,0 +1,1058 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import explanation_metadata +from google.cloud.aiplatform_v1.types import io +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Explanation", + "ModelExplanation", + "Attribution", + "Neighbor", + "ExplanationSpec", + "ExplanationParameters", + "SampledShapleyAttribution", + "IntegratedGradientsAttribution", + "XraiAttribution", + "SmoothGradConfig", + "FeatureNoiseSigma", + "BlurBaselineConfig", + "Examples", + "Presets", + "ExplanationSpecOverride", + "ExplanationMetadataOverride", + "ExamplesOverride", + "ExamplesRestrictionsNamespace", + }, +) + + +class Explanation(proto.Message): + r"""Explanation of a prediction (provided in + [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]) + produced by the Model on a given + [instance][google.cloud.aiplatform.v1.ExplainRequest.instances]. + + Attributes: + attributions (MutableSequence[google.cloud.aiplatform_v1.types.Attribution]): + Output only. Feature attributions grouped by predicted + outputs. + + For Models that predict only one output, such as regression + Models that predict only one score, there is only one + attibution that explains the predicted output. For Models + that predict multiple outputs, such as multiclass Models + that predict multiple classes, each element explains one + specific item. + [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] + can be used to identify which output this attribution is + explaining. + + By default, we provide Shapley values for the predicted + class. However, you can configure the explanation request to + generate Shapley values for any other classes too. For + example, if a model predicts a probability of ``0.4`` for + approving a loan application, the model's decision is to + reject the application since + ``p(reject) = 0.6 > p(approve) = 0.4``, and the default + Shapley values would be computed for rejection decision and + not approval, even though the latter might be the positive + class. + + If users set + [ExplanationParameters.top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k], + the attributions are sorted by + [instance_output_value][google.cloud.aiplatform.v1.Attribution.instance_output_value] + in descending order. If + [ExplanationParameters.output_indices][google.cloud.aiplatform.v1.ExplanationParameters.output_indices] + is specified, the attributions are stored by + [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] + in the same order as they appear in the output_indices. + neighbors (MutableSequence[google.cloud.aiplatform_v1.types.Neighbor]): + Output only. List of the nearest neighbors + for example-based explanations. + For models deployed with the examples + explanations feature enabled, the attributions + field is empty and instead the neighbors field + is populated. + """ + + attributions: MutableSequence["Attribution"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="Attribution", + ) + neighbors: MutableSequence["Neighbor"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="Neighbor", + ) + + +class ModelExplanation(proto.Message): + r"""Aggregated explanation metrics for a Model over a set of + instances. + + Attributes: + mean_attributions (MutableSequence[google.cloud.aiplatform_v1.types.Attribution]): + Output only. Aggregated attributions explaining the Model's + prediction outputs over the set of instances. The + attributions are grouped by outputs. + + For Models that predict only one output, such as regression + Models that predict only one score, there is only one + attibution that explains the predicted output. For Models + that predict multiple outputs, such as multiclass Models + that predict multiple classes, each element explains one + specific item. + [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] + can be used to identify which output this attribution is + explaining. + + The + [baselineOutputValue][google.cloud.aiplatform.v1.Attribution.baseline_output_value], + [instanceOutputValue][google.cloud.aiplatform.v1.Attribution.instance_output_value] + and + [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] + fields are averaged over the test data. + + NOTE: Currently AutoML tabular classification Models produce + only one attribution, which averages attributions over all + the classes it predicts. + [Attribution.approximation_error][google.cloud.aiplatform.v1.Attribution.approximation_error] + is not populated. + """ + + mean_attributions: MutableSequence["Attribution"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="Attribution", + ) + + +class Attribution(proto.Message): + r"""Attribution that explains a particular prediction output. + + Attributes: + baseline_output_value (float): + Output only. Model predicted output if the input instance is + constructed from the baselines of all the features defined + in + [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. + The field name of the output is determined by the key in + [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. + + If the Model's predicted output has multiple dimensions + (rank > 1), this is the value in the output located by + [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. + + If there are multiple baselines, their output values are + averaged. + instance_output_value (float): + Output only. Model predicted output on the corresponding + [explanation instance][ExplainRequest.instances]. The field + name of the output is determined by the key in + [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. + + If the Model predicted output has multiple dimensions, this + is the value in the output located by + [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. + feature_attributions (google.protobuf.struct_pb2.Value): + Output only. Attributions of each explained feature. + Features are extracted from the [prediction + instances][google.cloud.aiplatform.v1.ExplainRequest.instances] + according to [explanation metadata for + inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. + + The value is a struct, whose keys are the name of the + feature. The values are how much the feature in the + [instance][google.cloud.aiplatform.v1.ExplainRequest.instances] + contributed to the predicted result. + + The format of the value is determined by the feature's input + format: + + - If the feature is a scalar value, the attribution value is + a [floating number][google.protobuf.Value.number_value]. + + - If the feature is an array of scalar values, the + attribution value is an + [array][google.protobuf.Value.list_value]. + + - If the feature is a struct, the attribution value is a + [struct][google.protobuf.Value.struct_value]. The keys in + the attribution value struct are the same as the keys in + the feature struct. The formats of the values in the + attribution struct are determined by the formats of the + values in the feature struct. + + The + [ExplanationMetadata.feature_attributions_schema_uri][google.cloud.aiplatform.v1.ExplanationMetadata.feature_attributions_schema_uri] + field, pointed to by the + [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] + field of the + [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] + object, points to the schema file that describes the + features and their attribution values (if it is populated). + output_index (MutableSequence[int]): + Output only. The index that locates the explained prediction + output. + + If the prediction output is a scalar value, output_index is + not populated. If the prediction output has multiple + dimensions, the length of the output_index list is the same + as the number of dimensions of the output. The i-th element + in output_index is the element index of the i-th dimension + of the output vector. Indices start from 0. + output_display_name (str): + Output only. The display name of the output identified by + [output_index][google.cloud.aiplatform.v1.Attribution.output_index]. + For example, the predicted class name by a + multi-classification Model. + + This field is only populated iff the Model predicts display + names as a separate field along with the explained output. + The predicted display name must has the same shape of the + explained output, and can be located using output_index. + approximation_error (float): + Output only. Error of + [feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] + caused by approximation used in the explanation method. + Lower value means more precise attributions. + + - For Sampled Shapley + [attribution][google.cloud.aiplatform.v1.ExplanationParameters.sampled_shapley_attribution], + increasing + [path_count][google.cloud.aiplatform.v1.SampledShapleyAttribution.path_count] + might reduce the error. + - For Integrated Gradients + [attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution], + increasing + [step_count][google.cloud.aiplatform.v1.IntegratedGradientsAttribution.step_count] + might reduce the error. + - For [XRAI + attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution], + increasing + [step_count][google.cloud.aiplatform.v1.XraiAttribution.step_count] + might reduce the error. + + See `this + introduction `__ + for more information. + output_name (str): + Output only. Name of the explain output. Specified as the + key in + [ExplanationMetadata.outputs][google.cloud.aiplatform.v1.ExplanationMetadata.outputs]. + """ + + baseline_output_value: float = proto.Field( + proto.DOUBLE, + number=1, + ) + instance_output_value: float = proto.Field( + proto.DOUBLE, + number=2, + ) + feature_attributions: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=3, + message=struct_pb2.Value, + ) + output_index: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=4, + ) + output_display_name: str = proto.Field( + proto.STRING, + number=5, + ) + approximation_error: float = proto.Field( + proto.DOUBLE, + number=6, + ) + output_name: str = proto.Field( + proto.STRING, + number=7, + ) + + +class Neighbor(proto.Message): + r"""Neighbors for example-based explanations. + + Attributes: + neighbor_id (str): + Output only. The neighbor id. + neighbor_distance (float): + Output only. The neighbor distance. + """ + + neighbor_id: str = proto.Field( + proto.STRING, + number=1, + ) + neighbor_distance: float = proto.Field( + proto.DOUBLE, + number=2, + ) + + +class ExplanationSpec(proto.Message): + r"""Specification of Model explanation. + + Attributes: + parameters (google.cloud.aiplatform_v1.types.ExplanationParameters): + Required. Parameters that configure + explaining of the Model's predictions. + metadata (google.cloud.aiplatform_v1.types.ExplanationMetadata): + Optional. Metadata describing the Model's + input and output for explanation. + """ + + parameters: "ExplanationParameters" = proto.Field( + proto.MESSAGE, + number=1, + message="ExplanationParameters", + ) + metadata: explanation_metadata.ExplanationMetadata = proto.Field( + proto.MESSAGE, + number=2, + message=explanation_metadata.ExplanationMetadata, + ) + + +class ExplanationParameters(proto.Message): + r"""Parameters to configure explaining for Model's predictions. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + sampled_shapley_attribution (google.cloud.aiplatform_v1.types.SampledShapleyAttribution): + An attribution method that approximates + Shapley values for features that contribute to + the label being predicted. A sampling strategy + is used to approximate the value rather than + considering all subsets of features. Refer to + this paper for model details: + https://arxiv.org/abs/1306.4265. + + This field is a member of `oneof`_ ``method``. + integrated_gradients_attribution (google.cloud.aiplatform_v1.types.IntegratedGradientsAttribution): + An attribution method that computes + Aumann-Shapley values taking advantage of the + model's fully differentiable structure. Refer to + this paper for more details: + https://arxiv.org/abs/1703.01365 + + This field is a member of `oneof`_ ``method``. + xrai_attribution (google.cloud.aiplatform_v1.types.XraiAttribution): + An attribution method that redistributes + Integrated Gradients attribution to segmented + regions, taking advantage of the model's fully + differentiable structure. Refer to this paper + for more details: + https://arxiv.org/abs/1906.02825 + + XRAI currently performs better on natural + images, like a picture of a house or an animal. + If the images are taken in artificial + environments, like a lab or manufacturing line, + or from diagnostic equipment, like x-rays or + quality-control cameras, use Integrated + Gradients instead. + + This field is a member of `oneof`_ ``method``. + examples (google.cloud.aiplatform_v1.types.Examples): + Example-based explanations that returns the + nearest neighbors from the provided dataset. + + This field is a member of `oneof`_ ``method``. + top_k (int): + If populated, returns attributions for top K + indices of outputs (defaults to 1). Only applies + to Models that predicts more than one outputs + (e,g, multi-class Models). When set to -1, + returns explanations for all outputs. + output_indices (google.protobuf.struct_pb2.ListValue): + If populated, only returns attributions that have + [output_index][google.cloud.aiplatform.v1.Attribution.output_index] + contained in output_indices. It must be an ndarray of + integers, with the same shape of the output it's explaining. + + If not populated, returns attributions for + [top_k][google.cloud.aiplatform.v1.ExplanationParameters.top_k] + indices of outputs. If neither top_k nor output_indices is + populated, returns the argmax index of the outputs. + + Only applicable to Models that predict multiple outputs + (e,g, multi-class Models that predict multiple classes). + """ + + sampled_shapley_attribution: "SampledShapleyAttribution" = proto.Field( + proto.MESSAGE, + number=1, + oneof="method", + message="SampledShapleyAttribution", + ) + integrated_gradients_attribution: "IntegratedGradientsAttribution" = proto.Field( + proto.MESSAGE, + number=2, + oneof="method", + message="IntegratedGradientsAttribution", + ) + xrai_attribution: "XraiAttribution" = proto.Field( + proto.MESSAGE, + number=3, + oneof="method", + message="XraiAttribution", + ) + examples: "Examples" = proto.Field( + proto.MESSAGE, + number=7, + oneof="method", + message="Examples", + ) + top_k: int = proto.Field( + proto.INT32, + number=4, + ) + output_indices: struct_pb2.ListValue = proto.Field( + proto.MESSAGE, + number=5, + message=struct_pb2.ListValue, + ) + + +class SampledShapleyAttribution(proto.Message): + r"""An attribution method that approximates Shapley values for + features that contribute to the label being predicted. A + sampling strategy is used to approximate the value rather than + considering all subsets of features. + + Attributes: + path_count (int): + Required. The number of feature permutations to consider + when approximating the Shapley values. + + Valid range of its value is [1, 50], inclusively. + """ + + path_count: int = proto.Field( + proto.INT32, + number=1, + ) + + +class IntegratedGradientsAttribution(proto.Message): + r"""An attribution method that computes the Aumann-Shapley value + taking advantage of the model's fully differentiable structure. + Refer to this paper for more details: + https://arxiv.org/abs/1703.01365 + + Attributes: + step_count (int): + Required. The number of steps for approximating the path + integral. A good value to start is 50 and gradually increase + until the sum to diff property is within the desired error + range. + + Valid range of its value is [1, 100], inclusively. + smooth_grad_config (google.cloud.aiplatform_v1.types.SmoothGradConfig): + Config for SmoothGrad approximation of + gradients. + When enabled, the gradients are approximated by + averaging the gradients from noisy samples in + the vicinity of the inputs. Adding noise can + help improve the computed gradients. Refer to + this paper for more details: + https://arxiv.org/pdf/1706.03825.pdf + blur_baseline_config (google.cloud.aiplatform_v1.types.BlurBaselineConfig): + Config for IG with blur baseline. + + When enabled, a linear path from the maximally + blurred image to the input image is created. + Using a blurred baseline instead of zero (black + image) is motivated by the BlurIG approach + explained here: + + https://arxiv.org/abs/2004.03383 + """ + + step_count: int = proto.Field( + proto.INT32, + number=1, + ) + smooth_grad_config: "SmoothGradConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="SmoothGradConfig", + ) + blur_baseline_config: "BlurBaselineConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="BlurBaselineConfig", + ) + + +class XraiAttribution(proto.Message): + r"""An explanation method that redistributes Integrated Gradients + attributions to segmented regions, taking advantage of the + model's fully differentiable structure. Refer to this paper for + more details: + + https://arxiv.org/abs/1906.02825 + + Supported only by image Models. + + Attributes: + step_count (int): + Required. The number of steps for approximating the path + integral. A good value to start is 50 and gradually increase + until the sum to diff property is met within the desired + error range. + + Valid range of its value is [1, 100], inclusively. + smooth_grad_config (google.cloud.aiplatform_v1.types.SmoothGradConfig): + Config for SmoothGrad approximation of + gradients. + When enabled, the gradients are approximated by + averaging the gradients from noisy samples in + the vicinity of the inputs. Adding noise can + help improve the computed gradients. Refer to + this paper for more details: + https://arxiv.org/pdf/1706.03825.pdf + blur_baseline_config (google.cloud.aiplatform_v1.types.BlurBaselineConfig): + Config for XRAI with blur baseline. + + When enabled, a linear path from the maximally + blurred image to the input image is created. + Using a blurred baseline instead of zero (black + image) is motivated by the BlurIG approach + explained here: + + https://arxiv.org/abs/2004.03383 + """ + + step_count: int = proto.Field( + proto.INT32, + number=1, + ) + smooth_grad_config: "SmoothGradConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="SmoothGradConfig", + ) + blur_baseline_config: "BlurBaselineConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="BlurBaselineConfig", + ) + + +class SmoothGradConfig(proto.Message): + r"""Config for SmoothGrad approximation of gradients. + + When enabled, the gradients are approximated by averaging the + gradients from noisy samples in the vicinity of the inputs. + Adding noise can help improve the computed gradients. Refer to + this paper for more details: + + https://arxiv.org/pdf/1706.03825.pdf + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + noise_sigma (float): + This is a single float value and will be used to add noise + to all the features. Use this field when all features are + normalized to have the same distribution: scale to range [0, + 1], [-1, 1] or z-scoring, where features are normalized to + have 0-mean and 1-variance. Learn more about + `normalization `__. + + For best results the recommended value is about 10% - 20% of + the standard deviation of the input feature. Refer to + section 3.2 of the SmoothGrad paper: + https://arxiv.org/pdf/1706.03825.pdf. Defaults to 0.1. + + If the distribution is different per feature, set + [feature_noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.feature_noise_sigma] + instead for each feature. + + This field is a member of `oneof`_ ``GradientNoiseSigma``. + feature_noise_sigma (google.cloud.aiplatform_v1.types.FeatureNoiseSigma): + This is similar to + [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma], + but provides additional flexibility. A separate noise sigma + can be provided for each feature, which is useful if their + distributions are different. No noise is added to features + that are not set. If this field is unset, + [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma] + will be used for all features. + + This field is a member of `oneof`_ ``GradientNoiseSigma``. + noisy_sample_count (int): + The number of gradient samples to use for approximation. The + higher this number, the more accurate the gradient is, but + the runtime complexity increases by this factor as well. + Valid range of its value is [1, 50]. Defaults to 3. + """ + + noise_sigma: float = proto.Field( + proto.FLOAT, + number=1, + oneof="GradientNoiseSigma", + ) + feature_noise_sigma: "FeatureNoiseSigma" = proto.Field( + proto.MESSAGE, + number=2, + oneof="GradientNoiseSigma", + message="FeatureNoiseSigma", + ) + noisy_sample_count: int = proto.Field( + proto.INT32, + number=3, + ) + + +class FeatureNoiseSigma(proto.Message): + r"""Noise sigma by features. Noise sigma represents the standard + deviation of the gaussian kernel that will be used to add noise + to interpolated inputs prior to computing gradients. + + Attributes: + noise_sigma (MutableSequence[google.cloud.aiplatform_v1.types.FeatureNoiseSigma.NoiseSigmaForFeature]): + Noise sigma per feature. No noise is added to + features that are not set. + """ + + class NoiseSigmaForFeature(proto.Message): + r"""Noise sigma for a single feature. + + Attributes: + name (str): + The name of the input feature for which noise sigma is + provided. The features are defined in [explanation metadata + inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. + sigma (float): + This represents the standard deviation of the Gaussian + kernel that will be used to add noise to the feature prior + to computing gradients. Similar to + [noise_sigma][google.cloud.aiplatform.v1.SmoothGradConfig.noise_sigma] + but represents the noise added to the current feature. + Defaults to 0.1. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + sigma: float = proto.Field( + proto.FLOAT, + number=2, + ) + + noise_sigma: MutableSequence[NoiseSigmaForFeature] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=NoiseSigmaForFeature, + ) + + +class BlurBaselineConfig(proto.Message): + r"""Config for blur baseline. + + When enabled, a linear path from the maximally blurred image to + the input image is created. Using a blurred baseline instead of + zero (black image) is motivated by the BlurIG approach explained + here: + + https://arxiv.org/abs/2004.03383 + + Attributes: + max_blur_sigma (float): + The standard deviation of the blur kernel for + the blurred baseline. The same blurring + parameter is used for both the height and the + width dimension. If not set, the method defaults + to the zero (i.e. black for images) baseline. + """ + + max_blur_sigma: float = proto.Field( + proto.FLOAT, + number=1, + ) + + +class Examples(proto.Message): + r"""Example-based explainability that returns the nearest + neighbors from the provided dataset. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + example_gcs_source (google.cloud.aiplatform_v1.types.Examples.ExampleGcsSource): + The Cloud Storage input instances. + + This field is a member of `oneof`_ ``source``. + nearest_neighbor_search_config (google.protobuf.struct_pb2.Value): + The full configuration for the generated index, the + semantics are the same as + [metadata][google.cloud.aiplatform.v1.Index.metadata] and + should match + `NearestNeighborSearchConfig `__. + + This field is a member of `oneof`_ ``config``. + presets (google.cloud.aiplatform_v1.types.Presets): + Simplified preset configuration, which + automatically sets configuration values based on + the desired query speed-precision trade-off and + modality. + + This field is a member of `oneof`_ ``config``. + neighbor_count (int): + The number of neighbors to return when + querying for examples. + """ + + class ExampleGcsSource(proto.Message): + r"""The Cloud Storage input instances. + + Attributes: + data_format (google.cloud.aiplatform_v1.types.Examples.ExampleGcsSource.DataFormat): + The format in which instances are given, if + not specified, assume it's JSONL format. + Currently only JSONL format is supported. + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + The Cloud Storage location for the input + instances. + """ + + class DataFormat(proto.Enum): + r"""The format of the input example instances. + + Values: + DATA_FORMAT_UNSPECIFIED (0): + Format unspecified, used when unset. + JSONL (1): + Examples are stored in JSONL files. + """ + + DATA_FORMAT_UNSPECIFIED = 0 + JSONL = 1 + + data_format: "Examples.ExampleGcsSource.DataFormat" = proto.Field( + proto.ENUM, + number=1, + enum="Examples.ExampleGcsSource.DataFormat", + ) + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=2, + message=io.GcsSource, + ) + + example_gcs_source: ExampleGcsSource = proto.Field( + proto.MESSAGE, + number=5, + oneof="source", + message=ExampleGcsSource, + ) + nearest_neighbor_search_config: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=2, + oneof="config", + message=struct_pb2.Value, + ) + presets: "Presets" = proto.Field( + proto.MESSAGE, + number=4, + oneof="config", + message="Presets", + ) + neighbor_count: int = proto.Field( + proto.INT32, + number=3, + ) + + +class Presets(proto.Message): + r"""Preset configuration for example-based explanations + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + query (google.cloud.aiplatform_v1.types.Presets.Query): + Preset option controlling parameters for speed-precision + trade-off when querying for examples. If omitted, defaults + to ``PRECISE``. + + This field is a member of `oneof`_ ``_query``. + modality (google.cloud.aiplatform_v1.types.Presets.Modality): + The modality of the uploaded model, which + automatically configures the distance + measurement and feature normalization for the + underlying example index and queries. If your + model does not precisely fit one of these types, + it is okay to choose the closest type. + """ + + class Query(proto.Enum): + r"""Preset option controlling parameters for query + speed-precision trade-off + + Values: + PRECISE (0): + More precise neighbors as a trade-off against + slower response. + FAST (1): + Faster response as a trade-off against less + precise neighbors. + """ + + PRECISE = 0 + FAST = 1 + + class Modality(proto.Enum): + r"""Preset option controlling parameters for different modalities + + Values: + MODALITY_UNSPECIFIED (0): + Should not be set. Added as a recommended + best practice for enums + IMAGE (1): + IMAGE modality + TEXT (2): + TEXT modality + TABULAR (3): + TABULAR modality + """ + + MODALITY_UNSPECIFIED = 0 + IMAGE = 1 + TEXT = 2 + TABULAR = 3 + + query: Query = proto.Field( + proto.ENUM, + number=1, + optional=True, + enum=Query, + ) + modality: Modality = proto.Field( + proto.ENUM, + number=2, + enum=Modality, + ) + + +class ExplanationSpecOverride(proto.Message): + r"""The [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] + entries that can be overridden at [online + explanation][google.cloud.aiplatform.v1.PredictionService.Explain] + time. + + Attributes: + parameters (google.cloud.aiplatform_v1.types.ExplanationParameters): + The parameters to be overridden. Note that + the attribution method cannot be changed. If not + specified, no parameter is overridden. + metadata (google.cloud.aiplatform_v1.types.ExplanationMetadataOverride): + The metadata to be overridden. If not + specified, no metadata is overridden. + examples_override (google.cloud.aiplatform_v1.types.ExamplesOverride): + The example-based explanations parameter + overrides. + """ + + parameters: "ExplanationParameters" = proto.Field( + proto.MESSAGE, + number=1, + message="ExplanationParameters", + ) + metadata: "ExplanationMetadataOverride" = proto.Field( + proto.MESSAGE, + number=2, + message="ExplanationMetadataOverride", + ) + examples_override: "ExamplesOverride" = proto.Field( + proto.MESSAGE, + number=3, + message="ExamplesOverride", + ) + + +class ExplanationMetadataOverride(proto.Message): + r"""The + [ExplanationMetadata][google.cloud.aiplatform.v1.ExplanationMetadata] + entries that can be overridden at [online + explanation][google.cloud.aiplatform.v1.PredictionService.Explain] + time. + + Attributes: + inputs (MutableMapping[str, google.cloud.aiplatform_v1.types.ExplanationMetadataOverride.InputMetadataOverride]): + Required. Overrides the [input + metadata][google.cloud.aiplatform.v1.ExplanationMetadata.inputs] + of the features. The key is the name of the feature to be + overridden. The keys specified here must exist in the input + metadata to be overridden. If a feature is not specified + here, the corresponding feature's input metadata is not + overridden. + """ + + class InputMetadataOverride(proto.Message): + r"""The [input + metadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata] + entries to be overridden. + + Attributes: + input_baselines (MutableSequence[google.protobuf.struct_pb2.Value]): + Baseline inputs for this feature. + + This overrides the ``input_baseline`` field of the + [ExplanationMetadata.InputMetadata][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata] + object of the corresponding feature's input metadata. If + it's not specified, the original baselines are not + overridden. + """ + + input_baselines: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=struct_pb2.Value, + ) + + inputs: MutableMapping[str, InputMetadataOverride] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message=InputMetadataOverride, + ) + + +class ExamplesOverride(proto.Message): + r"""Overrides for example-based explanations. + + Attributes: + neighbor_count (int): + The number of neighbors to return. + crowding_count (int): + The number of neighbors to return that have + the same crowding tag. + restrictions (MutableSequence[google.cloud.aiplatform_v1.types.ExamplesRestrictionsNamespace]): + Restrict the resulting nearest neighbors to + respect these constraints. + return_embeddings (bool): + If true, return the embeddings instead of + neighbors. + data_format (google.cloud.aiplatform_v1.types.ExamplesOverride.DataFormat): + The format of the data being provided with + each call. + """ + + class DataFormat(proto.Enum): + r"""Data format enum. + + Values: + DATA_FORMAT_UNSPECIFIED (0): + Unspecified format. Must not be used. + INSTANCES (1): + Provided data is a set of model inputs. + EMBEDDINGS (2): + Provided data is a set of embeddings. + """ + + DATA_FORMAT_UNSPECIFIED = 0 + INSTANCES = 1 + EMBEDDINGS = 2 + + neighbor_count: int = proto.Field( + proto.INT32, + number=1, + ) + crowding_count: int = proto.Field( + proto.INT32, + number=2, + ) + restrictions: MutableSequence["ExamplesRestrictionsNamespace"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=3, + message="ExamplesRestrictionsNamespace", + ) + ) + return_embeddings: bool = proto.Field( + proto.BOOL, + number=4, + ) + data_format: DataFormat = proto.Field( + proto.ENUM, + number=5, + enum=DataFormat, + ) + + +class ExamplesRestrictionsNamespace(proto.Message): + r"""Restrictions namespace for example-based explanations + overrides. + + Attributes: + namespace_name (str): + The namespace name. + allow (MutableSequence[str]): + The list of allowed tags. + deny (MutableSequence[str]): + The list of deny tags. + """ + + namespace_name: str = proto.Field( + proto.STRING, + number=1, + ) + allow: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + deny: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation_metadata.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation_metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..a903a48841fc8899f7a6e0ea030a7f45b116acbb --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/explanation_metadata.py @@ -0,0 +1,614 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ExplanationMetadata", + }, +) + + +class ExplanationMetadata(proto.Message): + r"""Metadata describing the Model's input and output for + explanation. + + Attributes: + inputs (MutableMapping[str, google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata]): + Required. Map from feature names to feature input metadata. + Keys are the name of the features. Values are the + specification of the feature. + + An empty InputMetadata is valid. It describes a text feature + which has the name specified as the key in + [ExplanationMetadata.inputs][google.cloud.aiplatform.v1.ExplanationMetadata.inputs]. + The baseline of the empty feature is chosen by Vertex AI. + + For Vertex AI-provided Tensorflow images, the key can be any + friendly name of the feature. Once specified, + [featureAttributions][google.cloud.aiplatform.v1.Attribution.feature_attributions] + are keyed by this key (if not grouped with another feature). + + For custom images, the key must match with the key in + [instance][google.cloud.aiplatform.v1.ExplainRequest.instances]. + outputs (MutableMapping[str, google.cloud.aiplatform_v1.types.ExplanationMetadata.OutputMetadata]): + Required. Map from output names to output + metadata. + For Vertex AI-provided Tensorflow images, keys + can be any user defined string that consists of + any UTF-8 characters. + + For custom images, keys are the name of the + output field in the prediction to be explained. + + Currently only one key is allowed. + feature_attributions_schema_uri (str): + Points to a YAML file stored on Google Cloud Storage + describing the format of the [feature + attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + AutoML tabular Models always have this field populated by + Vertex AI. Note: The URI given on output may be different, + including the URI scheme, than the one given on input. The + output URI will point to a location where the user only has + a read access. + latent_space_source (str): + Name of the source to generate embeddings for + example based explanations. + """ + + class InputMetadata(proto.Message): + r"""Metadata of the input of a feature. + + Fields other than + [InputMetadata.input_baselines][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.input_baselines] + are applicable only for Models that are using Vertex AI-provided + images for Tensorflow. + + Attributes: + input_baselines (MutableSequence[google.protobuf.struct_pb2.Value]): + Baseline inputs for this feature. + + If no baseline is specified, Vertex AI chooses the baseline + for this feature. If multiple baselines are specified, + Vertex AI returns the average attributions across them in + [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions]. + + For Vertex AI-provided Tensorflow images (both 1.x and 2.x), + the shape of each baseline must match the shape of the input + tensor. If a scalar is provided, we broadcast to the same + shape as the input tensor. + + For custom images, the element of the baselines must be in + the same format as the feature's input in the + [instance][google.cloud.aiplatform.v1.ExplainRequest.instances][]. + The schema of any single instance may be specified via + Endpoint's DeployedModels' + [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + input_tensor_name (str): + Name of the input tensor for this feature. + Required and is only applicable to Vertex + AI-provided images for Tensorflow. + encoding (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Encoding): + Defines how the feature is encoded into the + input tensor. Defaults to IDENTITY. + modality (str): + Modality of the feature. Valid values are: + numeric, image. Defaults to numeric. + feature_value_domain (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.FeatureValueDomain): + The domain details of the input feature + value. Like min/max, original mean or standard + deviation if normalized. + indices_tensor_name (str): + Specifies the index of the values of the input tensor. + Required when the input tensor is a sparse representation. + Refer to Tensorflow documentation for more details: + https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor. + dense_shape_tensor_name (str): + Specifies the shape of the values of the input if the input + is a sparse representation. Refer to Tensorflow + documentation for more details: + https://www.tensorflow.org/api_docs/python/tf/sparse/SparseTensor. + index_feature_mapping (MutableSequence[str]): + A list of feature names for each index in the input tensor. + Required when the input + [InputMetadata.encoding][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoding] + is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + encoded_tensor_name (str): + Encoded tensor is a transformation of the input tensor. Must + be provided if choosing [Integrated Gradients + attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution] + or [XRAI + attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution] + and the input tensor is not differentiable. + + An encoded tensor is generated if the input tensor is + encoded by a lookup table. + encoded_baselines (MutableSequence[google.protobuf.struct_pb2.Value]): + A list of baselines for the encoded tensor. + + The shape of each baseline should match the + shape of the encoded tensor. If a scalar is + provided, Vertex AI broadcasts to the same shape + as the encoded tensor. + visualization (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Visualization): + Visualization configurations for image + explanation. + group_name (str): + Name of the group that the input belongs to. Features with + the same group name will be treated as one feature when + computing attributions. Features grouped together can have + different shapes in value. If provided, there will be one + single attribution generated in + [Attribution.feature_attributions][google.cloud.aiplatform.v1.Attribution.feature_attributions], + keyed by the group name. + """ + + class Encoding(proto.Enum): + r"""Defines how a feature is encoded. Defaults to IDENTITY. + + Values: + ENCODING_UNSPECIFIED (0): + Default value. This is the same as IDENTITY. + IDENTITY (1): + The tensor represents one feature. + BAG_OF_FEATURES (2): + The tensor represents a bag of features where each index + maps to a feature. + [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] + must be provided for this encoding. For example: + + :: + + input = [27, 6.0, 150] + index_feature_mapping = ["age", "height", "weight"] + BAG_OF_FEATURES_SPARSE (3): + The tensor represents a bag of features where each index + maps to a feature. Zero values in the tensor indicates + feature being non-existent. + [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] + must be provided for this encoding. For example: + + :: + + input = [2, 0, 5, 0, 1] + index_feature_mapping = ["a", "b", "c", "d", "e"] + INDICATOR (4): + The tensor is a list of binaries representing whether a + feature exists or not (1 indicates existence). + [InputMetadata.index_feature_mapping][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.index_feature_mapping] + must be provided for this encoding. For example: + + :: + + input = [1, 0, 1, 0, 1] + index_feature_mapping = ["a", "b", "c", "d", "e"] + COMBINED_EMBEDDING (5): + The tensor is encoded into a 1-dimensional array represented + by an encoded tensor. + [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name] + must be provided for this encoding. For example: + + :: + + input = ["This", "is", "a", "test", "."] + encoded = [0.1, 0.2, 0.3, 0.4, 0.5] + CONCAT_EMBEDDING (6): + Select this encoding when the input tensor is encoded into a + 2-dimensional array represented by an encoded tensor. + [InputMetadata.encoded_tensor_name][google.cloud.aiplatform.v1.ExplanationMetadata.InputMetadata.encoded_tensor_name] + must be provided for this encoding. The first dimension of + the encoded tensor's shape is the same as the input tensor's + shape. For example: + + :: + + input = ["This", "is", "a", "test", "."] + encoded = [[0.1, 0.2, 0.3, 0.4, 0.5], + [0.2, 0.1, 0.4, 0.3, 0.5], + [0.5, 0.1, 0.3, 0.5, 0.4], + [0.5, 0.3, 0.1, 0.2, 0.4], + [0.4, 0.3, 0.2, 0.5, 0.1]] + """ + + ENCODING_UNSPECIFIED = 0 + IDENTITY = 1 + BAG_OF_FEATURES = 2 + BAG_OF_FEATURES_SPARSE = 3 + INDICATOR = 4 + COMBINED_EMBEDDING = 5 + CONCAT_EMBEDDING = 6 + + class FeatureValueDomain(proto.Message): + r"""Domain details of the input feature value. Provides numeric + information about the feature, such as its range (min, max). If the + feature has been pre-processed, for example with z-scoring, then it + provides information about how to recover the original feature. For + example, if the input feature is an image and it has been + pre-processed to obtain 0-mean and stddev = 1 values, then + original_mean, and original_stddev refer to the mean and stddev of + the original feature (e.g. image tensor) from which input feature + (with mean = 0 and stddev = 1) was obtained. + + Attributes: + min_value (float): + The minimum permissible value for this + feature. + max_value (float): + The maximum permissible value for this + feature. + original_mean (float): + If this input feature has been normalized to a mean value of + 0, the original_mean specifies the mean value of the domain + prior to normalization. + original_stddev (float): + If this input feature has been normalized to a standard + deviation of 1.0, the original_stddev specifies the standard + deviation of the domain prior to normalization. + """ + + min_value: float = proto.Field( + proto.FLOAT, + number=1, + ) + max_value: float = proto.Field( + proto.FLOAT, + number=2, + ) + original_mean: float = proto.Field( + proto.FLOAT, + number=3, + ) + original_stddev: float = proto.Field( + proto.FLOAT, + number=4, + ) + + class Visualization(proto.Message): + r"""Visualization configurations for image explanation. + + Attributes: + type_ (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Visualization.Type): + Type of the image visualization. Only applicable to + [Integrated Gradients + attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]. + OUTLINES shows regions of attribution, while PIXELS shows + per-pixel attribution. Defaults to OUTLINES. + polarity (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Visualization.Polarity): + Whether to only highlight pixels with + positive contributions, negative or both. + Defaults to POSITIVE. + color_map (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Visualization.ColorMap): + The color scheme used for the highlighted areas. + + Defaults to PINK_GREEN for [Integrated Gradients + attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution], + which shows positive attributions in green and negative in + pink. + + Defaults to VIRIDIS for [XRAI + attribution][google.cloud.aiplatform.v1.ExplanationParameters.xrai_attribution], + which highlights the most influential regions in yellow and + the least influential in blue. + clip_percent_upperbound (float): + Excludes attributions above the specified percentile from + the highlighted areas. Using the clip_percent_upperbound and + clip_percent_lowerbound together can be useful for filtering + out noise and making it easier to see areas of strong + attribution. Defaults to 99.9. + clip_percent_lowerbound (float): + Excludes attributions below the specified + percentile, from the highlighted areas. Defaults + to 62. + overlay_type (google.cloud.aiplatform_v1.types.ExplanationMetadata.InputMetadata.Visualization.OverlayType): + How the original image is displayed in the + visualization. Adjusting the overlay can help + increase visual clarity if the original image + makes it difficult to view the visualization. + Defaults to NONE. + """ + + class Type(proto.Enum): + r"""Type of the image visualization. Only applicable to [Integrated + Gradients + attribution][google.cloud.aiplatform.v1.ExplanationParameters.integrated_gradients_attribution]. + + Values: + TYPE_UNSPECIFIED (0): + Should not be used. + PIXELS (1): + Shows which pixel contributed to the image + prediction. + OUTLINES (2): + Shows which region contributed to the image + prediction by outlining the region. + """ + + TYPE_UNSPECIFIED = 0 + PIXELS = 1 + OUTLINES = 2 + + class Polarity(proto.Enum): + r"""Whether to only highlight pixels with positive contributions, + negative or both. Defaults to POSITIVE. + + Values: + POLARITY_UNSPECIFIED (0): + Default value. This is the same as POSITIVE. + POSITIVE (1): + Highlights the pixels/outlines that were most + influential to the model's prediction. + NEGATIVE (2): + Setting polarity to negative highlights areas + that does not lead to the models's current + prediction. + BOTH (3): + Shows both positive and negative + attributions. + """ + + POLARITY_UNSPECIFIED = 0 + POSITIVE = 1 + NEGATIVE = 2 + BOTH = 3 + + class ColorMap(proto.Enum): + r"""The color scheme used for highlighting areas. + + Values: + COLOR_MAP_UNSPECIFIED (0): + Should not be used. + PINK_GREEN (1): + Positive: green. Negative: pink. + VIRIDIS (2): + Viridis color map: A perceptually uniform + color mapping which is easier to see by those + with colorblindness and progresses from yellow + to green to blue. Positive: yellow. Negative: + blue. + RED (3): + Positive: red. Negative: red. + GREEN (4): + Positive: green. Negative: green. + RED_GREEN (6): + Positive: green. Negative: red. + PINK_WHITE_GREEN (5): + PiYG palette. + """ + + COLOR_MAP_UNSPECIFIED = 0 + PINK_GREEN = 1 + VIRIDIS = 2 + RED = 3 + GREEN = 4 + RED_GREEN = 6 + PINK_WHITE_GREEN = 5 + + class OverlayType(proto.Enum): + r"""How the original image is displayed in the visualization. + + Values: + OVERLAY_TYPE_UNSPECIFIED (0): + Default value. This is the same as NONE. + NONE (1): + No overlay. + ORIGINAL (2): + The attributions are shown on top of the + original image. + GRAYSCALE (3): + The attributions are shown on top of + grayscaled version of the original image. + MASK_BLACK (4): + The attributions are used as a mask to reveal + predictive parts of the image and hide the + un-predictive parts. + """ + + OVERLAY_TYPE_UNSPECIFIED = 0 + NONE = 1 + ORIGINAL = 2 + GRAYSCALE = 3 + MASK_BLACK = 4 + + type_: "ExplanationMetadata.InputMetadata.Visualization.Type" = proto.Field( + proto.ENUM, + number=1, + enum="ExplanationMetadata.InputMetadata.Visualization.Type", + ) + polarity: "ExplanationMetadata.InputMetadata.Visualization.Polarity" = ( + proto.Field( + proto.ENUM, + number=2, + enum="ExplanationMetadata.InputMetadata.Visualization.Polarity", + ) + ) + color_map: "ExplanationMetadata.InputMetadata.Visualization.ColorMap" = ( + proto.Field( + proto.ENUM, + number=3, + enum="ExplanationMetadata.InputMetadata.Visualization.ColorMap", + ) + ) + clip_percent_upperbound: float = proto.Field( + proto.FLOAT, + number=4, + ) + clip_percent_lowerbound: float = proto.Field( + proto.FLOAT, + number=5, + ) + overlay_type: ( + "ExplanationMetadata.InputMetadata.Visualization.OverlayType" + ) = proto.Field( + proto.ENUM, + number=6, + enum="ExplanationMetadata.InputMetadata.Visualization.OverlayType", + ) + + input_baselines: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=struct_pb2.Value, + ) + input_tensor_name: str = proto.Field( + proto.STRING, + number=2, + ) + encoding: "ExplanationMetadata.InputMetadata.Encoding" = proto.Field( + proto.ENUM, + number=3, + enum="ExplanationMetadata.InputMetadata.Encoding", + ) + modality: str = proto.Field( + proto.STRING, + number=4, + ) + feature_value_domain: "ExplanationMetadata.InputMetadata.FeatureValueDomain" = ( + proto.Field( + proto.MESSAGE, + number=5, + message="ExplanationMetadata.InputMetadata.FeatureValueDomain", + ) + ) + indices_tensor_name: str = proto.Field( + proto.STRING, + number=6, + ) + dense_shape_tensor_name: str = proto.Field( + proto.STRING, + number=7, + ) + index_feature_mapping: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=8, + ) + encoded_tensor_name: str = proto.Field( + proto.STRING, + number=9, + ) + encoded_baselines: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=10, + message=struct_pb2.Value, + ) + visualization: "ExplanationMetadata.InputMetadata.Visualization" = proto.Field( + proto.MESSAGE, + number=11, + message="ExplanationMetadata.InputMetadata.Visualization", + ) + group_name: str = proto.Field( + proto.STRING, + number=12, + ) + + class OutputMetadata(proto.Message): + r"""Metadata of the prediction output to be explained. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + index_display_name_mapping (google.protobuf.struct_pb2.Value): + Static mapping between the index and display name. + + Use this if the outputs are a deterministic n-dimensional + array, e.g. a list of scores of all the classes in a + pre-defined order for a multi-classification Model. It's not + feasible if the outputs are non-deterministic, e.g. the + Model produces top-k classes or sort the outputs by their + values. + + The shape of the value must be an n-dimensional array of + strings. The number of dimensions must match that of the + outputs to be explained. The + [Attribution.output_display_name][google.cloud.aiplatform.v1.Attribution.output_display_name] + is populated by locating in the mapping with + [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index]. + + This field is a member of `oneof`_ ``display_name_mapping``. + display_name_mapping_key (str): + Specify a field name in the prediction to look for the + display name. + + Use this if the prediction contains the display names for + the outputs. + + The display names in the prediction must have the same shape + of the outputs, so that it can be located by + [Attribution.output_index][google.cloud.aiplatform.v1.Attribution.output_index] + for a specific output. + + This field is a member of `oneof`_ ``display_name_mapping``. + output_tensor_name (str): + Name of the output tensor. Required and is + only applicable to Vertex AI provided images for + Tensorflow. + """ + + index_display_name_mapping: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=1, + oneof="display_name_mapping", + message=struct_pb2.Value, + ) + display_name_mapping_key: str = proto.Field( + proto.STRING, + number=2, + oneof="display_name_mapping", + ) + output_tensor_name: str = proto.Field( + proto.STRING, + number=3, + ) + + inputs: MutableMapping[str, InputMetadata] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message=InputMetadata, + ) + outputs: MutableMapping[str, OutputMetadata] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=2, + message=OutputMetadata, + ) + feature_attributions_schema_uri: str = proto.Field( + proto.STRING, + number=3, + ) + latent_space_source: str = proto.Field( + proto.STRING, + number=5, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature.py new file mode 100644 index 0000000000000000000000000000000000000000..0bd1c4deced89b6518846aff887d6900640da866 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature.py @@ -0,0 +1,250 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import feature_monitoring_stats +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Feature", + }, +) + + +class Feature(proto.Message): + r"""Feature Metadata information. + For example, color is a feature that describes an apple. + + Attributes: + name (str): + Immutable. Name of the Feature. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`` + ``projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`` + + The last part feature is assigned by the client. The feature + can be up to 64 characters long and can consist only of + ASCII Latin letters A-Z and a-z, underscore(\_), and ASCII + digits 0-9 starting with a letter. The value will be unique + given an entity type. + description (str): + Description of the Feature. + value_type (google.cloud.aiplatform_v1.types.Feature.ValueType): + Immutable. Only applicable for Vertex AI + Feature Store (Legacy). Type of Feature value. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Only applicable for Vertex AI + Feature Store (Legacy). Timestamp when this + EntityType was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Only applicable for Vertex AI + Feature Store (Legacy). Timestamp when this + EntityType was most recently updated. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your Features. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one Feature + (System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + etag (str): + Used to perform a consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + disable_monitoring (bool): + Optional. Only applicable for Vertex AI Feature Store + (Legacy). If not set, use the monitoring_config defined for + the EntityType this Feature belongs to. Only Features with + type + ([Feature.ValueType][google.cloud.aiplatform.v1.Feature.ValueType]) + BOOL, STRING, DOUBLE or INT64 can enable monitoring. + + If set to true, all types of data monitoring are disabled + despite the config on EntityType. + monitoring_stats_anomalies (MutableSequence[google.cloud.aiplatform_v1.types.Feature.MonitoringStatsAnomaly]): + Output only. Only applicable for Vertex AI + Feature Store (Legacy). The list of historical + stats and anomalies with specified objectives. + version_column_name (str): + Only applicable for Vertex AI Feature Store. The name of the + BigQuery Table/View column hosting data for this version. If + no value is provided, will use feature_id. + point_of_contact (str): + Entity responsible for maintaining this + feature. Can be comma separated list of email + addresses or URIs. + """ + + class ValueType(proto.Enum): + r"""Only applicable for Vertex AI Legacy Feature Store. + An enum representing the value type of a feature. + + Values: + VALUE_TYPE_UNSPECIFIED (0): + The value type is unspecified. + BOOL (1): + Used for Feature that is a boolean. + BOOL_ARRAY (2): + Used for Feature that is a list of boolean. + DOUBLE (3): + Used for Feature that is double. + DOUBLE_ARRAY (4): + Used for Feature that is a list of double. + INT64 (9): + Used for Feature that is INT64. + INT64_ARRAY (10): + Used for Feature that is a list of INT64. + STRING (11): + Used for Feature that is string. + STRING_ARRAY (12): + Used for Feature that is a list of String. + BYTES (13): + Used for Feature that is bytes. + STRUCT (14): + Used for Feature that is struct. + """ + + VALUE_TYPE_UNSPECIFIED = 0 + BOOL = 1 + BOOL_ARRAY = 2 + DOUBLE = 3 + DOUBLE_ARRAY = 4 + INT64 = 9 + INT64_ARRAY = 10 + STRING = 11 + STRING_ARRAY = 12 + BYTES = 13 + STRUCT = 14 + + class MonitoringStatsAnomaly(proto.Message): + r"""A list of historical + [SnapshotAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.SnapshotAnalysis] + or + [ImportFeaturesAnalysis][google.cloud.aiplatform.v1.FeaturestoreMonitoringConfig.ImportFeaturesAnalysis] + stats requested by user, sorted by + [FeatureStatsAnomaly.start_time][google.cloud.aiplatform.v1.FeatureStatsAnomaly.start_time] + descending. + + Attributes: + objective (google.cloud.aiplatform_v1.types.Feature.MonitoringStatsAnomaly.Objective): + Output only. The objective for each stats. + feature_stats_anomaly (google.cloud.aiplatform_v1.types.FeatureStatsAnomaly): + Output only. The stats and anomalies + generated at specific timestamp. + """ + + class Objective(proto.Enum): + r"""If the objective in the request is both + Import Feature Analysis and Snapshot Analysis, this objective + could be one of them. Otherwise, this objective should be the + same as the objective in the request. + + Values: + OBJECTIVE_UNSPECIFIED (0): + If it's OBJECTIVE_UNSPECIFIED, monitoring_stats will be + empty. + IMPORT_FEATURE_ANALYSIS (1): + Stats are generated by Import Feature + Analysis. + SNAPSHOT_ANALYSIS (2): + Stats are generated by Snapshot Analysis. + """ + + OBJECTIVE_UNSPECIFIED = 0 + IMPORT_FEATURE_ANALYSIS = 1 + SNAPSHOT_ANALYSIS = 2 + + objective: "Feature.MonitoringStatsAnomaly.Objective" = proto.Field( + proto.ENUM, + number=1, + enum="Feature.MonitoringStatsAnomaly.Objective", + ) + feature_stats_anomaly: feature_monitoring_stats.FeatureStatsAnomaly = ( + proto.Field( + proto.MESSAGE, + number=2, + message=feature_monitoring_stats.FeatureStatsAnomaly, + ) + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + value_type: ValueType = proto.Field( + proto.ENUM, + number=3, + enum=ValueType, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + etag: str = proto.Field( + proto.STRING, + number=7, + ) + disable_monitoring: bool = proto.Field( + proto.BOOL, + number=12, + ) + monitoring_stats_anomalies: MutableSequence[MonitoringStatsAnomaly] = ( + proto.RepeatedField( + proto.MESSAGE, + number=11, + message=MonitoringStatsAnomaly, + ) + ) + version_column_name: str = proto.Field( + proto.STRING, + number=106, + ) + point_of_contact: str = proto.Field( + proto.STRING, + number=107, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_group.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_group.py new file mode 100644 index 0000000000000000000000000000000000000000..e85b0f8afd9eb6dbb4f1deb7bd86631de00b48bf --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_group.py @@ -0,0 +1,189 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import io +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "FeatureGroup", + }, +) + + +class FeatureGroup(proto.Message): + r"""Vertex AI Feature Group. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + big_query (google.cloud.aiplatform_v1.types.FeatureGroup.BigQuery): + Indicates that features for this group come from BigQuery + Table/View. By default treats the source as a sparse time + series source. The BigQuery source table or view must have + at least one entity ID column and a column named + ``feature_timestamp``. + + This field is a member of `oneof`_ ``source``. + name (str): + Identifier. Name of the FeatureGroup. Format: + ``projects/{project}/locations/{location}/featureGroups/{featureGroup}`` + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this FeatureGroup + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this FeatureGroup + was last updated. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your FeatureGroup. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one + FeatureGroup(System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + description (str): + Optional. Description of the FeatureGroup. + """ + + class BigQuery(proto.Message): + r"""Input source type for BigQuery Tables and Views. + + Attributes: + big_query_source (google.cloud.aiplatform_v1.types.BigQuerySource): + Required. Immutable. The BigQuery source URI + that points to either a BigQuery Table or View. + entity_id_columns (MutableSequence[str]): + Optional. Columns to construct entity_id / row keys. If not + provided defaults to ``entity_id``. + static_data_source (bool): + Optional. Set if the data source is not a + time-series. + time_series (google.cloud.aiplatform_v1.types.FeatureGroup.BigQuery.TimeSeries): + Optional. If the source is a time-series source, this can be + set to control how downstream sources (ex: + [FeatureView][google.cloud.aiplatform.v1.FeatureView] ) will + treat time-series sources. If not set, will treat the source + as a time-series source with ``feature_timestamp`` as + timestamp column and no scan boundary. + dense (bool): + Optional. If set, all feature values will be fetched from a + single row per unique entityId including nulls. If not set, + will collapse all rows for each unique entityId into a singe + row with any non-null values if present, if no non-null + values are present will sync null. ex: If source has schema + ``(entity_id, feature_timestamp, f0, f1)`` and the following + rows: ``(e1, 2020-01-01T10:00:00.123Z, 10, 15)`` + ``(e1, 2020-02-01T10:00:00.123Z, 20, null)`` If dense is + set, ``(e1, 20, null)`` is synced to online stores. If dense + is not set, ``(e1, 20, 15)`` is synced to online stores. + """ + + class TimeSeries(proto.Message): + r""" + + Attributes: + timestamp_column (str): + Optional. Column hosting timestamp values for a time-series + source. Will be used to determine the latest + ``feature_values`` for each entity. Optional. If not + provided, column named ``feature_timestamp`` of type + ``TIMESTAMP`` will be used. + """ + + timestamp_column: str = proto.Field( + proto.STRING, + number=1, + ) + + big_query_source: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=1, + message=io.BigQuerySource, + ) + entity_id_columns: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + static_data_source: bool = proto.Field( + proto.BOOL, + number=3, + ) + time_series: "FeatureGroup.BigQuery.TimeSeries" = proto.Field( + proto.MESSAGE, + number=4, + message="FeatureGroup.BigQuery.TimeSeries", + ) + dense: bool = proto.Field( + proto.BOOL, + number=5, + ) + + big_query: BigQuery = proto.Field( + proto.MESSAGE, + number=7, + oneof="source", + message=BigQuery, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=4, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=5, + ) + description: str = proto.Field( + proto.STRING, + number=6, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_monitoring_stats.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_monitoring_stats.py new file mode 100644 index 0000000000000000000000000000000000000000..d7ef8832c59b8d05afbb4e9766bbe35428af3cb9 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_monitoring_stats.py @@ -0,0 +1,129 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "FeatureStatsAnomaly", + }, +) + + +class FeatureStatsAnomaly(proto.Message): + r"""Stats and Anomaly generated at specific timestamp for specific + Feature. The start_time and end_time are used to define the time + range of the dataset that current stats belongs to, e.g. prediction + traffic is bucketed into prediction datasets by time window. If the + Dataset is not defined by time window, start_time = end_time. + Timestamp of the stats and anomalies always refers to end_time. Raw + stats and anomalies are stored in stats_uri or anomaly_uri in the + tensorflow defined protos. Field data_stats contains almost + identical information with the raw stats in Vertex AI defined proto, + for UI to display. + + Attributes: + score (float): + Feature importance score, only populated when cross-feature + monitoring is enabled. For now only used to represent + feature attribution score within range [0, 1] for + [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_SKEW] + and + [ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT][google.cloud.aiplatform.v1.ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT]. + stats_uri (str): + Path of the stats file for current feature values in Cloud + Storage bucket. Format: + gs:////stats. Example: + gs://monitoring_bucket/feature_name/stats. Stats are stored + as binary format with Protobuf message + `tensorflow.metadata.v0.FeatureNameStatistics `__. + anomaly_uri (str): + Path of the anomaly file for current feature values in Cloud + Storage bucket. Format: + gs:////anomalies. Example: + gs://monitoring_bucket/feature_name/anomalies. Stats are + stored as binary format with Protobuf message Anoamlies are + stored as binary format with Protobuf message + [tensorflow.metadata.v0.AnomalyInfo] + (https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/anomalies.proto). + distribution_deviation (float): + Deviation from the current stats to baseline + stats. + 1. For categorical feature, the distribution + distance is calculated by L-inifinity + norm. + 2. For numerical feature, the distribution + distance is calculated by + Jensen–Shannon divergence. + anomaly_detection_threshold (float): + This is the threshold used when detecting anomalies. The + threshold can be changed by user, so this one might be + different from + [ThresholdConfig.value][google.cloud.aiplatform.v1.ThresholdConfig.value]. + start_time (google.protobuf.timestamp_pb2.Timestamp): + The start timestamp of window where stats were generated. + For objectives where time window doesn't make sense (e.g. + Featurestore Snapshot Monitoring), start_time is only used + to indicate the monitoring intervals, so it always equals to + (end_time - monitoring_interval). + end_time (google.protobuf.timestamp_pb2.Timestamp): + The end timestamp of window where stats were generated. For + objectives where time window doesn't make sense (e.g. + Featurestore Snapshot Monitoring), end_time indicates the + timestamp of the data used to generate stats (e.g. timestamp + we take snapshots for feature values). + """ + + score: float = proto.Field( + proto.DOUBLE, + number=1, + ) + stats_uri: str = proto.Field( + proto.STRING, + number=3, + ) + anomaly_uri: str = proto.Field( + proto.STRING, + number=4, + ) + distribution_deviation: float = proto.Field( + proto.DOUBLE, + number=5, + ) + anomaly_detection_threshold: float = proto.Field( + proto.DOUBLE, + number=9, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_online_store.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_online_store.py new file mode 100644 index 0000000000000000000000000000000000000000..4a7face2a621d3615975f567cb6b9282a293628c --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_online_store.py @@ -0,0 +1,341 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import service_networking +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "FeatureOnlineStore", + }, +) + + +class FeatureOnlineStore(proto.Message): + r"""Vertex AI Feature Online Store provides a centralized + repository for serving ML features and embedding indexes at low + latency. The Feature Online Store is a top-level container. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bigtable (google.cloud.aiplatform_v1.types.FeatureOnlineStore.Bigtable): + Contains settings for the Cloud Bigtable + instance that will be created to serve + featureValues for all FeatureViews under this + FeatureOnlineStore. + + This field is a member of `oneof`_ ``storage_type``. + optimized (google.cloud.aiplatform_v1.types.FeatureOnlineStore.Optimized): + Contains settings for the Optimized store that will be + created to serve featureValues for all FeatureViews under + this FeatureOnlineStore. When choose Optimized storage type, + need to set + [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + to use private endpoint. Otherwise will use public endpoint + by default. + + This field is a member of `oneof`_ ``storage_type``. + name (str): + Identifier. Name of the FeatureOnlineStore. Format: + ``projects/{project}/locations/{location}/featureOnlineStores/{featureOnlineStore}`` + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + FeatureOnlineStore was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + FeatureOnlineStore was last updated. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your FeatureOnlineStore. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one + FeatureOnlineStore(System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + state (google.cloud.aiplatform_v1.types.FeatureOnlineStore.State): + Output only. State of the featureOnlineStore. + dedicated_serving_endpoint (google.cloud.aiplatform_v1.types.FeatureOnlineStore.DedicatedServingEndpoint): + Optional. The dedicated serving endpoint for + this FeatureOnlineStore, which is different from + common Vertex service endpoint. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Optional. Customer-managed encryption key + spec for data storage. If set, online store will + be secured by this key. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class State(proto.Enum): + r"""Possible states a featureOnlineStore can have. + + Values: + STATE_UNSPECIFIED (0): + Default value. This value is unused. + STABLE (1): + State when the featureOnlineStore + configuration is not being updated and the + fields reflect the current configuration of the + featureOnlineStore. The featureOnlineStore is + usable in this state. + UPDATING (2): + The state of the featureOnlineStore + configuration when it is being updated. During + an update, the fields reflect either the + original configuration or the updated + configuration of the featureOnlineStore. The + featureOnlineStore is still usable in this + state. + """ + + STATE_UNSPECIFIED = 0 + STABLE = 1 + UPDATING = 2 + + class Bigtable(proto.Message): + r""" + + Attributes: + auto_scaling (google.cloud.aiplatform_v1.types.FeatureOnlineStore.Bigtable.AutoScaling): + Required. Autoscaling config applied to + Bigtable Instance. + enable_direct_bigtable_access (bool): + Optional. Whether direct access to the + Bigtable instance is enabled or not. + bigtable_metadata (google.cloud.aiplatform_v1.types.FeatureOnlineStore.Bigtable.BigtableMetadata): + Output only. Metadata of the Bigtable + instance. Output only. + zone (str): + Optional. The zone where the underlying + Bigtable cluster for the primary Bigtable + instance will be provisioned. Only the zone must + be provided. For example, only "us-central1-a" + should be provided. + """ + + class AutoScaling(proto.Message): + r""" + + Attributes: + min_node_count (int): + Required. The minimum number of nodes to + scale down to. Must be greater than or equal to + 1. + max_node_count (int): + Required. The maximum number of nodes to scale up to. Must + be greater than or equal to min_node_count, and less than or + equal to 10 times of 'min_node_count'. + cpu_utilization_target (int): + Optional. A percentage of the cluster's CPU + capacity. Can be from 10% to 80%. When a + cluster's CPU utilization exceeds the target + that you have set, Bigtable immediately adds + nodes to the cluster. When CPU utilization is + substantially lower than the target, Bigtable + removes nodes. If not set will default to 50%. + """ + + min_node_count: int = proto.Field( + proto.INT32, + number=1, + ) + max_node_count: int = proto.Field( + proto.INT32, + number=2, + ) + cpu_utilization_target: int = proto.Field( + proto.INT32, + number=3, + ) + + class BigtableMetadata(proto.Message): + r"""Metadata of the Bigtable instance. This is used by direct + read access to the Bigtable in tenant project. + + Attributes: + tenant_project_id (str): + Tenant project ID. + instance_id (str): + The Cloud Bigtable instance id. + table_id (str): + The Cloud Bigtable table id. + """ + + tenant_project_id: str = proto.Field( + proto.STRING, + number=1, + ) + instance_id: str = proto.Field( + proto.STRING, + number=2, + ) + table_id: str = proto.Field( + proto.STRING, + number=3, + ) + + auto_scaling: "FeatureOnlineStore.Bigtable.AutoScaling" = proto.Field( + proto.MESSAGE, + number=1, + message="FeatureOnlineStore.Bigtable.AutoScaling", + ) + enable_direct_bigtable_access: bool = proto.Field( + proto.BOOL, + number=3, + ) + bigtable_metadata: "FeatureOnlineStore.Bigtable.BigtableMetadata" = proto.Field( + proto.MESSAGE, + number=4, + message="FeatureOnlineStore.Bigtable.BigtableMetadata", + ) + zone: str = proto.Field( + proto.STRING, + number=5, + ) + + class Optimized(proto.Message): + r"""Optimized storage type""" + + class DedicatedServingEndpoint(proto.Message): + r"""The dedicated serving endpoint for this FeatureOnlineStore. + Only need to set when you choose Optimized storage type. Public + endpoint is provisioned by default. + + Attributes: + public_endpoint_domain_name (str): + Output only. This field will be populated + with the domain name to use for this + FeatureOnlineStore + private_service_connect_config (google.cloud.aiplatform_v1.types.PrivateServiceConnectConfig): + Optional. Private service connect config. The private + service connection is available only for Optimized storage + type, not for embedding management now. If + [PrivateServiceConnectConfig.enable_private_service_connect][google.cloud.aiplatform.v1.PrivateServiceConnectConfig.enable_private_service_connect] + set to true, customers will use private service connection + to send request. Otherwise, the connection will set to + public endpoint. + service_attachment (str): + Output only. The name of the service + attachment resource. Populated if private + service connect is enabled and after + FeatureViewSync is created. + """ + + public_endpoint_domain_name: str = proto.Field( + proto.STRING, + number=2, + ) + private_service_connect_config: ( + service_networking.PrivateServiceConnectConfig + ) = proto.Field( + proto.MESSAGE, + number=3, + message=service_networking.PrivateServiceConnectConfig, + ) + service_attachment: str = proto.Field( + proto.STRING, + number=4, + ) + + bigtable: Bigtable = proto.Field( + proto.MESSAGE, + number=8, + oneof="storage_type", + message=Bigtable, + ) + optimized: Optimized = proto.Field( + proto.MESSAGE, + number=12, + oneof="storage_type", + message=Optimized, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=5, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + state: State = proto.Field( + proto.ENUM, + number=7, + enum=State, + ) + dedicated_serving_endpoint: DedicatedServingEndpoint = proto.Field( + proto.MESSAGE, + number=10, + message=DedicatedServingEndpoint, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=13, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=15, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=16, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_view.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_view.py new file mode 100644 index 0000000000000000000000000000000000000000..20a6c2cf0d09562753769b106720822b09f21804 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/feature_view.py @@ -0,0 +1,540 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import machine_resources +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "FeatureView", + }, +) + + +class FeatureView(proto.Message): + r"""FeatureView is representation of values that the + FeatureOnlineStore will serve based on its syncConfig. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + big_query_source (google.cloud.aiplatform_v1.types.FeatureView.BigQuerySource): + Optional. Configures how data is supposed to + be extracted from a BigQuery source to be loaded + onto the FeatureOnlineStore. + + This field is a member of `oneof`_ ``source``. + feature_registry_source (google.cloud.aiplatform_v1.types.FeatureView.FeatureRegistrySource): + Optional. Configures the features from a + Feature Registry source that need to be loaded + onto the FeatureOnlineStore. + + This field is a member of `oneof`_ ``source``. + vertex_rag_source (google.cloud.aiplatform_v1.types.FeatureView.VertexRagSource): + Optional. The Vertex RAG Source that the + FeatureView is linked to. + + This field is a member of `oneof`_ ``source``. + name (str): + Identifier. Name of the FeatureView. Format: + ``projects/{project}/locations/{location}/featureOnlineStores/{feature_online_store}/featureViews/{feature_view}`` + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this FeatureView + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this FeatureView + was last updated. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your FeatureViews. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one + FeatureOnlineStore(System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + sync_config (google.cloud.aiplatform_v1.types.FeatureView.SyncConfig): + Configures when data is to be synced/updated + for this FeatureView. At the end of the sync the + latest featureValues for each entityId of this + FeatureView are made ready for online serving. + index_config (google.cloud.aiplatform_v1.types.FeatureView.IndexConfig): + Optional. Configuration for index preparation + for vector search. It contains the required + configurations to create an index from source + data, so that approximate nearest neighbor + (a.k.a ANN) algorithms search can be performed + during online serving. + optimized_config (google.cloud.aiplatform_v1.types.FeatureView.OptimizedConfig): + Optional. Configuration for FeatureView + created under Optimized FeatureOnlineStore. + service_agent_type (google.cloud.aiplatform_v1.types.FeatureView.ServiceAgentType): + Optional. Service agent type used during data sync. By + default, the Vertex AI Service Agent is used. When using an + IAM Policy to isolate this FeatureView within a project, a + separate service account should be provisioned by setting + this field to ``SERVICE_AGENT_TYPE_FEATURE_VIEW``. This will + generate a separate service account to access the BigQuery + source table. + service_account_email (str): + Output only. A Service Account unique to this + FeatureView. The role bigquery.dataViewer should + be granted to this service account to allow + Vertex AI Feature Store to sync data to the + online store. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + bigtable_metadata (google.cloud.aiplatform_v1.types.FeatureView.BigtableMetadata): + Metadata containing information about the + Cloud Bigtable. + """ + + class ServiceAgentType(proto.Enum): + r"""Service agent type used during data sync. + + Values: + SERVICE_AGENT_TYPE_UNSPECIFIED (0): + By default, the project-level Vertex AI + Service Agent is enabled. + SERVICE_AGENT_TYPE_PROJECT (1): + Indicates the project-level Vertex AI Service + Agent + (https://cloud.google.com/vertex-ai/docs/general/access-control#service-agents) + will be used during sync jobs. + SERVICE_AGENT_TYPE_FEATURE_VIEW (2): + Enable a FeatureView service account to be created by Vertex + AI and output in the field ``service_account_email``. This + service account will be used to read from the source + BigQuery table during sync. + """ + + SERVICE_AGENT_TYPE_UNSPECIFIED = 0 + SERVICE_AGENT_TYPE_PROJECT = 1 + SERVICE_AGENT_TYPE_FEATURE_VIEW = 2 + + class BigQuerySource(proto.Message): + r""" + + Attributes: + uri (str): + Required. The BigQuery view URI that will be + materialized on each sync trigger based on + FeatureView.SyncConfig. + entity_id_columns (MutableSequence[str]): + Required. Columns to construct entity_id / row keys. + """ + + uri: str = proto.Field( + proto.STRING, + number=1, + ) + entity_id_columns: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + class SyncConfig(proto.Message): + r"""Configuration for Sync. Only one option is set. + + Attributes: + cron (str): + Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch + scheduled runs. To explicitly set a timezone to the cron + tab, apply a prefix in the cron tab: + "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The + ${IANA_TIME_ZONE} may only be a valid string from IANA time + zone database. For example, "CRON_TZ=America/New_York 1 \* + \* \* \*", or "TZ=America/New_York 1 \* \* \* \*". + continuous (bool): + Optional. If true, syncs the FeatureView in a + continuous manner to Online Store. + """ + + cron: str = proto.Field( + proto.STRING, + number=1, + ) + continuous: bool = proto.Field( + proto.BOOL, + number=2, + ) + + class IndexConfig(proto.Message): + r"""Configuration for vector indexing. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + tree_ah_config (google.cloud.aiplatform_v1.types.FeatureView.IndexConfig.TreeAHConfig): + Optional. Configuration options for the + tree-AH algorithm (Shallow tree + + Asymmetric Hashing). Please refer to this + paper for more details: + + https://arxiv.org/abs/1908.10396 + + This field is a member of `oneof`_ ``algorithm_config``. + brute_force_config (google.cloud.aiplatform_v1.types.FeatureView.IndexConfig.BruteForceConfig): + Optional. Configuration options for using + brute force search, which simply implements the + standard linear search in the database for each + query. It is primarily meant for benchmarking + and to generate the ground truth for approximate + search. + + This field is a member of `oneof`_ ``algorithm_config``. + embedding_column (str): + Optional. Column of embedding. This column contains the + source data to create index for vector search. + embedding_column must be set when using vector search. + filter_columns (MutableSequence[str]): + Optional. Columns of features that're used to + filter vector search results. + crowding_column (str): + Optional. Column of crowding. This column contains crowding + attribute which is a constraint on a neighbor list produced + by + [FeatureOnlineStoreService.SearchNearestEntities][google.cloud.aiplatform.v1.FeatureOnlineStoreService.SearchNearestEntities] + to diversify search results. If + [NearestNeighborQuery.per_crowding_attribute_neighbor_count][google.cloud.aiplatform.v1.NearestNeighborQuery.per_crowding_attribute_neighbor_count] + is set to K in + [SearchNearestEntitiesRequest][google.cloud.aiplatform.v1.SearchNearestEntitiesRequest], + it's guaranteed that no more than K entities of the same + crowding attribute are returned in the response. + embedding_dimension (int): + Optional. The number of dimensions of the + input embedding. + + This field is a member of `oneof`_ ``_embedding_dimension``. + distance_measure_type (google.cloud.aiplatform_v1.types.FeatureView.IndexConfig.DistanceMeasureType): + Optional. The distance measure used in + nearest neighbor search. + """ + + class DistanceMeasureType(proto.Enum): + r"""The distance measure used in nearest neighbor search. + + Values: + DISTANCE_MEASURE_TYPE_UNSPECIFIED (0): + Should not be set. + SQUARED_L2_DISTANCE (1): + Euclidean (L_2) Distance. + COSINE_DISTANCE (2): + Cosine Distance. Defined as 1 - cosine similarity. + + We strongly suggest using DOT_PRODUCT_DISTANCE + + UNIT_L2_NORM instead of COSINE distance. Our algorithms have + been more optimized for DOT_PRODUCT distance which, when + combined with UNIT_L2_NORM, is mathematically equivalent to + COSINE distance and results in the same ranking. + DOT_PRODUCT_DISTANCE (3): + Dot Product Distance. Defined as a negative + of the dot product. + """ + + DISTANCE_MEASURE_TYPE_UNSPECIFIED = 0 + SQUARED_L2_DISTANCE = 1 + COSINE_DISTANCE = 2 + DOT_PRODUCT_DISTANCE = 3 + + class BruteForceConfig(proto.Message): + r"""Configuration options for using brute force search.""" + + class TreeAHConfig(proto.Message): + r"""Configuration options for the tree-AH algorithm. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + leaf_node_embedding_count (int): + Optional. Number of embeddings on each leaf + node. The default value is 1000 if not set. + + This field is a member of `oneof`_ ``_leaf_node_embedding_count``. + """ + + leaf_node_embedding_count: int = proto.Field( + proto.INT64, + number=1, + optional=True, + ) + + tree_ah_config: "FeatureView.IndexConfig.TreeAHConfig" = proto.Field( + proto.MESSAGE, + number=6, + oneof="algorithm_config", + message="FeatureView.IndexConfig.TreeAHConfig", + ) + brute_force_config: "FeatureView.IndexConfig.BruteForceConfig" = proto.Field( + proto.MESSAGE, + number=7, + oneof="algorithm_config", + message="FeatureView.IndexConfig.BruteForceConfig", + ) + embedding_column: str = proto.Field( + proto.STRING, + number=1, + ) + filter_columns: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + crowding_column: str = proto.Field( + proto.STRING, + number=3, + ) + embedding_dimension: int = proto.Field( + proto.INT32, + number=4, + optional=True, + ) + distance_measure_type: "FeatureView.IndexConfig.DistanceMeasureType" = ( + proto.Field( + proto.ENUM, + number=5, + enum="FeatureView.IndexConfig.DistanceMeasureType", + ) + ) + + class FeatureRegistrySource(proto.Message): + r"""A Feature Registry source for features that need to be synced + to Online Store. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + feature_groups (MutableSequence[google.cloud.aiplatform_v1.types.FeatureView.FeatureRegistrySource.FeatureGroup]): + Required. List of features that need to be + synced to Online Store. + project_number (int): + Optional. The project number of the parent + project of the Feature Groups. + + This field is a member of `oneof`_ ``_project_number``. + """ + + class FeatureGroup(proto.Message): + r"""Features belonging to a single feature group that will be + synced to Online Store. + + Attributes: + feature_group_id (str): + Required. Identifier of the feature group. + feature_ids (MutableSequence[str]): + Required. Identifiers of features under the + feature group. + """ + + feature_group_id: str = proto.Field( + proto.STRING, + number=1, + ) + feature_ids: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + feature_groups: MutableSequence[ + "FeatureView.FeatureRegistrySource.FeatureGroup" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="FeatureView.FeatureRegistrySource.FeatureGroup", + ) + project_number: int = proto.Field( + proto.INT64, + number=2, + optional=True, + ) + + class VertexRagSource(proto.Message): + r"""A Vertex Rag source for features that need to be synced to + Online Store. + + Attributes: + uri (str): + Required. The BigQuery view/table URI that will be + materialized on each manual sync trigger. The table/view is + expected to have the following columns and types at least: + + - ``corpus_id`` (STRING, NULLABLE/REQUIRED) + - ``file_id`` (STRING, NULLABLE/REQUIRED) + - ``chunk_id`` (STRING, NULLABLE/REQUIRED) + - ``chunk_data_type`` (STRING, NULLABLE/REQUIRED) + - ``chunk_data`` (STRING, NULLABLE/REQUIRED) + - ``embeddings`` (FLOAT, REPEATED) + - ``file_original_uri`` (STRING, NULLABLE/REQUIRED) + rag_corpus_id (int): + Optional. The RAG corpus id corresponding to + this FeatureView. + """ + + uri: str = proto.Field( + proto.STRING, + number=1, + ) + rag_corpus_id: int = proto.Field( + proto.INT64, + number=2, + ) + + class OptimizedConfig(proto.Message): + r"""Configuration for FeatureViews created in Optimized + FeatureOnlineStore. + + Attributes: + automatic_resources (google.cloud.aiplatform_v1.types.AutomaticResources): + Optional. A description of resources that the FeatureView + uses, which to large degree are decided by Vertex AI, and + optionally allows only a modest additional configuration. If + min_replica_count is not set, the default value is 2. If + max_replica_count is not set, the default value is 6. The + max allowed replica count is 1000. + """ + + automatic_resources: machine_resources.AutomaticResources = proto.Field( + proto.MESSAGE, + number=7, + message=machine_resources.AutomaticResources, + ) + + class BigtableMetadata(proto.Message): + r"""Metadata for the Cloud Bigtable that supports directly + interacting Bigtable instances. + + Attributes: + read_app_profile (str): + The Bigtable App Profile to use for reading + from Bigtable. + """ + + read_app_profile: str = proto.Field( + proto.STRING, + number=1, + ) + + big_query_source: BigQuerySource = proto.Field( + proto.MESSAGE, + number=6, + oneof="source", + message=BigQuerySource, + ) + feature_registry_source: FeatureRegistrySource = proto.Field( + proto.MESSAGE, + number=9, + oneof="source", + message=FeatureRegistrySource, + ) + vertex_rag_source: VertexRagSource = proto.Field( + proto.MESSAGE, + number=18, + oneof="source", + message=VertexRagSource, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=4, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=5, + ) + sync_config: SyncConfig = proto.Field( + proto.MESSAGE, + number=7, + message=SyncConfig, + ) + index_config: IndexConfig = proto.Field( + proto.MESSAGE, + number=15, + message=IndexConfig, + ) + optimized_config: OptimizedConfig = proto.Field( + proto.MESSAGE, + number=16, + message=OptimizedConfig, + ) + service_agent_type: ServiceAgentType = proto.Field( + proto.ENUM, + number=14, + enum=ServiceAgentType, + ) + service_account_email: str = proto.Field( + proto.STRING, + number=13, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=19, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=20, + ) + bigtable_metadata: BigtableMetadata = proto.Field( + proto.MESSAGE, + number=22, + message=BigtableMetadata, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore.py new file mode 100644 index 0000000000000000000000000000000000000000..e7313c4a9575e1a3abf244aa0ef7d1b3cd134724 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore.py @@ -0,0 +1,248 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Featurestore", + }, +) + + +class Featurestore(proto.Message): + r"""Vertex AI Feature Store provides a centralized repository for + organizing, storing, and serving ML features. The Featurestore + is a top-level container for your features and their values. + + Attributes: + name (str): + Output only. Name of the Featurestore. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Featurestore + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Featurestore + was last updated. + etag (str): + Optional. Used to perform consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata to organize your Featurestore. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + on and examples of labels. No more than 64 user + labels can be associated with one + Featurestore(System labels are excluded)." + System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + online_serving_config (google.cloud.aiplatform_v1.types.Featurestore.OnlineServingConfig): + Optional. Config for online storage resources. The field + should not co-exist with the field of + ``OnlineStoreReplicationConfig``. If both of it and + OnlineStoreReplicationConfig are unset, the feature store + will not have an online store and cannot be used for online + serving. + state (google.cloud.aiplatform_v1.types.Featurestore.State): + Output only. State of the featurestore. + online_storage_ttl_days (int): + Optional. TTL in days for feature values that will be stored + in online serving storage. The Feature Store online storage + periodically removes obsolete feature values older than + ``online_storage_ttl_days`` since the feature generation + time. Note that ``online_storage_ttl_days`` should be less + than or equal to ``offline_storage_ttl_days`` for each + EntityType under a featurestore. If not set, default to 4000 + days + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Optional. Customer-managed encryption key + spec for data storage. If set, both of the + online and offline data storage will be secured + by this key. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class State(proto.Enum): + r"""Possible states a featurestore can have. + + Values: + STATE_UNSPECIFIED (0): + Default value. This value is unused. + STABLE (1): + State when the featurestore configuration is + not being updated and the fields reflect the + current configuration of the featurestore. The + featurestore is usable in this state. + UPDATING (2): + The state of the featurestore configuration when it is being + updated. During an update, the fields reflect either the + original configuration or the updated configuration of the + featurestore. For example, + ``online_serving_config.fixed_node_count`` can take minutes + to update. While the update is in progress, the featurestore + is in the UPDATING state, and the value of + ``fixed_node_count`` can be the original value or the + updated value, depending on the progress of the operation. + Until the update completes, the actual number of nodes can + still be the original value of ``fixed_node_count``. The + featurestore is still usable in this state. + """ + + STATE_UNSPECIFIED = 0 + STABLE = 1 + UPDATING = 2 + + class OnlineServingConfig(proto.Message): + r"""OnlineServingConfig specifies the details for provisioning + online serving resources. + + Attributes: + fixed_node_count (int): + The number of nodes for the online store. The + number of nodes doesn't scale automatically, but + you can manually update the number of nodes. If + set to 0, the featurestore will not have an + online store and cannot be used for online + serving. + scaling (google.cloud.aiplatform_v1.types.Featurestore.OnlineServingConfig.Scaling): + Online serving scaling configuration. Only one of + ``fixed_node_count`` and ``scaling`` can be set. Setting one + will reset the other. + """ + + class Scaling(proto.Message): + r"""Online serving scaling configuration. If min_node_count and + max_node_count are set to the same value, the cluster will be + configured with the fixed number of node (no auto-scaling). + + Attributes: + min_node_count (int): + Required. The minimum number of nodes to + scale down to. Must be greater than or equal to + 1. + max_node_count (int): + The maximum number of nodes to scale up to. Must be greater + than min_node_count, and less than or equal to 10 times of + 'min_node_count'. + cpu_utilization_target (int): + Optional. The cpu utilization that the + Autoscaler should be trying to achieve. This + number is on a scale from 0 (no utilization) to + 100 (total utilization), and is limited between + 10 and 80. When a cluster's CPU utilization + exceeds the target that you have set, Bigtable + immediately adds nodes to the cluster. When CPU + utilization is substantially lower than the + target, Bigtable removes nodes. If not set or + set to 0, default to 50. + """ + + min_node_count: int = proto.Field( + proto.INT32, + number=1, + ) + max_node_count: int = proto.Field( + proto.INT32, + number=2, + ) + cpu_utilization_target: int = proto.Field( + proto.INT32, + number=3, + ) + + fixed_node_count: int = proto.Field( + proto.INT32, + number=2, + ) + scaling: "Featurestore.OnlineServingConfig.Scaling" = proto.Field( + proto.MESSAGE, + number=4, + message="Featurestore.OnlineServingConfig.Scaling", + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=5, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + online_serving_config: OnlineServingConfig = proto.Field( + proto.MESSAGE, + number=7, + message=OnlineServingConfig, + ) + state: State = proto.Field( + proto.ENUM, + number=8, + enum=State, + ) + online_storage_ttl_days: int = proto.Field( + proto.INT32, + number=13, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=10, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=14, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=15, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_online_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_online_service.py new file mode 100644 index 0000000000000000000000000000000000000000..94e6eb94843c35534db4a0618b3ea0000ac13470 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_online_service.py @@ -0,0 +1,502 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import feature_selector as gca_feature_selector +from google.cloud.aiplatform_v1.types import types +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "WriteFeatureValuesRequest", + "WriteFeatureValuesPayload", + "WriteFeatureValuesResponse", + "ReadFeatureValuesRequest", + "ReadFeatureValuesResponse", + "StreamingReadFeatureValuesRequest", + "FeatureValue", + "StructValue", + "StructFieldValue", + "FeatureValueList", + }, +) + + +class WriteFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreOnlineServingService.WriteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues]. + + Attributes: + entity_type (str): + Required. The resource name of the EntityType for the + entities being written. Value format: + ``projects/{project}/locations/{location}/featurestores/ {featurestore}/entityTypes/{entityType}``. + For example, for a machine learning model predicting user + clicks on a website, an EntityType ID could be ``user``. + payloads (MutableSequence[google.cloud.aiplatform_v1.types.WriteFeatureValuesPayload]): + Required. The entities to be written. Up to 100,000 feature + values can be written across all ``payloads``. + """ + + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + payloads: MutableSequence["WriteFeatureValuesPayload"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="WriteFeatureValuesPayload", + ) + + +class WriteFeatureValuesPayload(proto.Message): + r"""Contains Feature values to be written for a specific entity. + + Attributes: + entity_id (str): + Required. The ID of the entity. + feature_values (MutableMapping[str, google.cloud.aiplatform_v1.types.FeatureValue]): + Required. Feature values to be written, mapping from Feature + ID to value. Up to 100,000 ``feature_values`` entries may be + written across all payloads. The feature generation time, + aligned by days, must be no older than five years (1825 + days) and no later than one year (366 days) in the future. + """ + + entity_id: str = proto.Field( + proto.STRING, + number=1, + ) + feature_values: MutableMapping[str, "FeatureValue"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=2, + message="FeatureValue", + ) + + +class WriteFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreOnlineServingService.WriteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.WriteFeatureValues]. + + """ + + +class ReadFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreOnlineServingService.ReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues]. + + Attributes: + entity_type (str): + Required. The resource name of the EntityType for the entity + being read. Value format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}``. + For example, for a machine learning model predicting user + clicks on a website, an EntityType ID could be ``user``. + entity_id (str): + Required. ID for a specific entity. For example, for a + machine learning model predicting user clicks on a website, + an entity ID could be ``user_123``. + feature_selector (google.cloud.aiplatform_v1.types.FeatureSelector): + Required. Selector choosing Features of the + target EntityType. + """ + + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + entity_id: str = proto.Field( + proto.STRING, + number=2, + ) + feature_selector: gca_feature_selector.FeatureSelector = proto.Field( + proto.MESSAGE, + number=3, + message=gca_feature_selector.FeatureSelector, + ) + + +class ReadFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreOnlineServingService.ReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.ReadFeatureValues]. + + Attributes: + header (google.cloud.aiplatform_v1.types.ReadFeatureValuesResponse.Header): + Response header. + entity_view (google.cloud.aiplatform_v1.types.ReadFeatureValuesResponse.EntityView): + Entity view with Feature values. This may be + the entity in the Featurestore if values for all + Features were requested, or a projection of the + entity in the Featurestore if values for only + some Features were requested. + """ + + class FeatureDescriptor(proto.Message): + r"""Metadata for requested Features. + + Attributes: + id (str): + Feature ID. + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + + class Header(proto.Message): + r"""Response header with metadata for the requested + [ReadFeatureValuesRequest.entity_type][google.cloud.aiplatform.v1.ReadFeatureValuesRequest.entity_type] + and Features. + + Attributes: + entity_type (str): + The resource name of the EntityType from the + [ReadFeatureValuesRequest][google.cloud.aiplatform.v1.ReadFeatureValuesRequest]. + Value format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}``. + feature_descriptors (MutableSequence[google.cloud.aiplatform_v1.types.ReadFeatureValuesResponse.FeatureDescriptor]): + List of Feature metadata corresponding to each piece of + [ReadFeatureValuesResponse.EntityView.data][google.cloud.aiplatform.v1.ReadFeatureValuesResponse.EntityView.data]. + """ + + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + feature_descriptors: MutableSequence[ + "ReadFeatureValuesResponse.FeatureDescriptor" + ] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ReadFeatureValuesResponse.FeatureDescriptor", + ) + + class EntityView(proto.Message): + r"""Entity view with Feature values. + + Attributes: + entity_id (str): + ID of the requested entity. + data (MutableSequence[google.cloud.aiplatform_v1.types.ReadFeatureValuesResponse.EntityView.Data]): + Each piece of data holds the k requested values for one + requested Feature. If no values for the requested Feature + exist, the corresponding cell will be empty. This has the + same size and is in the same order as the features from the + header + [ReadFeatureValuesResponse.header][google.cloud.aiplatform.v1.ReadFeatureValuesResponse.header]. + """ + + class Data(proto.Message): + r"""Container to hold value(s), successive in time, for one + Feature from the request. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + value (google.cloud.aiplatform_v1.types.FeatureValue): + Feature value if a single value is requested. + + This field is a member of `oneof`_ ``data``. + values (google.cloud.aiplatform_v1.types.FeatureValueList): + Feature values list if values, successive in + time, are requested. If the requested number of + values is greater than the number of existing + Feature values, nonexistent values are omitted + instead of being returned as empty. + + This field is a member of `oneof`_ ``data``. + """ + + value: "FeatureValue" = proto.Field( + proto.MESSAGE, + number=1, + oneof="data", + message="FeatureValue", + ) + values: "FeatureValueList" = proto.Field( + proto.MESSAGE, + number=2, + oneof="data", + message="FeatureValueList", + ) + + entity_id: str = proto.Field( + proto.STRING, + number=1, + ) + data: MutableSequence["ReadFeatureValuesResponse.EntityView.Data"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=2, + message="ReadFeatureValuesResponse.EntityView.Data", + ) + ) + + header: Header = proto.Field( + proto.MESSAGE, + number=1, + message=Header, + ) + entity_view: EntityView = proto.Field( + proto.MESSAGE, + number=2, + message=EntityView, + ) + + +class StreamingReadFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreOnlineServingService.StreamingReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreOnlineServingService.StreamingReadFeatureValues]. + + Attributes: + entity_type (str): + Required. The resource name of the entities' type. Value + format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}``. + For example, for a machine learning model predicting user + clicks on a website, an EntityType ID could be ``user``. + entity_ids (MutableSequence[str]): + Required. IDs of entities to read Feature values of. The + maximum number of IDs is 100. For example, for a machine + learning model predicting user clicks on a website, an + entity ID could be ``user_123``. + feature_selector (google.cloud.aiplatform_v1.types.FeatureSelector): + Required. Selector choosing Features of the + target EntityType. Feature IDs will be + deduplicated. + """ + + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + entity_ids: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + feature_selector: gca_feature_selector.FeatureSelector = proto.Field( + proto.MESSAGE, + number=3, + message=gca_feature_selector.FeatureSelector, + ) + + +class FeatureValue(proto.Message): + r"""Value for a feature. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bool_value (bool): + Bool type feature value. + + This field is a member of `oneof`_ ``value``. + double_value (float): + Double type feature value. + + This field is a member of `oneof`_ ``value``. + int64_value (int): + Int64 feature value. + + This field is a member of `oneof`_ ``value``. + string_value (str): + String feature value. + + This field is a member of `oneof`_ ``value``. + bool_array_value (google.cloud.aiplatform_v1.types.BoolArray): + A list of bool type feature value. + + This field is a member of `oneof`_ ``value``. + double_array_value (google.cloud.aiplatform_v1.types.DoubleArray): + A list of double type feature value. + + This field is a member of `oneof`_ ``value``. + int64_array_value (google.cloud.aiplatform_v1.types.Int64Array): + A list of int64 type feature value. + + This field is a member of `oneof`_ ``value``. + string_array_value (google.cloud.aiplatform_v1.types.StringArray): + A list of string type feature value. + + This field is a member of `oneof`_ ``value``. + bytes_value (bytes): + Bytes feature value. + + This field is a member of `oneof`_ ``value``. + struct_value (google.cloud.aiplatform_v1.types.StructValue): + A struct type feature value. + + This field is a member of `oneof`_ ``value``. + metadata (google.cloud.aiplatform_v1.types.FeatureValue.Metadata): + Metadata of feature value. + """ + + class Metadata(proto.Message): + r"""Metadata of feature value. + + Attributes: + generate_time (google.protobuf.timestamp_pb2.Timestamp): + Feature generation timestamp. Typically, it + is provided by user at feature ingestion time. + If not, feature store will use the system + timestamp when the data is ingested into feature + store. + + Legacy Feature Store: For streaming ingestion, + the time, aligned by days, must be no older than + five years (1825 days) and no later than one + year (366 days) in the future. + """ + + generate_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + + bool_value: bool = proto.Field( + proto.BOOL, + number=1, + oneof="value", + ) + double_value: float = proto.Field( + proto.DOUBLE, + number=2, + oneof="value", + ) + int64_value: int = proto.Field( + proto.INT64, + number=5, + oneof="value", + ) + string_value: str = proto.Field( + proto.STRING, + number=6, + oneof="value", + ) + bool_array_value: types.BoolArray = proto.Field( + proto.MESSAGE, + number=7, + oneof="value", + message=types.BoolArray, + ) + double_array_value: types.DoubleArray = proto.Field( + proto.MESSAGE, + number=8, + oneof="value", + message=types.DoubleArray, + ) + int64_array_value: types.Int64Array = proto.Field( + proto.MESSAGE, + number=11, + oneof="value", + message=types.Int64Array, + ) + string_array_value: types.StringArray = proto.Field( + proto.MESSAGE, + number=12, + oneof="value", + message=types.StringArray, + ) + bytes_value: bytes = proto.Field( + proto.BYTES, + number=13, + oneof="value", + ) + struct_value: "StructValue" = proto.Field( + proto.MESSAGE, + number=15, + oneof="value", + message="StructValue", + ) + metadata: Metadata = proto.Field( + proto.MESSAGE, + number=14, + message=Metadata, + ) + + +class StructValue(proto.Message): + r"""Struct (or object) type feature value. + + Attributes: + values (MutableSequence[google.cloud.aiplatform_v1.types.StructFieldValue]): + A list of field values. + """ + + values: MutableSequence["StructFieldValue"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="StructFieldValue", + ) + + +class StructFieldValue(proto.Message): + r"""One field of a Struct (or object) type feature value. + + Attributes: + name (str): + Name of the field in the struct feature. + value (google.cloud.aiplatform_v1.types.FeatureValue): + The value for this field. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + value: "FeatureValue" = proto.Field( + proto.MESSAGE, + number=2, + message="FeatureValue", + ) + + +class FeatureValueList(proto.Message): + r"""Container for list of values. + + Attributes: + values (MutableSequence[google.cloud.aiplatform_v1.types.FeatureValue]): + A list of feature values. All of them should + be the same data type. + """ + + values: MutableSequence["FeatureValue"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="FeatureValue", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_service.py new file mode 100644 index 0000000000000000000000000000000000000000..6bcf06d1e144f33b732f9beff2d7b6800e42eaaf --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/featurestore_service.py @@ -0,0 +1,1992 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import entity_type as gca_entity_type +from google.cloud.aiplatform_v1.types import feature as gca_feature +from google.cloud.aiplatform_v1.types import feature_selector as gca_feature_selector +from google.cloud.aiplatform_v1.types import featurestore as gca_featurestore +from google.cloud.aiplatform_v1.types import io +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.type.interval_pb2 as interval_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateFeaturestoreRequest", + "GetFeaturestoreRequest", + "ListFeaturestoresRequest", + "ListFeaturestoresResponse", + "UpdateFeaturestoreRequest", + "DeleteFeaturestoreRequest", + "ImportFeatureValuesRequest", + "ImportFeatureValuesResponse", + "BatchReadFeatureValuesRequest", + "ExportFeatureValuesRequest", + "DestinationFeatureSetting", + "FeatureValueDestination", + "ExportFeatureValuesResponse", + "BatchReadFeatureValuesResponse", + "CreateEntityTypeRequest", + "GetEntityTypeRequest", + "ListEntityTypesRequest", + "ListEntityTypesResponse", + "UpdateEntityTypeRequest", + "DeleteEntityTypeRequest", + "CreateFeatureRequest", + "BatchCreateFeaturesRequest", + "BatchCreateFeaturesResponse", + "GetFeatureRequest", + "ListFeaturesRequest", + "ListFeaturesResponse", + "SearchFeaturesRequest", + "SearchFeaturesResponse", + "UpdateFeatureRequest", + "DeleteFeatureRequest", + "CreateFeaturestoreOperationMetadata", + "UpdateFeaturestoreOperationMetadata", + "ImportFeatureValuesOperationMetadata", + "ExportFeatureValuesOperationMetadata", + "BatchReadFeatureValuesOperationMetadata", + "DeleteFeatureValuesOperationMetadata", + "CreateEntityTypeOperationMetadata", + "CreateFeatureOperationMetadata", + "BatchCreateFeaturesOperationMetadata", + "DeleteFeatureValuesRequest", + "DeleteFeatureValuesResponse", + "EntityIdSelector", + }, +) + + +class CreateFeaturestoreRequest(proto.Message): + r"""Request message for + [FeaturestoreService.CreateFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeaturestore]. + + Attributes: + parent (str): + Required. The resource name of the Location to create + Featurestores. Format: + ``projects/{project}/locations/{location}`` + featurestore (google.cloud.aiplatform_v1.types.Featurestore): + Required. The Featurestore to create. + featurestore_id (str): + Required. The ID to use for this Featurestore, which will + become the final component of the Featurestore's resource + name. + + This value may be up to 60 characters, and valid characters + are ``[a-z0-9_]``. The first character cannot be a number. + + The value must be unique within the project and location. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + featurestore: gca_featurestore.Featurestore = proto.Field( + proto.MESSAGE, + number=2, + message=gca_featurestore.Featurestore, + ) + featurestore_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetFeaturestoreRequest(proto.Message): + r"""Request message for + [FeaturestoreService.GetFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.GetFeaturestore]. + + Attributes: + name (str): + Required. The name of the Featurestore + resource. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListFeaturestoresRequest(proto.Message): + r"""Request message for + [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]. + + Attributes: + parent (str): + Required. The resource name of the Location to list + Featurestores. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Lists the featurestores that match the filter expression. + The following fields are supported: + + - ``create_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``update_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``online_serving_config.fixed_node_count``: Supports + ``=``, ``!=``, ``<``, ``>``, ``<=``, and ``>=`` + comparisons. + - ``labels``: Supports key-value equality and key presence. + + Examples: + + - ``create_time > "2020-01-01" OR update_time > "2020-01-01"`` + Featurestores created or updated after 2020-01-01. + - ``labels.env = "prod"`` Featurestores with label "env" set + to "prod". + page_size (int): + The maximum number of Featurestores to + return. The service may return fewer than this + value. If unspecified, at most 100 Featurestores + will be returned. The maximum value is 100; any + value greater than 100 will be coerced to 100. + page_token (str): + A page token, received from a previous + [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores] + call. Provide this to retrieve the subsequent page. + + When paginating, all other parameters provided to + [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores] + must match the call that provided the page token. + order_by (str): + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported Fields: + + - ``create_time`` + - ``update_time`` + - ``online_serving_config.fixed_node_count`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=6, + message=field_mask_pb2.FieldMask, + ) + + +class ListFeaturestoresResponse(proto.Message): + r"""Response message for + [FeaturestoreService.ListFeaturestores][google.cloud.aiplatform.v1.FeaturestoreService.ListFeaturestores]. + + Attributes: + featurestores (MutableSequence[google.cloud.aiplatform_v1.types.Featurestore]): + The Featurestores matching the request. + next_page_token (str): + A token, which can be sent as + [ListFeaturestoresRequest.page_token][google.cloud.aiplatform.v1.ListFeaturestoresRequest.page_token] + to retrieve the next page. If this field is omitted, there + are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + featurestores: MutableSequence[gca_featurestore.Featurestore] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_featurestore.Featurestore, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateFeaturestoreRequest(proto.Message): + r"""Request message for + [FeaturestoreService.UpdateFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeaturestore]. + + Attributes: + featurestore (google.cloud.aiplatform_v1.types.Featurestore): + Required. The Featurestore's ``name`` field is used to + identify the Featurestore to be updated. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Field mask is used to specify the fields to be overwritten + in the Featurestore resource by the update. The fields + specified in the update_mask are relative to the resource, + not the full request. A field will be overwritten if it is + in the mask. If the user does not provide a mask then only + the non-empty fields present in the request will be + overwritten. Set the update_mask to ``*`` to override all + fields. + + Updatable fields: + + - ``labels`` + - ``online_serving_config.fixed_node_count`` + - ``online_serving_config.scaling`` + - ``online_storage_ttl_days`` + """ + + featurestore: gca_featurestore.Featurestore = proto.Field( + proto.MESSAGE, + number=1, + message=gca_featurestore.Featurestore, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteFeaturestoreRequest(proto.Message): + r"""Request message for + [FeaturestoreService.DeleteFeaturestore][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeaturestore]. + + Attributes: + name (str): + Required. The name of the Featurestore to be deleted. + Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + force (bool): + If set to true, any EntityTypes and Features + for this Featurestore will also be deleted. + (Otherwise, the request will only work if the + Featurestore has no EntityTypes.) + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class ImportFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + avro_source (google.cloud.aiplatform_v1.types.AvroSource): + + This field is a member of `oneof`_ ``source``. + bigquery_source (google.cloud.aiplatform_v1.types.BigQuerySource): + + This field is a member of `oneof`_ ``source``. + csv_source (google.cloud.aiplatform_v1.types.CsvSource): + + This field is a member of `oneof`_ ``source``. + feature_time_field (str): + Source column that holds the Feature + timestamp for all Feature values in each entity. + + This field is a member of `oneof`_ ``feature_time_source``. + feature_time (google.protobuf.timestamp_pb2.Timestamp): + Single Feature timestamp for all entities + being imported. The timestamp must not have + higher than millisecond precision. + + This field is a member of `oneof`_ ``feature_time_source``. + entity_type (str): + Required. The resource name of the EntityType grouping the + Features for which values are being imported. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`` + entity_id_field (str): + Source column that holds entity IDs. If not provided, entity + IDs are extracted from the column named entity_id. + feature_specs (MutableSequence[google.cloud.aiplatform_v1.types.ImportFeatureValuesRequest.FeatureSpec]): + Required. Specifications defining which Feature values to + import from the entity. The request fails if no + feature_specs are provided, and having multiple + feature_specs for one Feature is not allowed. + disable_online_serving (bool): + If set, data will not be imported for online + serving. This is typically used for backfilling, + where Feature generation timestamps are not in + the timestamp range needed for online serving. + worker_count (int): + Specifies the number of workers that are used + to write data to the Featurestore. Consider the + online serving capacity that you require to + achieve the desired import throughput without + interfering with online serving. The value must + be positive, and less than or equal to 100. If + not set, defaults to using 1 worker. The low + count ensures minimal impact on online serving + performance. + disable_ingestion_analysis (bool): + If true, API doesn't start ingestion analysis + pipeline. + """ + + class FeatureSpec(proto.Message): + r"""Defines the Feature value(s) to import. + + Attributes: + id (str): + Required. ID of the Feature to import values + of. This Feature must exist in the target + EntityType, or the request will fail. + source_field (str): + Source column to get the Feature values from. + If not set, uses the column with the same name + as the Feature ID. + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + source_field: str = proto.Field( + proto.STRING, + number=2, + ) + + avro_source: io.AvroSource = proto.Field( + proto.MESSAGE, + number=2, + oneof="source", + message=io.AvroSource, + ) + bigquery_source: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=3, + oneof="source", + message=io.BigQuerySource, + ) + csv_source: io.CsvSource = proto.Field( + proto.MESSAGE, + number=4, + oneof="source", + message=io.CsvSource, + ) + feature_time_field: str = proto.Field( + proto.STRING, + number=6, + oneof="feature_time_source", + ) + feature_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + oneof="feature_time_source", + message=timestamp_pb2.Timestamp, + ) + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + entity_id_field: str = proto.Field( + proto.STRING, + number=5, + ) + feature_specs: MutableSequence[FeatureSpec] = proto.RepeatedField( + proto.MESSAGE, + number=8, + message=FeatureSpec, + ) + disable_online_serving: bool = proto.Field( + proto.BOOL, + number=9, + ) + worker_count: int = proto.Field( + proto.INT32, + number=11, + ) + disable_ingestion_analysis: bool = proto.Field( + proto.BOOL, + number=12, + ) + + +class ImportFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.ImportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ImportFeatureValues]. + + Attributes: + imported_entity_count (int): + Number of entities that have been imported by + the operation. + imported_feature_value_count (int): + Number of Feature values that have been + imported by the operation. + invalid_row_count (int): + The number of rows in input source that weren't imported due + to either + + - Not having any featureValues. + - Having a null entityId. + - Having a null timestamp. + - Not being parsable (applicable for CSV sources). + timestamp_outside_retention_rows_count (int): + The number rows that weren't ingested due to + having feature timestamps outside the retention + boundary. + """ + + imported_entity_count: int = proto.Field( + proto.INT64, + number=1, + ) + imported_feature_value_count: int = proto.Field( + proto.INT64, + number=2, + ) + invalid_row_count: int = proto.Field( + proto.INT64, + number=6, + ) + timestamp_outside_retention_rows_count: int = proto.Field( + proto.INT64, + number=4, + ) + + +class BatchReadFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + csv_read_instances (google.cloud.aiplatform_v1.types.CsvSource): + Each read instance consists of exactly one read timestamp + and one or more entity IDs identifying entities of the + corresponding EntityTypes whose Features are requested. + + Each output instance contains Feature values of requested + entities concatenated together as of the read time. + + An example read instance may be + ``foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z``. + + An example output instance may be + ``foo_entity_id, bar_entity_id, 2020-01-01T10:00:00.123Z, foo_entity_feature1_value, bar_entity_feature2_value``. + + Timestamp in each read instance must be millisecond-aligned. + + ``csv_read_instances`` are read instances stored in a + plain-text CSV file. The header should be: + [ENTITY_TYPE_ID1], [ENTITY_TYPE_ID2], ..., timestamp + + The columns can be in any order. + + Values in the timestamp column must use the RFC 3339 format, + e.g. ``2012-07-30T10:43:17.123Z``. + + This field is a member of `oneof`_ ``read_option``. + bigquery_read_instances (google.cloud.aiplatform_v1.types.BigQuerySource): + Similar to csv_read_instances, but from BigQuery source. + + This field is a member of `oneof`_ ``read_option``. + featurestore (str): + Required. The resource name of the Featurestore from which + to query Feature values. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + destination (google.cloud.aiplatform_v1.types.FeatureValueDestination): + Required. Specifies output location and + format. + pass_through_fields (MutableSequence[google.cloud.aiplatform_v1.types.BatchReadFeatureValuesRequest.PassThroughField]): + When not empty, the specified fields in the + \*_read_instances source will be joined as-is in the output, + in addition to those fields from the Featurestore Entity. + + For BigQuery source, the type of the pass-through values + will be automatically inferred. For CSV source, the + pass-through values will be passed as opaque bytes. + entity_type_specs (MutableSequence[google.cloud.aiplatform_v1.types.BatchReadFeatureValuesRequest.EntityTypeSpec]): + Required. Specifies EntityType grouping + Features to read values of and settings. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. Excludes Feature values with + feature generation timestamp before this + timestamp. If not set, retrieve oldest values + kept in Feature Store. Timestamp, if present, + must not have higher than millisecond precision. + """ + + class PassThroughField(proto.Message): + r"""Describe pass-through fields in read_instance source. + + Attributes: + field_name (str): + Required. The name of the field in the CSV header or the + name of the column in BigQuery table. The naming restriction + is the same as + [Feature.name][google.cloud.aiplatform.v1.Feature.name]. + """ + + field_name: str = proto.Field( + proto.STRING, + number=1, + ) + + class EntityTypeSpec(proto.Message): + r"""Selects Features of an EntityType to read values of and + specifies read settings. + + Attributes: + entity_type_id (str): + Required. ID of the EntityType to select Features. The + EntityType id is the + [entity_type_id][google.cloud.aiplatform.v1.CreateEntityTypeRequest.entity_type_id] + specified during EntityType creation. + feature_selector (google.cloud.aiplatform_v1.types.FeatureSelector): + Required. Selectors choosing which Feature + values to read from the EntityType. + settings (MutableSequence[google.cloud.aiplatform_v1.types.DestinationFeatureSetting]): + Per-Feature settings for the batch read. + """ + + entity_type_id: str = proto.Field( + proto.STRING, + number=1, + ) + feature_selector: gca_feature_selector.FeatureSelector = proto.Field( + proto.MESSAGE, + number=2, + message=gca_feature_selector.FeatureSelector, + ) + settings: MutableSequence["DestinationFeatureSetting"] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="DestinationFeatureSetting", + ) + + csv_read_instances: io.CsvSource = proto.Field( + proto.MESSAGE, + number=3, + oneof="read_option", + message=io.CsvSource, + ) + bigquery_read_instances: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=5, + oneof="read_option", + message=io.BigQuerySource, + ) + featurestore: str = proto.Field( + proto.STRING, + number=1, + ) + destination: "FeatureValueDestination" = proto.Field( + proto.MESSAGE, + number=4, + message="FeatureValueDestination", + ) + pass_through_fields: MutableSequence[PassThroughField] = proto.RepeatedField( + proto.MESSAGE, + number=8, + message=PassThroughField, + ) + entity_type_specs: MutableSequence[EntityTypeSpec] = proto.RepeatedField( + proto.MESSAGE, + number=7, + message=EntityTypeSpec, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + + +class ExportFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + snapshot_export (google.cloud.aiplatform_v1.types.ExportFeatureValuesRequest.SnapshotExport): + Exports the latest Feature values of all + entities of the EntityType within a time range. + + This field is a member of `oneof`_ ``mode``. + full_export (google.cloud.aiplatform_v1.types.ExportFeatureValuesRequest.FullExport): + Exports all historical values of all entities + of the EntityType within a time range + + This field is a member of `oneof`_ ``mode``. + entity_type (str): + Required. The resource name of the EntityType from which to + export Feature values. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + destination (google.cloud.aiplatform_v1.types.FeatureValueDestination): + Required. Specifies destination location and + format. + feature_selector (google.cloud.aiplatform_v1.types.FeatureSelector): + Required. Selects Features to export values + of. + settings (MutableSequence[google.cloud.aiplatform_v1.types.DestinationFeatureSetting]): + Per-Feature export settings. + """ + + class SnapshotExport(proto.Message): + r"""Describes exporting the latest Feature values of all entities of the + EntityType between [start_time, snapshot_time]. + + Attributes: + snapshot_time (google.protobuf.timestamp_pb2.Timestamp): + Exports Feature values as of this timestamp. + If not set, retrieve values as of now. + Timestamp, if present, must not have higher than + millisecond precision. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Excludes Feature values with feature + generation timestamp before this timestamp. If + not set, retrieve oldest values kept in Feature + Store. Timestamp, if present, must not have + higher than millisecond precision. + """ + + snapshot_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + + class FullExport(proto.Message): + r"""Describes exporting all historical Feature values of all entities of + the EntityType between [start_time, end_time]. + + Attributes: + start_time (google.protobuf.timestamp_pb2.Timestamp): + Excludes Feature values with feature + generation timestamp before this timestamp. If + not set, retrieve oldest values kept in Feature + Store. Timestamp, if present, must not have + higher than millisecond precision. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Exports Feature values as of this timestamp. + If not set, retrieve values as of now. + Timestamp, if present, must not have higher than + millisecond precision. + """ + + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + + snapshot_export: SnapshotExport = proto.Field( + proto.MESSAGE, + number=3, + oneof="mode", + message=SnapshotExport, + ) + full_export: FullExport = proto.Field( + proto.MESSAGE, + number=7, + oneof="mode", + message=FullExport, + ) + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + destination: "FeatureValueDestination" = proto.Field( + proto.MESSAGE, + number=4, + message="FeatureValueDestination", + ) + feature_selector: gca_feature_selector.FeatureSelector = proto.Field( + proto.MESSAGE, + number=5, + message=gca_feature_selector.FeatureSelector, + ) + settings: MutableSequence["DestinationFeatureSetting"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="DestinationFeatureSetting", + ) + + +class DestinationFeatureSetting(proto.Message): + r""" + + Attributes: + feature_id (str): + Required. The ID of the Feature to apply the + setting to. + destination_field (str): + Specify the field name in the export + destination. If not specified, Feature ID is + used. + """ + + feature_id: str = proto.Field( + proto.STRING, + number=1, + ) + destination_field: str = proto.Field( + proto.STRING, + number=2, + ) + + +class FeatureValueDestination(proto.Message): + r"""A destination location for Feature values and format. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + bigquery_destination (google.cloud.aiplatform_v1.types.BigQueryDestination): + Output in BigQuery format. + [BigQueryDestination.output_uri][google.cloud.aiplatform.v1.BigQueryDestination.output_uri] + in + [FeatureValueDestination.bigquery_destination][google.cloud.aiplatform.v1.FeatureValueDestination.bigquery_destination] + must refer to a table. + + This field is a member of `oneof`_ ``destination``. + tfrecord_destination (google.cloud.aiplatform_v1.types.TFRecordDestination): + Output in TFRecord format. + + Below are the mapping from Feature value type in + Featurestore to Feature value type in TFRecord: + + :: + + Value type in Featurestore | Value type in TFRecord + DOUBLE, DOUBLE_ARRAY | FLOAT_LIST + INT64, INT64_ARRAY | INT64_LIST + STRING, STRING_ARRAY, BYTES | BYTES_LIST + true -> byte_string("true"), false -> byte_string("false") + BOOL, BOOL_ARRAY (true, false) | BYTES_LIST + + This field is a member of `oneof`_ ``destination``. + csv_destination (google.cloud.aiplatform_v1.types.CsvDestination): + Output in CSV format. Array Feature value + types are not allowed in CSV format. + + This field is a member of `oneof`_ ``destination``. + """ + + bigquery_destination: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=1, + oneof="destination", + message=io.BigQueryDestination, + ) + tfrecord_destination: io.TFRecordDestination = proto.Field( + proto.MESSAGE, + number=2, + oneof="destination", + message=io.TFRecordDestination, + ) + csv_destination: io.CsvDestination = proto.Field( + proto.MESSAGE, + number=3, + oneof="destination", + message=io.CsvDestination, + ) + + +class ExportFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.ExportFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.ExportFeatureValues]. + + """ + + +class BatchReadFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.BatchReadFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.BatchReadFeatureValues]. + + """ + + +class CreateEntityTypeRequest(proto.Message): + r"""Request message for + [FeaturestoreService.CreateEntityType][google.cloud.aiplatform.v1.FeaturestoreService.CreateEntityType]. + + Attributes: + parent (str): + Required. The resource name of the Featurestore to create + EntityTypes. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + entity_type (google.cloud.aiplatform_v1.types.EntityType): + The EntityType to create. + entity_type_id (str): + Required. The ID to use for the EntityType, which will + become the final component of the EntityType's resource + name. + + This value may be up to 60 characters, and valid characters + are ``[a-z0-9_]``. The first character cannot be a number. + + The value must be unique within a featurestore. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + entity_type: gca_entity_type.EntityType = proto.Field( + proto.MESSAGE, + number=2, + message=gca_entity_type.EntityType, + ) + entity_type_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetEntityTypeRequest(proto.Message): + r"""Request message for + [FeaturestoreService.GetEntityType][google.cloud.aiplatform.v1.FeaturestoreService.GetEntityType]. + + Attributes: + name (str): + Required. The name of the EntityType resource. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListEntityTypesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]. + + Attributes: + parent (str): + Required. The resource name of the Featurestore to list + EntityTypes. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}`` + filter (str): + Lists the EntityTypes that match the filter expression. The + following filters are supported: + + - ``create_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``>=``, and ``<=`` comparisons. Values must be in RFC 3339 + format. + - ``update_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``>=``, and ``<=`` comparisons. Values must be in RFC 3339 + format. + - ``labels``: Supports key-value equality as well as key + presence. + + Examples: + + - ``create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > \"2020-01-31T15:30:00.000000Z\"`` + --> EntityTypes created or updated after + 2020-01-31T15:30:00.000000Z. + - ``labels.active = yes AND labels.env = prod`` --> + EntityTypes having both (active: yes) and (env: prod) + labels. + - ``labels.env: *`` --> Any EntityType which has a label + with 'env' as the key. + page_size (int): + The maximum number of EntityTypes to return. + The service may return fewer than this value. If + unspecified, at most 1000 EntityTypes will be + returned. The maximum value is 1000; any value + greater than 1000 will be coerced to 1000. + page_token (str): + A page token, received from a previous + [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes] + call. Provide this to retrieve the subsequent page. + + When paginating, all other parameters provided to + [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes] + must match the call that provided the page token. + order_by (str): + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. + + Supported fields: + + - ``entity_type_id`` + - ``create_time`` + - ``update_time`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=6, + message=field_mask_pb2.FieldMask, + ) + + +class ListEntityTypesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.ListEntityTypes][google.cloud.aiplatform.v1.FeaturestoreService.ListEntityTypes]. + + Attributes: + entity_types (MutableSequence[google.cloud.aiplatform_v1.types.EntityType]): + The EntityTypes matching the request. + next_page_token (str): + A token, which can be sent as + [ListEntityTypesRequest.page_token][google.cloud.aiplatform.v1.ListEntityTypesRequest.page_token] + to retrieve the next page. If this field is omitted, there + are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + entity_types: MutableSequence[gca_entity_type.EntityType] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_entity_type.EntityType, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateEntityTypeRequest(proto.Message): + r"""Request message for + [FeaturestoreService.UpdateEntityType][google.cloud.aiplatform.v1.FeaturestoreService.UpdateEntityType]. + + Attributes: + entity_type (google.cloud.aiplatform_v1.types.EntityType): + Required. The EntityType's ``name`` field is used to + identify the EntityType to be updated. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Field mask is used to specify the fields to be overwritten + in the EntityType resource by the update. The fields + specified in the update_mask are relative to the resource, + not the full request. A field will be overwritten if it is + in the mask. If the user does not provide a mask then only + the non-empty fields present in the request will be + overwritten. Set the update_mask to ``*`` to override all + fields. + + Updatable fields: + + - ``description`` + - ``labels`` + - ``monitoring_config.snapshot_analysis.disabled`` + - ``monitoring_config.snapshot_analysis.monitoring_interval_days`` + - ``monitoring_config.snapshot_analysis.staleness_days`` + - ``monitoring_config.import_features_analysis.state`` + - ``monitoring_config.import_features_analysis.anomaly_detection_baseline`` + - ``monitoring_config.numerical_threshold_config.value`` + - ``monitoring_config.categorical_threshold_config.value`` + - ``offline_storage_ttl_days`` + """ + + entity_type: gca_entity_type.EntityType = proto.Field( + proto.MESSAGE, + number=1, + message=gca_entity_type.EntityType, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteEntityTypeRequest(proto.Message): + r"""Request message for + [FeaturestoreService.DeleteEntityType][google.cloud.aiplatform.v1.FeaturestoreService.DeleteEntityType]. + + Attributes: + name (str): + Required. The name of the EntityType to be deleted. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + force (bool): + If set to true, any Features for this + EntityType will also be deleted. (Otherwise, the + request will only work if the EntityType has no + Features.) + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class CreateFeatureRequest(proto.Message): + r"""Request message for + [FeaturestoreService.CreateFeature][google.cloud.aiplatform.v1.FeaturestoreService.CreateFeature]. + Request message for + [FeatureRegistryService.CreateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.CreateFeature]. + + Attributes: + parent (str): + Required. The resource name of the EntityType or + FeatureGroup to create a Feature. Format for entity_type as + parent: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + Format for feature_group as parent: + ``projects/{project}/locations/{location}/featureGroups/{feature_group}`` + feature (google.cloud.aiplatform_v1.types.Feature): + Required. The Feature to create. + feature_id (str): + Required. The ID to use for the Feature, which will become + the final component of the Feature's resource name. + + This value may be up to 128 characters, and valid characters + are ``[a-z0-9_]``. The first character cannot be a number. + + The value must be unique within an EntityType/FeatureGroup. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + feature: gca_feature.Feature = proto.Field( + proto.MESSAGE, + number=2, + message=gca_feature.Feature, + ) + feature_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class BatchCreateFeaturesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures]. + Request message for + [FeatureRegistryService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.BatchCreateFeatures]. + + Attributes: + parent (str): + Required. The resource name of the EntityType/FeatureGroup + to create the batch of Features under. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + ``projects/{project}/locations/{location}/featureGroups/{feature_group}`` + requests (MutableSequence[google.cloud.aiplatform_v1.types.CreateFeatureRequest]): + Required. The request message specifying the Features to + create. All Features must be created under the same parent + EntityType / FeatureGroup. The ``parent`` field in each + child request message can be omitted. If ``parent`` is set + in a child request, then the value must match the ``parent`` + value in this request message. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + requests: MutableSequence["CreateFeatureRequest"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="CreateFeatureRequest", + ) + + +class BatchCreateFeaturesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.BatchCreateFeatures][google.cloud.aiplatform.v1.FeaturestoreService.BatchCreateFeatures]. + + Attributes: + features (MutableSequence[google.cloud.aiplatform_v1.types.Feature]): + The Features created. + """ + + features: MutableSequence[gca_feature.Feature] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_feature.Feature, + ) + + +class GetFeatureRequest(proto.Message): + r"""Request message for + [FeaturestoreService.GetFeature][google.cloud.aiplatform.v1.FeaturestoreService.GetFeature]. + Request message for + [FeatureRegistryService.GetFeature][google.cloud.aiplatform.v1.FeatureRegistryService.GetFeature]. + + Attributes: + name (str): + Required. The name of the Feature resource. Format for + entity_type as parent: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + Format for feature_group as parent: + ``projects/{project}/locations/{location}/featureGroups/{feature_group}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListFeaturesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]. + Request message for + [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]. + + Attributes: + parent (str): + Required. The resource name of the Location to list + Features. Format for entity_type as parent: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}`` + Format for feature_group as parent: + ``projects/{project}/locations/{location}/featureGroups/{feature_group}`` + filter (str): + Lists the Features that match the filter expression. The + following filters are supported: + + - ``value_type``: Supports = and != comparisons. + - ``create_time``: Supports =, !=, <, >, >=, and <= + comparisons. Values must be in RFC 3339 format. + - ``update_time``: Supports =, !=, <, >, >=, and <= + comparisons. Values must be in RFC 3339 format. + - ``labels``: Supports key-value equality as well as key + presence. + + Examples: + + - ``value_type = DOUBLE`` --> Features whose type is DOUBLE. + - ``create_time > \"2020-01-31T15:30:00.000000Z\" OR update_time > \"2020-01-31T15:30:00.000000Z\"`` + --> EntityTypes created or updated after + 2020-01-31T15:30:00.000000Z. + - ``labels.active = yes AND labels.env = prod`` --> Features + having both (active: yes) and (env: prod) labels. + - ``labels.env: *`` --> Any Feature which has a label with + 'env' as the key. + page_size (int): + The maximum number of Features to return. The + service may return fewer than this value. If + unspecified, at most 1000 Features will be + returned. The maximum value is 1000; any value + greater than 1000 will be coerced to 1000. + page_token (str): + A page token, received from a previous + [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures] + call or + [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures] + call. Provide this to retrieve the subsequent page. + + When paginating, all other parameters provided to + [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures] + or + [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures] + must match the call that provided the page token. + order_by (str): + A comma-separated list of fields to order by, sorted in + ascending order. Use "desc" after a field name for + descending. Supported fields: + + - ``feature_id`` + - ``value_type`` (Not supported for FeatureRegistry Feature) + - ``create_time`` + - ``update_time`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + latest_stats_count (int): + Only applicable for Vertex AI Feature Store (Legacy). If + set, return the most recent + [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count] + of stats for each Feature in response. Valid value is [0, + 10]. If number of stats exists < + [ListFeaturesRequest.latest_stats_count][google.cloud.aiplatform.v1.ListFeaturesRequest.latest_stats_count], + return all existing stats. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=6, + message=field_mask_pb2.FieldMask, + ) + latest_stats_count: int = proto.Field( + proto.INT32, + number=7, + ) + + +class ListFeaturesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.ListFeatures][google.cloud.aiplatform.v1.FeaturestoreService.ListFeatures]. + Response message for + [FeatureRegistryService.ListFeatures][google.cloud.aiplatform.v1.FeatureRegistryService.ListFeatures]. + + Attributes: + features (MutableSequence[google.cloud.aiplatform_v1.types.Feature]): + The Features matching the request. + next_page_token (str): + A token, which can be sent as + [ListFeaturesRequest.page_token][google.cloud.aiplatform.v1.ListFeaturesRequest.page_token] + to retrieve the next page. If this field is omitted, there + are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + features: MutableSequence[gca_feature.Feature] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_feature.Feature, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class SearchFeaturesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]. + + Attributes: + location (str): + Required. The resource name of the Location to search + Features. Format: + ``projects/{project}/locations/{location}`` + query (str): + Query string that is a conjunction of field-restricted + queries and/or field-restricted filters. Field-restricted + queries and filters can be combined using ``AND`` to form a + conjunction. + + A field query is in the form FIELD:QUERY. This implicitly + checks if QUERY exists as a substring within Feature's + FIELD. The QUERY and the FIELD are converted to a sequence + of words (i.e. tokens) for comparison. This is done by: + + - Removing leading/trailing whitespace and tokenizing the + search value. Characters that are not one of alphanumeric + ``[a-zA-Z0-9]``, underscore ``_``, or asterisk ``*`` are + treated as delimiters for tokens. ``*`` is treated as a + wildcard that matches characters within a token. + - Ignoring case. + - Prepending an asterisk to the first and appending an + asterisk to the last token in QUERY. + + A QUERY must be either a singular token or a phrase. A + phrase is one or multiple words enclosed in double quotation + marks ("). With phrases, the order of the words is + important. Words in the phrase must be matching in order and + consecutively. + + Supported FIELDs for field-restricted queries: + + - ``feature_id`` + - ``description`` + - ``entity_type_id`` + + Examples: + + - ``feature_id: foo`` --> Matches a Feature with ID + containing the substring ``foo`` (eg. ``foo``, + ``foofeature``, ``barfoo``). + - ``feature_id: foo*feature`` --> Matches a Feature with ID + containing the substring ``foo*feature`` (eg. + ``foobarfeature``). + - ``feature_id: foo AND description: bar`` --> Matches a + Feature with ID containing the substring ``foo`` and + description containing the substring ``bar``. + + Besides field queries, the following exact-match filters are + supported. The exact-match filters do not support wildcards. + Unlike field-restricted queries, exact-match filters are + case-sensitive. + + - ``feature_id``: Supports = comparisons. + - ``description``: Supports = comparisons. Multi-token + filters should be enclosed in quotes. + - ``entity_type_id``: Supports = comparisons. + - ``value_type``: Supports = and != comparisons. + - ``labels``: Supports key-value equality as well as key + presence. + - ``featurestore_id``: Supports = comparisons. + + Examples: + + - ``description = "foo bar"`` --> Any Feature with + description exactly equal to ``foo bar`` + - ``value_type = DOUBLE`` --> Features whose type is DOUBLE. + - ``labels.active = yes AND labels.env = prod`` --> Features + having both (active: yes) and (env: prod) labels. + - ``labels.env: *`` --> Any Feature which has a label with + ``env`` as the key. + page_size (int): + The maximum number of Features to return. The + service may return fewer than this value. If + unspecified, at most 100 Features will be + returned. The maximum value is 100; any value + greater than 100 will be coerced to 100. + page_token (str): + A page token, received from a previous + [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures] + call. Provide this to retrieve the subsequent page. + + When paginating, all other parameters provided to + [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures], + except ``page_size``, must match the call that provided the + page token. + """ + + location: str = proto.Field( + proto.STRING, + number=1, + ) + query: str = proto.Field( + proto.STRING, + number=3, + ) + page_size: int = proto.Field( + proto.INT32, + number=4, + ) + page_token: str = proto.Field( + proto.STRING, + number=5, + ) + + +class SearchFeaturesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.SearchFeatures][google.cloud.aiplatform.v1.FeaturestoreService.SearchFeatures]. + + Attributes: + features (MutableSequence[google.cloud.aiplatform_v1.types.Feature]): + The Features matching the request. + + Fields returned: + + - ``name`` + - ``description`` + - ``labels`` + - ``create_time`` + - ``update_time`` + next_page_token (str): + A token, which can be sent as + [SearchFeaturesRequest.page_token][google.cloud.aiplatform.v1.SearchFeaturesRequest.page_token] + to retrieve the next page. If this field is omitted, there + are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + features: MutableSequence[gca_feature.Feature] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_feature.Feature, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateFeatureRequest(proto.Message): + r"""Request message for + [FeaturestoreService.UpdateFeature][google.cloud.aiplatform.v1.FeaturestoreService.UpdateFeature]. + Request message for + [FeatureRegistryService.UpdateFeature][google.cloud.aiplatform.v1.FeatureRegistryService.UpdateFeature]. + + Attributes: + feature (google.cloud.aiplatform_v1.types.Feature): + Required. The Feature's ``name`` field is used to identify + the Feature to be updated. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`` + ``projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Field mask is used to specify the fields to be overwritten + in the Features resource by the update. The fields specified + in the update_mask are relative to the resource, not the + full request. A field will be overwritten if it is in the + mask. If the user does not provide a mask then only the + non-empty fields present in the request will be overwritten. + Set the update_mask to ``*`` to override all fields. + + Updatable fields: + + - ``description`` + - ``labels`` + - ``disable_monitoring`` (Not supported for + FeatureRegistryService Feature) + - ``point_of_contact`` (Not supported for + FeaturestoreService FeatureStore) + """ + + feature: gca_feature.Feature = proto.Field( + proto.MESSAGE, + number=1, + message=gca_feature.Feature, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteFeatureRequest(proto.Message): + r"""Request message for + [FeaturestoreService.DeleteFeature][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeature]. + Request message for + [FeatureRegistryService.DeleteFeature][google.cloud.aiplatform.v1.FeatureRegistryService.DeleteFeature]. + + Attributes: + name (str): + Required. The name of the Features to be deleted. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entity_type}/features/{feature}`` + ``projects/{project}/locations/{location}/featureGroups/{feature_group}/features/{feature}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateFeaturestoreOperationMetadata(proto.Message): + r"""Details of operations that perform create Featurestore. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class UpdateFeaturestoreOperationMetadata(proto.Message): + r"""Details of operations that perform update Featurestore. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class ImportFeatureValuesOperationMetadata(proto.Message): + r"""Details of operations that perform import Feature values. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore import + Feature values. + imported_entity_count (int): + Number of entities that have been imported by + the operation. + imported_feature_value_count (int): + Number of Feature values that have been + imported by the operation. + source_uris (MutableSequence[str]): + The source URI from where Feature values are + imported. + invalid_row_count (int): + The number of rows in input source that weren't imported due + to either + + - Not having any featureValues. + - Having a null entityId. + - Having a null timestamp. + - Not being parsable (applicable for CSV sources). + timestamp_outside_retention_rows_count (int): + The number rows that weren't ingested due to + having timestamps outside the retention + boundary. + blocking_operation_ids (MutableSequence[int]): + List of ImportFeatureValues operations + running under a single EntityType that are + blocking this operation. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + imported_entity_count: int = proto.Field( + proto.INT64, + number=2, + ) + imported_feature_value_count: int = proto.Field( + proto.INT64, + number=3, + ) + source_uris: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + invalid_row_count: int = proto.Field( + proto.INT64, + number=6, + ) + timestamp_outside_retention_rows_count: int = proto.Field( + proto.INT64, + number=7, + ) + blocking_operation_ids: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=8, + ) + + +class ExportFeatureValuesOperationMetadata(proto.Message): + r"""Details of operations that exports Features values. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore export + Feature values. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class BatchReadFeatureValuesOperationMetadata(proto.Message): + r"""Details of operations that batch reads Feature values. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore batch + read Features values. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class DeleteFeatureValuesOperationMetadata(proto.Message): + r"""Details of operations that delete Feature values. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Featurestore delete + Features values. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class CreateEntityTypeOperationMetadata(proto.Message): + r"""Details of operations that perform create EntityType. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for EntityType. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class CreateFeatureOperationMetadata(proto.Message): + r"""Details of operations that perform create Feature. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Feature. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class BatchCreateFeaturesOperationMetadata(proto.Message): + r"""Details of operations that perform batch create Features. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for Feature. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class DeleteFeatureValuesRequest(proto.Message): + r"""Request message for + [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + select_entity (google.cloud.aiplatform_v1.types.DeleteFeatureValuesRequest.SelectEntity): + Select feature values to be deleted by + specifying entities. + + This field is a member of `oneof`_ ``DeleteOption``. + select_time_range_and_feature (google.cloud.aiplatform_v1.types.DeleteFeatureValuesRequest.SelectTimeRangeAndFeature): + Select feature values to be deleted by + specifying time range and features. + + This field is a member of `oneof`_ ``DeleteOption``. + entity_type (str): + Required. The resource name of the EntityType grouping the + Features for which values are being deleted from. Format: + ``projects/{project}/locations/{location}/featurestores/{featurestore}/entityTypes/{entityType}`` + """ + + class SelectEntity(proto.Message): + r"""Message to select entity. + If an entity id is selected, all the feature values + corresponding to the entity id will be deleted, including the + entityId. + + Attributes: + entity_id_selector (google.cloud.aiplatform_v1.types.EntityIdSelector): + Required. Selectors choosing feature values + of which entity id to be deleted from the + EntityType. + """ + + entity_id_selector: "EntityIdSelector" = proto.Field( + proto.MESSAGE, + number=1, + message="EntityIdSelector", + ) + + class SelectTimeRangeAndFeature(proto.Message): + r"""Message to select time range and feature. + Values of the selected feature generated within an inclusive + time range will be deleted. Using this option permanently + deletes the feature values from the specified feature IDs within + the specified time range. This might include data from the + online storage. If you want to retain any deleted historical + data in the online storage, you must re-ingest it. + + Attributes: + time_range (google.type.interval_pb2.Interval): + Required. Select feature generated within a + half-inclusive time range. The time range is + lower inclusive and upper exclusive. + feature_selector (google.cloud.aiplatform_v1.types.FeatureSelector): + Required. Selectors choosing which feature + values to be deleted from the EntityType. + skip_online_storage_delete (bool): + If set, data will not be deleted from online + storage. When time range is older than the data + in online storage, setting this to be true will + make the deletion have no impact on online + serving. + """ + + time_range: interval_pb2.Interval = proto.Field( + proto.MESSAGE, + number=1, + message=interval_pb2.Interval, + ) + feature_selector: gca_feature_selector.FeatureSelector = proto.Field( + proto.MESSAGE, + number=2, + message=gca_feature_selector.FeatureSelector, + ) + skip_online_storage_delete: bool = proto.Field( + proto.BOOL, + number=3, + ) + + select_entity: SelectEntity = proto.Field( + proto.MESSAGE, + number=2, + oneof="DeleteOption", + message=SelectEntity, + ) + select_time_range_and_feature: SelectTimeRangeAndFeature = proto.Field( + proto.MESSAGE, + number=3, + oneof="DeleteOption", + message=SelectTimeRangeAndFeature, + ) + entity_type: str = proto.Field( + proto.STRING, + number=1, + ) + + +class DeleteFeatureValuesResponse(proto.Message): + r"""Response message for + [FeaturestoreService.DeleteFeatureValues][google.cloud.aiplatform.v1.FeaturestoreService.DeleteFeatureValues]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + select_entity (google.cloud.aiplatform_v1.types.DeleteFeatureValuesResponse.SelectEntity): + Response for request specifying the entities + to delete + + This field is a member of `oneof`_ ``response``. + select_time_range_and_feature (google.cloud.aiplatform_v1.types.DeleteFeatureValuesResponse.SelectTimeRangeAndFeature): + Response for request specifying time range + and feature + + This field is a member of `oneof`_ ``response``. + """ + + class SelectEntity(proto.Message): + r"""Response message if the request uses the SelectEntity option. + + Attributes: + offline_storage_deleted_entity_row_count (int): + The count of deleted entity rows in the + offline storage. Each row corresponds to the + combination of an entity ID and a timestamp. One + entity ID can have multiple rows in the offline + storage. + online_storage_deleted_entity_count (int): + The count of deleted entities in the online + storage. Each entity ID corresponds to one + entity. + """ + + offline_storage_deleted_entity_row_count: int = proto.Field( + proto.INT64, + number=1, + ) + online_storage_deleted_entity_count: int = proto.Field( + proto.INT64, + number=2, + ) + + class SelectTimeRangeAndFeature(proto.Message): + r"""Response message if the request uses the + SelectTimeRangeAndFeature option. + + Attributes: + impacted_feature_count (int): + The count of the features or columns + impacted. This is the same as the feature count + in the request. + offline_storage_modified_entity_row_count (int): + The count of modified entity rows in the + offline storage. Each row corresponds to the + combination of an entity ID and a timestamp. One + entity ID can have multiple rows in the offline + storage. Within each row, only the features + specified in the request are deleted. + online_storage_modified_entity_count (int): + The count of modified entities in the online + storage. Each entity ID corresponds to one + entity. Within each entity, only the features + specified in the request are deleted. + """ + + impacted_feature_count: int = proto.Field( + proto.INT64, + number=1, + ) + offline_storage_modified_entity_row_count: int = proto.Field( + proto.INT64, + number=2, + ) + online_storage_modified_entity_count: int = proto.Field( + proto.INT64, + number=3, + ) + + select_entity: SelectEntity = proto.Field( + proto.MESSAGE, + number=1, + oneof="response", + message=SelectEntity, + ) + select_time_range_and_feature: SelectTimeRangeAndFeature = proto.Field( + proto.MESSAGE, + number=2, + oneof="response", + message=SelectTimeRangeAndFeature, + ) + + +class EntityIdSelector(proto.Message): + r"""Selector for entityId. Getting ids from the given source. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + csv_source (google.cloud.aiplatform_v1.types.CsvSource): + Source of Csv + + This field is a member of `oneof`_ ``EntityIdsSource``. + entity_id_field (str): + Source column that holds entity IDs. If not provided, entity + IDs are extracted from the column named entity_id. + """ + + csv_source: io.CsvSource = proto.Field( + proto.MESSAGE, + number=3, + oneof="EntityIdsSource", + message=io.CsvSource, + ) + entity_id_field: str = proto.Field( + proto.STRING, + number=5, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/gen_ai_cache_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/gen_ai_cache_service.py new file mode 100644 index 0000000000000000000000000000000000000000..68e9f42de6cb5a08feb280696cea9896ff8f6893 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/gen_ai_cache_service.py @@ -0,0 +1,185 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import cached_content as gca_cached_content +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateCachedContentRequest", + "GetCachedContentRequest", + "UpdateCachedContentRequest", + "DeleteCachedContentRequest", + "ListCachedContentsRequest", + "ListCachedContentsResponse", + }, +) + + +class CreateCachedContentRequest(proto.Message): + r"""Request message for + [GenAiCacheService.CreateCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.CreateCachedContent]. + + Attributes: + parent (str): + Required. The parent resource where the + cached content will be created + cached_content (google.cloud.aiplatform_v1.types.CachedContent): + Required. The cached content to create + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + cached_content: gca_cached_content.CachedContent = proto.Field( + proto.MESSAGE, + number=2, + message=gca_cached_content.CachedContent, + ) + + +class GetCachedContentRequest(proto.Message): + r"""Request message for + [GenAiCacheService.GetCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.GetCachedContent]. + + Attributes: + name (str): + Required. The resource name referring to the + cached content + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdateCachedContentRequest(proto.Message): + r"""Request message for + [GenAiCacheService.UpdateCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.UpdateCachedContent]. + Only expire_time or ttl can be updated. + + Attributes: + cached_content (google.cloud.aiplatform_v1.types.CachedContent): + Required. The cached content to update + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The list of fields to update. + """ + + cached_content: gca_cached_content.CachedContent = proto.Field( + proto.MESSAGE, + number=1, + message=gca_cached_content.CachedContent, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteCachedContentRequest(proto.Message): + r"""Request message for + [GenAiCacheService.DeleteCachedContent][google.cloud.aiplatform.v1.GenAiCacheService.DeleteCachedContent]. + + Attributes: + name (str): + Required. The resource name referring to the + cached content + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListCachedContentsRequest(proto.Message): + r"""Request to list CachedContents. + + Attributes: + parent (str): + Required. The parent, which owns this + collection of cached contents. + page_size (int): + Optional. The maximum number of cached + contents to return. The service may return fewer + than this value. If unspecified, some default + (under maximum) number of items will be + returned. The maximum value is 1000; values + above 1000 will be coerced to 1000. + page_token (str): + Optional. A page token, received from a previous + ``ListCachedContents`` call. Provide this to retrieve the + subsequent page. + + When paginating, all other parameters provided to + ``ListCachedContents`` must match the call that provided the + page token. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListCachedContentsResponse(proto.Message): + r"""Response with a list of CachedContents. + + Attributes: + cached_contents (MutableSequence[google.cloud.aiplatform_v1.types.CachedContent]): + List of cached contents. + next_page_token (str): + A token, which can be sent as ``page_token`` to retrieve the + next page. If this field is omitted, there are no subsequent + pages. + """ + + @property + def raw_page(self): + return self + + cached_contents: MutableSequence[gca_cached_content.CachedContent] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_cached_content.CachedContent, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/hyperparameter_tuning_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/hyperparameter_tuning_job.py new file mode 100644 index 0000000000000000000000000000000000000000..a3f75710c7f6bffe29c236c69e8d58e7be299068 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/hyperparameter_tuning_job.py @@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import custom_job +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import job_state +from google.cloud.aiplatform_v1.types import study +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "HyperparameterTuningJob", + }, +) + + +class HyperparameterTuningJob(proto.Message): + r"""Represents a HyperparameterTuningJob. A + HyperparameterTuningJob has a Study specification and multiple + CustomJobs with identical CustomJob specification. + + Attributes: + name (str): + Output only. Resource name of the + HyperparameterTuningJob. + display_name (str): + Required. The display name of the + HyperparameterTuningJob. The name can be up to + 128 characters long and can consist of any UTF-8 + characters. + study_spec (google.cloud.aiplatform_v1.types.StudySpec): + Required. Study configuration of the + HyperparameterTuningJob. + max_trial_count (int): + Required. The desired total number of Trials. + parallel_trial_count (int): + Required. The desired number of Trials to run + in parallel. + max_failed_trial_count (int): + The number of failed Trials that need to be + seen before failing the HyperparameterTuningJob. + + If set to 0, Vertex AI decides how many Trials + must fail before the whole job fails. + trial_job_spec (google.cloud.aiplatform_v1.types.CustomJobSpec): + Required. The spec of a trial job. The same + spec applies to the CustomJobs created in all + the trials. + trials (MutableSequence[google.cloud.aiplatform_v1.types.Trial]): + Output only. Trials of the + HyperparameterTuningJob. + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the job. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the + HyperparameterTuningJob was created. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the HyperparameterTuningJob for the + first time entered the ``JOB_STATE_RUNNING`` state. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the HyperparameterTuningJob entered + any of the following states: ``JOB_STATE_SUCCEEDED``, + ``JOB_STATE_FAILED``, ``JOB_STATE_CANCELLED``. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the + HyperparameterTuningJob was most recently + updated. + error (google.rpc.status_pb2.Status): + Output only. Only populated when job's state is + JOB_STATE_FAILED or JOB_STATE_CANCELLED. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize HyperparameterTuningJobs. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key options for a + HyperparameterTuningJob. If this is set, then + all resources created by the + HyperparameterTuningJob will be encrypted with + the provided encryption key. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + study_spec: study.StudySpec = proto.Field( + proto.MESSAGE, + number=4, + message=study.StudySpec, + ) + max_trial_count: int = proto.Field( + proto.INT32, + number=5, + ) + parallel_trial_count: int = proto.Field( + proto.INT32, + number=6, + ) + max_failed_trial_count: int = proto.Field( + proto.INT32, + number=7, + ) + trial_job_spec: custom_job.CustomJobSpec = proto.Field( + proto.MESSAGE, + number=8, + message=custom_job.CustomJobSpec, + ) + trials: MutableSequence[study.Trial] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message=study.Trial, + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=10, + enum=job_state.JobState, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=13, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=14, + message=timestamp_pb2.Timestamp, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=15, + message=status_pb2.Status, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=16, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=17, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=19, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=20, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index.py new file mode 100644 index 0000000000000000000000000000000000000000..162e64b501d35000b336b9355dd4e75ea128cbda --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index.py @@ -0,0 +1,477 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import deployed_index_ref +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Index", + "IndexDatapoint", + "IndexStats", + }, +) + + +class Index(proto.Message): + r"""A representation of a collection of database items organized + in a way that allows for approximate nearest neighbor (a.k.a + ANN) algorithms search. + + Attributes: + name (str): + Output only. The resource name of the Index. + display_name (str): + Required. The display name of the Index. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + description (str): + The description of the Index. + metadata_schema_uri (str): + Immutable. Points to a YAML file stored on Google Cloud + Storage describing additional information about the Index, + that is specific to it. Unset if the Index does not have any + additional information. The schema is defined as an OpenAPI + 3.0.2 `Schema + Object `__. + Note: The URI given on output will be immutable and probably + different, including the URI scheme, than the one given on + input. The output URI will point to a location where the + user only has a read access. + metadata (google.protobuf.struct_pb2.Value): + An additional information about the Index; the schema of the + metadata can be found in + [metadata_schema][google.cloud.aiplatform.v1.Index.metadata_schema_uri]. + deployed_indexes (MutableSequence[google.cloud.aiplatform_v1.types.DeployedIndexRef]): + Output only. The pointers to DeployedIndexes + created from this Index. An Index can be only + deleted if all its DeployedIndexes had been + undeployed first. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Indexes. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Index was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Index was most recently + updated. This also includes any update to the contents of + the Index. Note that Operations working on this Index may + have their + [Operations.metadata.generic_metadata.update_time] + [google.cloud.aiplatform.v1.GenericOperationMetadata.update_time] + a little after the value of this timestamp, yet that does + not mean their results are not already reflected in the + Index. Result of any successfully completed Operation on the + Index is reflected in it. + index_stats (google.cloud.aiplatform_v1.types.IndexStats): + Output only. Stats of the index resource. + index_update_method (google.cloud.aiplatform_v1.types.Index.IndexUpdateMethod): + Immutable. The update method to use with this Index. If not + set, BATCH_UPDATE will be used by default. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Immutable. Customer-managed encryption key + spec for an Index. If set, this Index and all + sub-resources of this Index will be secured by + this key. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class IndexUpdateMethod(proto.Enum): + r"""The update method of an Index. + + Values: + INDEX_UPDATE_METHOD_UNSPECIFIED (0): + Should not be used. + BATCH_UPDATE (1): + BatchUpdate: user can call UpdateIndex with + files on Cloud Storage of Datapoints to update. + STREAM_UPDATE (2): + StreamUpdate: user can call + UpsertDatapoints/DeleteDatapoints to update the + Index and the updates will be applied in + corresponding DeployedIndexes in nearly + real-time. + """ + + INDEX_UPDATE_METHOD_UNSPECIFIED = 0 + BATCH_UPDATE = 1 + STREAM_UPDATE = 2 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + metadata_schema_uri: str = proto.Field( + proto.STRING, + number=4, + ) + metadata: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=6, + message=struct_pb2.Value, + ) + deployed_indexes: MutableSequence[deployed_index_ref.DeployedIndexRef] = ( + proto.RepeatedField( + proto.MESSAGE, + number=7, + message=deployed_index_ref.DeployedIndexRef, + ) + ) + etag: str = proto.Field( + proto.STRING, + number=8, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=9, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=10, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + index_stats: "IndexStats" = proto.Field( + proto.MESSAGE, + number=14, + message="IndexStats", + ) + index_update_method: IndexUpdateMethod = proto.Field( + proto.ENUM, + number=16, + enum=IndexUpdateMethod, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=17, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=18, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=19, + ) + + +class IndexDatapoint(proto.Message): + r"""A datapoint of Index. + + Attributes: + datapoint_id (str): + Required. Unique identifier of the datapoint. + feature_vector (MutableSequence[float]): + Required. Feature embedding vector for dense index. An array + of numbers with the length of + [NearestNeighborSearchConfig.dimensions]. + sparse_embedding (google.cloud.aiplatform_v1.types.IndexDatapoint.SparseEmbedding): + Optional. Feature embedding vector for sparse + index. + restricts (MutableSequence[google.cloud.aiplatform_v1.types.IndexDatapoint.Restriction]): + Optional. List of Restrict of the datapoint, + used to perform "restricted searches" where + boolean rule are used to filter the subset of + the database eligible for matching. This uses + categorical tokens. See: + + https://cloud.google.com/vertex-ai/docs/matching-engine/filtering + numeric_restricts (MutableSequence[google.cloud.aiplatform_v1.types.IndexDatapoint.NumericRestriction]): + Optional. List of Restrict of the datapoint, + used to perform "restricted searches" where + boolean rule are used to filter the subset of + the database eligible for matching. This uses + numeric comparisons. + crowding_tag (google.cloud.aiplatform_v1.types.IndexDatapoint.CrowdingTag): + Optional. CrowdingTag of the datapoint, the + number of neighbors to return in each crowding + can be configured during query. + embedding_metadata (google.protobuf.struct_pb2.Struct): + Optional. The key-value map of additional + metadata for the datapoint. + """ + + class SparseEmbedding(proto.Message): + r"""Feature embedding vector for sparse index. An array of + numbers whose values are located in the specified dimensions. + + Attributes: + values (MutableSequence[float]): + Required. The list of embedding values of the + sparse vector. + dimensions (MutableSequence[int]): + Required. The list of indexes for the + embedding values of the sparse vector. + """ + + values: MutableSequence[float] = proto.RepeatedField( + proto.FLOAT, + number=1, + ) + dimensions: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=2, + ) + + class Restriction(proto.Message): + r"""Restriction of a datapoint which describe its + attributes(tokens) from each of several attribute + categories(namespaces). + + Attributes: + namespace (str): + The namespace of this restriction. e.g.: + color. + allow_list (MutableSequence[str]): + The attributes to allow in this namespace. + e.g.: 'red' + deny_list (MutableSequence[str]): + The attributes to deny in this namespace. + e.g.: 'blue' + """ + + namespace: str = proto.Field( + proto.STRING, + number=1, + ) + allow_list: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + deny_list: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + class NumericRestriction(proto.Message): + r"""This field allows restricts to be based on numeric + comparisons rather than categorical tokens. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + value_int (int): + Represents 64 bit integer. + + This field is a member of `oneof`_ ``Value``. + value_float (float): + Represents 32 bit float. + + This field is a member of `oneof`_ ``Value``. + value_double (float): + Represents 64 bit float. + + This field is a member of `oneof`_ ``Value``. + namespace (str): + The namespace of this restriction. e.g.: + cost. + op (google.cloud.aiplatform_v1.types.IndexDatapoint.NumericRestriction.Operator): + This MUST be specified for queries and must + NOT be specified for datapoints. + """ + + class Operator(proto.Enum): + r"""Which comparison operator to use. Should be specified for + queries only; specifying this for a datapoint is an error. + + Datapoints for which Operator is true relative to the query's + Value field will be allowlisted. + + Values: + OPERATOR_UNSPECIFIED (0): + Default value of the enum. + LESS (1): + Datapoints are eligible iff their value is < + the query's. + LESS_EQUAL (2): + Datapoints are eligible iff their value is <= + the query's. + EQUAL (3): + Datapoints are eligible iff their value is == + the query's. + GREATER_EQUAL (4): + Datapoints are eligible iff their value is >= + the query's. + GREATER (5): + Datapoints are eligible iff their value is > + the query's. + NOT_EQUAL (6): + Datapoints are eligible iff their value is != + the query's. + """ + + OPERATOR_UNSPECIFIED = 0 + LESS = 1 + LESS_EQUAL = 2 + EQUAL = 3 + GREATER_EQUAL = 4 + GREATER = 5 + NOT_EQUAL = 6 + + value_int: int = proto.Field( + proto.INT64, + number=2, + oneof="Value", + ) + value_float: float = proto.Field( + proto.FLOAT, + number=3, + oneof="Value", + ) + value_double: float = proto.Field( + proto.DOUBLE, + number=4, + oneof="Value", + ) + namespace: str = proto.Field( + proto.STRING, + number=1, + ) + op: "IndexDatapoint.NumericRestriction.Operator" = proto.Field( + proto.ENUM, + number=5, + enum="IndexDatapoint.NumericRestriction.Operator", + ) + + class CrowdingTag(proto.Message): + r"""Crowding tag is a constraint on a neighbor list produced by nearest + neighbor search requiring that no more than some value k' of the k + neighbors returned have the same value of crowding_attribute. + + Attributes: + crowding_attribute (str): + The attribute value used for crowding. The maximum number of + neighbors to return per crowding attribute value + (per_crowding_attribute_num_neighbors) is configured + per-query. This field is ignored if + per_crowding_attribute_num_neighbors is larger than the + total number of neighbors to return for a given query. + """ + + crowding_attribute: str = proto.Field( + proto.STRING, + number=1, + ) + + datapoint_id: str = proto.Field( + proto.STRING, + number=1, + ) + feature_vector: MutableSequence[float] = proto.RepeatedField( + proto.FLOAT, + number=2, + ) + sparse_embedding: SparseEmbedding = proto.Field( + proto.MESSAGE, + number=7, + message=SparseEmbedding, + ) + restricts: MutableSequence[Restriction] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=Restriction, + ) + numeric_restricts: MutableSequence[NumericRestriction] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message=NumericRestriction, + ) + crowding_tag: CrowdingTag = proto.Field( + proto.MESSAGE, + number=5, + message=CrowdingTag, + ) + embedding_metadata: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=8, + message=struct_pb2.Struct, + ) + + +class IndexStats(proto.Message): + r"""Stats of the Index. + + Attributes: + vectors_count (int): + Output only. The number of dense vectors in + the Index. + sparse_vectors_count (int): + Output only. The number of sparse vectors in + the Index. + shards_count (int): + Output only. The number of shards in the + Index. + """ + + vectors_count: int = proto.Field( + proto.INT64, + number=1, + ) + sparse_vectors_count: int = proto.Field( + proto.INT64, + number=3, + ) + shards_count: int = proto.Field( + proto.INT32, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint.py new file mode 100644 index 0000000000000000000000000000000000000000..27b892bea5e348e993c89b495dcd1e88d88337b1 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint.py @@ -0,0 +1,524 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import service_networking +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "IndexEndpoint", + "DeployedIndex", + "DeployedIndexAuthConfig", + "IndexPrivateEndpoints", + }, +) + + +class IndexEndpoint(proto.Message): + r"""Indexes are deployed into it. An IndexEndpoint can have + multiple DeployedIndexes. + + Attributes: + name (str): + Output only. The resource name of the + IndexEndpoint. + display_name (str): + Required. The display name of the + IndexEndpoint. The name can be up to 128 + characters long and can consist of any UTF-8 + characters. + description (str): + The description of the IndexEndpoint. + deployed_indexes (MutableSequence[google.cloud.aiplatform_v1.types.DeployedIndex]): + Output only. The indexes deployed in this + endpoint. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your IndexEndpoints. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + IndexEndpoint was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + IndexEndpoint was last updated. This timestamp + is not updated when the endpoint's + DeployedIndexes are updated, e.g. due to updates + of the original Indexes they are the deployments + of. + network (str): + Optional. The full name of the Google Compute Engine + `network `__ + to which the IndexEndpoint should be peered. + + Private services access must already be configured for the + network. If left unspecified, the Endpoint is not peered + with any network. + + [network][google.cloud.aiplatform.v1.IndexEndpoint.network] + and + [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config] + are mutually exclusive. + + `Format `__: + ``projects/{project}/global/networks/{network}``. Where + {project} is a project number, as in '12345', and {network} + is network name. + enable_private_service_connect (bool): + Optional. Deprecated: If true, expose the IndexEndpoint via + private service connect. + + Only one of the fields, + [network][google.cloud.aiplatform.v1.IndexEndpoint.network] + or + [enable_private_service_connect][google.cloud.aiplatform.v1.IndexEndpoint.enable_private_service_connect], + can be set. + private_service_connect_config (google.cloud.aiplatform_v1.types.PrivateServiceConnectConfig): + Optional. Configuration for private service connect. + + [network][google.cloud.aiplatform.v1.IndexEndpoint.network] + and + [private_service_connect_config][google.cloud.aiplatform.v1.IndexEndpoint.private_service_connect_config] + are mutually exclusive. + public_endpoint_enabled (bool): + Optional. If true, the deployed index will be + accessible through public endpoint. + public_endpoint_domain_name (str): + Output only. If + [public_endpoint_enabled][google.cloud.aiplatform.v1.IndexEndpoint.public_endpoint_enabled] + is true, this field will be populated with the domain name + to use for this index endpoint. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Immutable. Customer-managed encryption key + spec for an IndexEndpoint. If set, this + IndexEndpoint and all sub-resources of this + IndexEndpoint will be secured by this key. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + deployed_indexes: MutableSequence["DeployedIndex"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="DeployedIndex", + ) + etag: str = proto.Field( + proto.STRING, + number=5, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + network: str = proto.Field( + proto.STRING, + number=9, + ) + enable_private_service_connect: bool = proto.Field( + proto.BOOL, + number=10, + ) + private_service_connect_config: service_networking.PrivateServiceConnectConfig = ( + proto.Field( + proto.MESSAGE, + number=12, + message=service_networking.PrivateServiceConnectConfig, + ) + ) + public_endpoint_enabled: bool = proto.Field( + proto.BOOL, + number=13, + ) + public_endpoint_domain_name: str = proto.Field( + proto.STRING, + number=14, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=15, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=17, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=18, + ) + + +class DeployedIndex(proto.Message): + r"""A deployment of an Index. IndexEndpoints contain one or more + DeployedIndexes. + + Attributes: + id (str): + Required. The user specified ID of the + DeployedIndex. The ID can be up to 128 + characters long and must start with a letter and + only contain letters, numbers, and underscores. + The ID must be unique within the project it is + created in. + index (str): + Required. The name of the Index this is the + deployment of. We may refer to this Index as the + DeployedIndex's "original" Index. + display_name (str): + The display name of the DeployedIndex. If not provided upon + creation, the Index's display_name is used. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when the DeployedIndex + was created. + private_endpoints (google.cloud.aiplatform_v1.types.IndexPrivateEndpoints): + Output only. Provides paths for users to send requests + directly to the deployed index services running on Cloud via + private services access. This field is populated if + [network][google.cloud.aiplatform.v1.IndexEndpoint.network] + is configured. + index_sync_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The DeployedIndex may depend on various data on + its original Index. Additionally when certain changes to the + original Index are being done (e.g. when what the Index + contains is being changed) the DeployedIndex may be + asynchronously updated in the background to reflect these + changes. If this timestamp's value is at least the + [Index.update_time][google.cloud.aiplatform.v1.Index.update_time] + of the original Index, it means that this DeployedIndex and + the original Index are in sync. If this timestamp is older, + then to see which updates this DeployedIndex already + contains (and which it does not), one must + [list][google.longrunning.Operations.ListOperations] the + operations that are running on the original Index. Only the + successfully completed Operations with + [update_time][google.cloud.aiplatform.v1.GenericOperationMetadata.update_time] + equal or before this sync time are contained in this + DeployedIndex. + automatic_resources (google.cloud.aiplatform_v1.types.AutomaticResources): + Optional. A description of resources that the DeployedIndex + uses, which to large degree are decided by Vertex AI, and + optionally allows only a modest additional configuration. If + min_replica_count is not set, the default value is 2 (we + don't provide SLA when min_replica_count=1). If + max_replica_count is not set, the default value is + min_replica_count. The max allowed replica count is 1000. + dedicated_resources (google.cloud.aiplatform_v1.types.DedicatedResources): + Optional. A description of resources that are dedicated to + the DeployedIndex, and that need a higher degree of manual + configuration. The field min_replica_count must be set to a + value strictly greater than 0, or else validation will fail. + We don't provide SLA when min_replica_count=1. If + max_replica_count is not set, the default value is + min_replica_count. The max allowed replica count is 1000. + + Available machine types for SMALL shard: e2-standard-2 and + all machine types available for MEDIUM and LARGE shard. + + Available machine types for MEDIUM shard: e2-standard-16 and + all machine types available for LARGE shard. + + Available machine types for LARGE shard: e2-highmem-16, + n2d-standard-32. + + n1-standard-16 and n1-standard-32 are still available, but + we recommend e2-standard-16 and e2-highmem-16 for cost + efficiency. + enable_access_logging (bool): + Optional. If true, private endpoint's access + logs are sent to Cloud Logging. + + These logs are like standard server access logs, + containing information like timestamp and + latency for each MatchRequest. + + Note that logs may incur a cost, especially if + the deployed index receives a high queries per + second rate (QPS). Estimate your costs before + enabling this option. + enable_datapoint_upsert_logging (bool): + Optional. If true, logs to Cloud Logging + errors relating to datapoint upserts. + + Under normal operation conditions, these log + entries should be very rare. However, if + incompatible datapoint updates are being + uploaded to an index, a high volume of log + entries may be generated in a short period of + time. + + Note that logs may incur a cost, especially if + the deployed index receives a high volume of + datapoint upserts. Estimate your costs before + enabling this option. + deployed_index_auth_config (google.cloud.aiplatform_v1.types.DeployedIndexAuthConfig): + Optional. If set, the authentication is + enabled for the private endpoint. + reserved_ip_ranges (MutableSequence[str]): + Optional. A list of reserved ip ranges under the VPC network + that can be used for this DeployedIndex. + + If set, we will deploy the index within the provided ip + ranges. Otherwise, the index might be deployed to any ip + ranges under the provided VPC network. + + The value should be the name of the address + (https://cloud.google.com/compute/docs/reference/rest/v1/addresses) + Example: ['vertex-ai-ip-range']. + + For more information about subnets and network IP ranges, + please see + https://cloud.google.com/vpc/docs/subnets#manually_created_subnet_ip_ranges. + deployment_group (str): + Optional. The deployment group can be no longer than 64 + characters (eg: 'test', 'prod'). If not set, we will use the + 'default' deployment group. + + Creating ``deployment_groups`` with ``reserved_ip_ranges`` + is a recommended practice when the peered network has + multiple peering ranges. This creates your deployments from + predictable IP spaces for easier traffic administration. + Also, one deployment_group (except 'default') can only be + used with the same reserved_ip_ranges which means if the + deployment_group has been used with reserved_ip_ranges: [a, + b, c], using it with [a, b] or [d, e] is disallowed. + + Note: we only support up to 5 deployment groups(not + including 'default'). + deployment_tier (google.cloud.aiplatform_v1.types.DeployedIndex.DeploymentTier): + Optional. The deployment tier that the index is deployed to. + DEPLOYMENT_TIER_UNSPECIFIED will use a system-chosen default + tier. + psc_automation_configs (MutableSequence[google.cloud.aiplatform_v1.types.PSCAutomationConfig]): + Optional. If set for PSC deployed index, PSC connection will + be automatically created after deployment is done and the + endpoint information is populated in + private_endpoints.psc_automated_endpoints. + """ + + class DeploymentTier(proto.Enum): + r"""Tiers encapsulate serving time attributes like latency and + throughput. + + Values: + DEPLOYMENT_TIER_UNSPECIFIED (0): + Default deployment tier. + STORAGE (2): + Optimized for costs. + """ + + DEPLOYMENT_TIER_UNSPECIFIED = 0 + STORAGE = 2 + + id: str = proto.Field( + proto.STRING, + number=1, + ) + index: str = proto.Field( + proto.STRING, + number=2, + ) + display_name: str = proto.Field( + proto.STRING, + number=3, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + private_endpoints: "IndexPrivateEndpoints" = proto.Field( + proto.MESSAGE, + number=5, + message="IndexPrivateEndpoints", + ) + index_sync_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + automatic_resources: machine_resources.AutomaticResources = proto.Field( + proto.MESSAGE, + number=7, + message=machine_resources.AutomaticResources, + ) + dedicated_resources: machine_resources.DedicatedResources = proto.Field( + proto.MESSAGE, + number=16, + message=machine_resources.DedicatedResources, + ) + enable_access_logging: bool = proto.Field( + proto.BOOL, + number=8, + ) + enable_datapoint_upsert_logging: bool = proto.Field( + proto.BOOL, + number=20, + ) + deployed_index_auth_config: "DeployedIndexAuthConfig" = proto.Field( + proto.MESSAGE, + number=9, + message="DeployedIndexAuthConfig", + ) + reserved_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=10, + ) + deployment_group: str = proto.Field( + proto.STRING, + number=11, + ) + deployment_tier: DeploymentTier = proto.Field( + proto.ENUM, + number=18, + enum=DeploymentTier, + ) + psc_automation_configs: MutableSequence[service_networking.PSCAutomationConfig] = ( + proto.RepeatedField( + proto.MESSAGE, + number=19, + message=service_networking.PSCAutomationConfig, + ) + ) + + +class DeployedIndexAuthConfig(proto.Message): + r"""Used to set up the auth on the DeployedIndex's private + endpoint. + + Attributes: + auth_provider (google.cloud.aiplatform_v1.types.DeployedIndexAuthConfig.AuthProvider): + Defines the authentication provider that the + DeployedIndex uses. + """ + + class AuthProvider(proto.Message): + r"""Configuration for an authentication provider, including support for + `JSON Web Token + (JWT) `__. + + Attributes: + audiences (MutableSequence[str]): + The list of JWT + `audiences `__. + that are allowed to access. A JWT containing any of these + audiences will be accepted. + allowed_issuers (MutableSequence[str]): + A list of allowed JWT issuers. Each entry must be a valid + Google service account, in the following format: + + ``service-account-name@project-id.iam.gserviceaccount.com`` + """ + + audiences: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + allowed_issuers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + auth_provider: AuthProvider = proto.Field( + proto.MESSAGE, + number=1, + message=AuthProvider, + ) + + +class IndexPrivateEndpoints(proto.Message): + r"""IndexPrivateEndpoints proto is used to provide paths for users to + send requests via private endpoints (e.g. private service access, + private service connect). To send request via private service + access, use match_grpc_address. To send request via private service + connect, use service_attachment. + + Attributes: + match_grpc_address (str): + Output only. The ip address used to send + match gRPC requests. + service_attachment (str): + Output only. The name of the service + attachment resource. Populated if private + service connect is enabled. + psc_automated_endpoints (MutableSequence[google.cloud.aiplatform_v1.types.PscAutomatedEndpoints]): + Output only. PscAutomatedEndpoints is + populated if private service connect is enabled + if PscAutomatedConfig is set. + """ + + match_grpc_address: str = proto.Field( + proto.STRING, + number=1, + ) + service_attachment: str = proto.Field( + proto.STRING, + number=2, + ) + psc_automated_endpoints: MutableSequence[ + service_networking.PscAutomatedEndpoints + ] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=service_networking.PscAutomatedEndpoints, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint_service.py new file mode 100644 index 0000000000000000000000000000000000000000..305868f3b1c8b178472e9e78563229cb05b46bc4 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/index_endpoint_service.py @@ -0,0 +1,426 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import index_endpoint as gca_index_endpoint +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateIndexEndpointRequest", + "CreateIndexEndpointOperationMetadata", + "GetIndexEndpointRequest", + "ListIndexEndpointsRequest", + "ListIndexEndpointsResponse", + "UpdateIndexEndpointRequest", + "DeleteIndexEndpointRequest", + "DeployIndexRequest", + "DeployIndexResponse", + "DeployIndexOperationMetadata", + "UndeployIndexRequest", + "UndeployIndexResponse", + "UndeployIndexOperationMetadata", + "MutateDeployedIndexRequest", + "MutateDeployedIndexResponse", + "MutateDeployedIndexOperationMetadata", + }, +) + + +class CreateIndexEndpointRequest(proto.Message): + r"""Request message for + [IndexEndpointService.CreateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + IndexEndpoint in. Format: + ``projects/{project}/locations/{location}`` + index_endpoint (google.cloud.aiplatform_v1.types.IndexEndpoint): + Required. The IndexEndpoint to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + index_endpoint: gca_index_endpoint.IndexEndpoint = proto.Field( + proto.MESSAGE, + number=2, + message=gca_index_endpoint.IndexEndpoint, + ) + + +class CreateIndexEndpointOperationMetadata(proto.Message): + r"""Runtime operation information for + [IndexEndpointService.CreateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.CreateIndexEndpoint]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetIndexEndpointRequest(proto.Message): + r"""Request message for + [IndexEndpointService.GetIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.GetIndexEndpoint] + + Attributes: + name (str): + Required. The name of the IndexEndpoint resource. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListIndexEndpointsRequest(proto.Message): + r"""Request message for + [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]. + + Attributes: + parent (str): + Required. The resource name of the Location from which to + list the IndexEndpoints. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Optional. An expression for filtering the results of the + request. For field names both snake_case and camelCase are + supported. + + - ``index_endpoint`` supports = and !=. ``index_endpoint`` + represents the IndexEndpoint ID, ie. the last segment of + the IndexEndpoint's + [resourcename][google.cloud.aiplatform.v1.IndexEndpoint.name]. + - ``display_name`` supports =, != and regex() (uses + `re2 `__ + syntax) + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality + ``labels.key:* or labels:key - key existence A key including a space must be quoted.``\ labels."a + key"\`. + + Some examples: + + - ``index_endpoint="1"`` + - ``display_name="myDisplayName"`` + - \`regex(display_name, "^A") -> The display name starts + with an A. + - ``labels.myKey="myValue"`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListIndexEndpointsResponse.next_page_token][google.cloud.aiplatform.v1.ListIndexEndpointsResponse.next_page_token] + of the previous + [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. Mask specifying which fields to + read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListIndexEndpointsResponse(proto.Message): + r"""Response message for + [IndexEndpointService.ListIndexEndpoints][google.cloud.aiplatform.v1.IndexEndpointService.ListIndexEndpoints]. + + Attributes: + index_endpoints (MutableSequence[google.cloud.aiplatform_v1.types.IndexEndpoint]): + List of IndexEndpoints in the requested page. + next_page_token (str): + A token to retrieve next page of results. Pass to + [ListIndexEndpointsRequest.page_token][google.cloud.aiplatform.v1.ListIndexEndpointsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + index_endpoints: MutableSequence[gca_index_endpoint.IndexEndpoint] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_index_endpoint.IndexEndpoint, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateIndexEndpointRequest(proto.Message): + r"""Request message for + [IndexEndpointService.UpdateIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.UpdateIndexEndpoint]. + + Attributes: + index_endpoint (google.cloud.aiplatform_v1.types.IndexEndpoint): + Required. The IndexEndpoint which replaces + the resource on the server. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask applies to the resource. See + [google.protobuf.FieldMask][google.protobuf.FieldMask]. + """ + + index_endpoint: gca_index_endpoint.IndexEndpoint = proto.Field( + proto.MESSAGE, + number=1, + message=gca_index_endpoint.IndexEndpoint, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteIndexEndpointRequest(proto.Message): + r"""Request message for + [IndexEndpointService.DeleteIndexEndpoint][google.cloud.aiplatform.v1.IndexEndpointService.DeleteIndexEndpoint]. + + Attributes: + name (str): + Required. The name of the IndexEndpoint resource to be + deleted. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class DeployIndexRequest(proto.Message): + r"""Request message for + [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]. + + Attributes: + index_endpoint (str): + Required. The name of the IndexEndpoint resource into which + to deploy an Index. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + deployed_index (google.cloud.aiplatform_v1.types.DeployedIndex): + Required. The DeployedIndex to be created + within the IndexEndpoint. + """ + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_index: gca_index_endpoint.DeployedIndex = proto.Field( + proto.MESSAGE, + number=2, + message=gca_index_endpoint.DeployedIndex, + ) + + +class DeployIndexResponse(proto.Message): + r"""Response message for + [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]. + + Attributes: + deployed_index (google.cloud.aiplatform_v1.types.DeployedIndex): + The DeployedIndex that had been deployed in + the IndexEndpoint. + """ + + deployed_index: gca_index_endpoint.DeployedIndex = proto.Field( + proto.MESSAGE, + number=1, + message=gca_index_endpoint.DeployedIndex, + ) + + +class DeployIndexOperationMetadata(proto.Message): + r"""Runtime operation information for + [IndexEndpointService.DeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.DeployIndex]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + deployed_index_id (str): + The unique index id specified by user + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + deployed_index_id: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UndeployIndexRequest(proto.Message): + r"""Request message for + [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]. + + Attributes: + index_endpoint (str): + Required. The name of the IndexEndpoint resource from which + to undeploy an Index. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + deployed_index_id (str): + Required. The ID of the DeployedIndex to be + undeployed from the IndexEndpoint. + """ + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_index_id: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UndeployIndexResponse(proto.Message): + r"""Response message for + [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]. + + """ + + +class UndeployIndexOperationMetadata(proto.Message): + r"""Runtime operation information for + [IndexEndpointService.UndeployIndex][google.cloud.aiplatform.v1.IndexEndpointService.UndeployIndex]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class MutateDeployedIndexRequest(proto.Message): + r"""Request message for + [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]. + + Attributes: + index_endpoint (str): + Required. The name of the IndexEndpoint resource into which + to deploy an Index. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + deployed_index (google.cloud.aiplatform_v1.types.DeployedIndex): + Required. The DeployedIndex to be updated within the + IndexEndpoint. Currently, the updatable fields are + [DeployedIndex.automatic_resources][google.cloud.aiplatform.v1.DeployedIndex.automatic_resources] + and + [DeployedIndex.dedicated_resources][google.cloud.aiplatform.v1.DeployedIndex.dedicated_resources] + """ + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_index: gca_index_endpoint.DeployedIndex = proto.Field( + proto.MESSAGE, + number=2, + message=gca_index_endpoint.DeployedIndex, + ) + + +class MutateDeployedIndexResponse(proto.Message): + r"""Response message for + [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]. + + Attributes: + deployed_index (google.cloud.aiplatform_v1.types.DeployedIndex): + The DeployedIndex that had been updated in + the IndexEndpoint. + """ + + deployed_index: gca_index_endpoint.DeployedIndex = proto.Field( + proto.MESSAGE, + number=1, + message=gca_index_endpoint.DeployedIndex, + ) + + +class MutateDeployedIndexOperationMetadata(proto.Message): + r"""Runtime operation information for + [IndexEndpointService.MutateDeployedIndex][google.cloud.aiplatform.v1.IndexEndpointService.MutateDeployedIndex]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + deployed_index_id (str): + The unique index id specified by user + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + deployed_index_id: str = proto.Field( + proto.STRING, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/io.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/io.py new file mode 100644 index 0000000000000000000000000000000000000000..ac11ade6521973e67c7ee63f7c077f9f111ec2d7 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/io.py @@ -0,0 +1,554 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import api_auth +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "AvroSource", + "CsvSource", + "GcsSource", + "GcsDestination", + "BigQuerySource", + "BigQueryDestination", + "VertexMultimodalDatasetSource", + "VertexMultimodalDatasetDestination", + "CsvDestination", + "TFRecordDestination", + "ContainerRegistryDestination", + "GoogleDriveSource", + "DirectUploadSource", + "SlackSource", + "JiraSource", + "SharePointSources", + }, +) + + +class AvroSource(proto.Message): + r"""The storage details for Avro input content. + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + Required. Google Cloud Storage location. + """ + + gcs_source: "GcsSource" = proto.Field( + proto.MESSAGE, + number=1, + message="GcsSource", + ) + + +class CsvSource(proto.Message): + r"""The storage details for CSV input content. + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + Required. Google Cloud Storage location. + """ + + gcs_source: "GcsSource" = proto.Field( + proto.MESSAGE, + number=1, + message="GcsSource", + ) + + +class GcsSource(proto.Message): + r"""The Google Cloud Storage location for the input content. + + Attributes: + uris (MutableSequence[str]): + Required. Google Cloud Storage URI(-s) to the + input file(s). May contain wildcards. For more + information on wildcards, see + https://cloud.google.com/storage/docs/wildcards. + """ + + uris: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class GcsDestination(proto.Message): + r"""The Google Cloud Storage location where the output is to be + written to. + + Attributes: + output_uri_prefix (str): + Required. Google Cloud Storage URI to output + directory. If the uri doesn't end with + '/', a '/' will be automatically appended. The + directory is created if it doesn't exist. + """ + + output_uri_prefix: str = proto.Field( + proto.STRING, + number=1, + ) + + +class BigQuerySource(proto.Message): + r"""The BigQuery location for the input content. + + Attributes: + input_uri (str): + Required. BigQuery URI to a table, up to 2000 characters + long. Accepted forms: + + - BigQuery path. For example: + ``bq://projectId.bqDatasetId.bqTableId``. + """ + + input_uri: str = proto.Field( + proto.STRING, + number=1, + ) + + +class BigQueryDestination(proto.Message): + r"""The BigQuery location for the output content. + + Attributes: + output_uri (str): + Required. BigQuery URI to a project or table, up to 2000 + characters long. + + When only the project is specified, the Dataset and Table is + created. When the full table reference is specified, the + Dataset must exist and table must not exist. + + Accepted forms: + + - BigQuery path. For example: ``bq://projectId`` or + ``bq://projectId.bqDatasetId`` or + ``bq://projectId.bqDatasetId.bqTableId``. + """ + + output_uri: str = proto.Field( + proto.STRING, + number=1, + ) + + +class VertexMultimodalDatasetSource(proto.Message): + r"""The Vertex Multimodal Dataset for the input content. + + Attributes: + dataset_name (str): + Required. The resource name of the Vertex Dataset. Format: + ``projects/{project}/locations/{location}/datasets/{dataset}`` + """ + + dataset_name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class VertexMultimodalDatasetDestination(proto.Message): + r"""The details for a Vertex Multimodal Dataset output. + + Attributes: + bigquery_destination (google.cloud.aiplatform_v1.types.BigQueryDestination): + Optional. The destination of the underlying + BigQuery table that will be created for the + output Multimodal Dataset. If not specified, the + BigQuery table will be created in a default + BigQuery dataset. + display_name (str): + Optional. Display name of the output dataset. + """ + + bigquery_destination: "BigQueryDestination" = proto.Field( + proto.MESSAGE, + number=1, + message="BigQueryDestination", + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + + +class CsvDestination(proto.Message): + r"""The storage details for CSV output content. + + Attributes: + gcs_destination (google.cloud.aiplatform_v1.types.GcsDestination): + Required. Google Cloud Storage location. + """ + + gcs_destination: "GcsDestination" = proto.Field( + proto.MESSAGE, + number=1, + message="GcsDestination", + ) + + +class TFRecordDestination(proto.Message): + r"""The storage details for TFRecord output content. + + Attributes: + gcs_destination (google.cloud.aiplatform_v1.types.GcsDestination): + Required. Google Cloud Storage location. + """ + + gcs_destination: "GcsDestination" = proto.Field( + proto.MESSAGE, + number=1, + message="GcsDestination", + ) + + +class ContainerRegistryDestination(proto.Message): + r"""The Container Registry location for the container image. + + Attributes: + output_uri (str): + Required. Container Registry URI of a container image. Only + Google Container Registry and Artifact Registry are + supported now. Accepted forms: + + - Google Container Registry path. For example: + ``gcr.io/projectId/imageName:tag``. + + - Artifact Registry path. For example: + ``us-central1-docker.pkg.dev/projectId/repoName/imageName:tag``. + + If a tag is not specified, "latest" will be used as the + default tag. + """ + + output_uri: str = proto.Field( + proto.STRING, + number=1, + ) + + +class GoogleDriveSource(proto.Message): + r"""The Google Drive location for the input content. + + Attributes: + resource_ids (MutableSequence[google.cloud.aiplatform_v1.types.GoogleDriveSource.ResourceId]): + Required. Google Drive resource IDs. + """ + + class ResourceId(proto.Message): + r"""The type and ID of the Google Drive resource. + + Attributes: + resource_type (google.cloud.aiplatform_v1.types.GoogleDriveSource.ResourceId.ResourceType): + Required. The type of the Google Drive + resource. + resource_id (str): + Required. The ID of the Google Drive + resource. + """ + + class ResourceType(proto.Enum): + r"""The type of the Google Drive resource. + + Values: + RESOURCE_TYPE_UNSPECIFIED (0): + Unspecified resource type. + RESOURCE_TYPE_FILE (1): + File resource type. + RESOURCE_TYPE_FOLDER (2): + Folder resource type. + """ + + RESOURCE_TYPE_UNSPECIFIED = 0 + RESOURCE_TYPE_FILE = 1 + RESOURCE_TYPE_FOLDER = 2 + + resource_type: "GoogleDriveSource.ResourceId.ResourceType" = proto.Field( + proto.ENUM, + number=1, + enum="GoogleDriveSource.ResourceId.ResourceType", + ) + resource_id: str = proto.Field( + proto.STRING, + number=2, + ) + + resource_ids: MutableSequence[ResourceId] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=ResourceId, + ) + + +class DirectUploadSource(proto.Message): + r"""The input content is encapsulated and uploaded in the + request. + + """ + + +class SlackSource(proto.Message): + r"""The Slack source for the ImportRagFilesRequest. + + Attributes: + channels (MutableSequence[google.cloud.aiplatform_v1.types.SlackSource.SlackChannels]): + Required. The Slack channels. + """ + + class SlackChannels(proto.Message): + r"""SlackChannels contains the Slack channels and corresponding + access token. + + Attributes: + channels (MutableSequence[google.cloud.aiplatform_v1.types.SlackSource.SlackChannels.SlackChannel]): + Required. The Slack channel IDs. + api_key_config (google.cloud.aiplatform_v1.types.ApiAuth.ApiKeyConfig): + Required. The SecretManager secret version + resource name (e.g. + projects/{project}/secrets/{secret}/versions/{version}) + storing the Slack channel access token that has + access to the slack channel IDs. See: + https://api.slack.com/tutorials/tracks/getting-a-token. + """ + + class SlackChannel(proto.Message): + r"""SlackChannel contains the Slack channel ID and the time range + to import. + + Attributes: + channel_id (str): + Required. The Slack channel ID. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. The starting timestamp for messages + to import. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. The ending timestamp for messages + to import. + """ + + channel_id: str = proto.Field( + proto.STRING, + number=1, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + + channels: MutableSequence["SlackSource.SlackChannels.SlackChannel"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message="SlackSource.SlackChannels.SlackChannel", + ) + ) + api_key_config: api_auth.ApiAuth.ApiKeyConfig = proto.Field( + proto.MESSAGE, + number=3, + message=api_auth.ApiAuth.ApiKeyConfig, + ) + + channels: MutableSequence[SlackChannels] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=SlackChannels, + ) + + +class JiraSource(proto.Message): + r"""The Jira source for the ImportRagFilesRequest. + + Attributes: + jira_queries (MutableSequence[google.cloud.aiplatform_v1.types.JiraSource.JiraQueries]): + Required. The Jira queries. + """ + + class JiraQueries(proto.Message): + r"""JiraQueries contains the Jira queries and corresponding + authentication. + + Attributes: + projects (MutableSequence[str]): + A list of Jira projects to import in their + entirety. + custom_queries (MutableSequence[str]): + A list of custom Jira queries to import. For + information about JQL (Jira Query Language), see + https://support.atlassian.com/jira-service-management-cloud/docs/use-advanced-search-with-jira-query-language-jql/ + email (str): + Required. The Jira email address. + server_uri (str): + Required. The Jira server URI. + api_key_config (google.cloud.aiplatform_v1.types.ApiAuth.ApiKeyConfig): + Required. The SecretManager secret version resource name + (e.g. + projects/{project}/secrets/{secret}/versions/{version}) + storing the Jira API key. See `Manage API tokens for your + Atlassian + account `__. + """ + + projects: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + custom_queries: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + email: str = proto.Field( + proto.STRING, + number=5, + ) + server_uri: str = proto.Field( + proto.STRING, + number=6, + ) + api_key_config: api_auth.ApiAuth.ApiKeyConfig = proto.Field( + proto.MESSAGE, + number=7, + message=api_auth.ApiAuth.ApiKeyConfig, + ) + + jira_queries: MutableSequence[JiraQueries] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=JiraQueries, + ) + + +class SharePointSources(proto.Message): + r"""The SharePointSources to pass to ImportRagFiles. + + Attributes: + share_point_sources (MutableSequence[google.cloud.aiplatform_v1.types.SharePointSources.SharePointSource]): + The SharePoint sources. + """ + + class SharePointSource(proto.Message): + r"""An individual SharePointSource. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + sharepoint_folder_path (str): + The path of the SharePoint folder to download + from. + + This field is a member of `oneof`_ ``folder_source``. + sharepoint_folder_id (str): + The ID of the SharePoint folder to download + from. + + This field is a member of `oneof`_ ``folder_source``. + drive_name (str): + The name of the drive to download from. + + This field is a member of `oneof`_ ``drive_source``. + drive_id (str): + The ID of the drive to download from. + + This field is a member of `oneof`_ ``drive_source``. + client_id (str): + The Application ID for the app registered in + Microsoft Azure Portal. The application must + also be configured with MS Graph permissions + "Files.ReadAll", "Sites.ReadAll" and + BrowserSiteLists.Read.All. + client_secret (google.cloud.aiplatform_v1.types.ApiAuth.ApiKeyConfig): + The application secret for the app registered + in Azure. + tenant_id (str): + Unique identifier of the Azure Active + Directory Instance. + sharepoint_site_name (str): + The name of the SharePoint site to download + from. This can be the site name or the site id. + file_id (str): + Output only. The SharePoint file id. Output + only. + """ + + sharepoint_folder_path: str = proto.Field( + proto.STRING, + number=5, + oneof="folder_source", + ) + sharepoint_folder_id: str = proto.Field( + proto.STRING, + number=6, + oneof="folder_source", + ) + drive_name: str = proto.Field( + proto.STRING, + number=7, + oneof="drive_source", + ) + drive_id: str = proto.Field( + proto.STRING, + number=8, + oneof="drive_source", + ) + client_id: str = proto.Field( + proto.STRING, + number=1, + ) + client_secret: api_auth.ApiAuth.ApiKeyConfig = proto.Field( + proto.MESSAGE, + number=2, + message=api_auth.ApiAuth.ApiKeyConfig, + ) + tenant_id: str = proto.Field( + proto.STRING, + number=3, + ) + sharepoint_site_name: str = proto.Field( + proto.STRING, + number=4, + ) + file_id: str = proto.Field( + proto.STRING, + number=9, + ) + + share_point_sources: MutableSequence[SharePointSource] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=SharePointSource, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_service.py new file mode 100644 index 0000000000000000000000000000000000000000..c4fa5aca2af9159d4cfa26225efc588cf3852b07 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_service.py @@ -0,0 +1,1419 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import ( + batch_prediction_job as gca_batch_prediction_job, +) +from google.cloud.aiplatform_v1.types import custom_job as gca_custom_job +from google.cloud.aiplatform_v1.types import data_labeling_job as gca_data_labeling_job +from google.cloud.aiplatform_v1.types import ( + hyperparameter_tuning_job as gca_hyperparameter_tuning_job, +) +from google.cloud.aiplatform_v1.types import ( + model_deployment_monitoring_job as gca_model_deployment_monitoring_job, +) +from google.cloud.aiplatform_v1.types import nas_job as gca_nas_job +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateCustomJobRequest", + "GetCustomJobRequest", + "ListCustomJobsRequest", + "ListCustomJobsResponse", + "DeleteCustomJobRequest", + "CancelCustomJobRequest", + "CreateDataLabelingJobRequest", + "GetDataLabelingJobRequest", + "ListDataLabelingJobsRequest", + "ListDataLabelingJobsResponse", + "DeleteDataLabelingJobRequest", + "CancelDataLabelingJobRequest", + "CreateHyperparameterTuningJobRequest", + "GetHyperparameterTuningJobRequest", + "ListHyperparameterTuningJobsRequest", + "ListHyperparameterTuningJobsResponse", + "DeleteHyperparameterTuningJobRequest", + "CancelHyperparameterTuningJobRequest", + "CreateNasJobRequest", + "GetNasJobRequest", + "ListNasJobsRequest", + "ListNasJobsResponse", + "DeleteNasJobRequest", + "CancelNasJobRequest", + "GetNasTrialDetailRequest", + "ListNasTrialDetailsRequest", + "ListNasTrialDetailsResponse", + "CreateBatchPredictionJobRequest", + "GetBatchPredictionJobRequest", + "ListBatchPredictionJobsRequest", + "ListBatchPredictionJobsResponse", + "DeleteBatchPredictionJobRequest", + "CancelBatchPredictionJobRequest", + "CreateModelDeploymentMonitoringJobRequest", + "SearchModelDeploymentMonitoringStatsAnomaliesRequest", + "SearchModelDeploymentMonitoringStatsAnomaliesResponse", + "GetModelDeploymentMonitoringJobRequest", + "ListModelDeploymentMonitoringJobsRequest", + "ListModelDeploymentMonitoringJobsResponse", + "UpdateModelDeploymentMonitoringJobRequest", + "DeleteModelDeploymentMonitoringJobRequest", + "PauseModelDeploymentMonitoringJobRequest", + "ResumeModelDeploymentMonitoringJobRequest", + "UpdateModelDeploymentMonitoringJobOperationMetadata", + }, +) + + +class CreateCustomJobRequest(proto.Message): + r"""Request message for + [JobService.CreateCustomJob][google.cloud.aiplatform.v1.JobService.CreateCustomJob]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + CustomJob in. Format: + ``projects/{project}/locations/{location}`` + custom_job (google.cloud.aiplatform_v1.types.CustomJob): + Required. The CustomJob to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + custom_job: gca_custom_job.CustomJob = proto.Field( + proto.MESSAGE, + number=2, + message=gca_custom_job.CustomJob, + ) + + +class GetCustomJobRequest(proto.Message): + r"""Request message for + [JobService.GetCustomJob][google.cloud.aiplatform.v1.JobService.GetCustomJob]. + + Attributes: + name (str): + Required. The name of the CustomJob resource. Format: + ``projects/{project}/locations/{location}/customJobs/{custom_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListCustomJobsRequest(proto.Message): + r"""Request message for + [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + CustomJobs from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListCustomJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListCustomJobsResponse.next_page_token] + of the previous + [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListCustomJobsResponse(proto.Message): + r"""Response message for + [JobService.ListCustomJobs][google.cloud.aiplatform.v1.JobService.ListCustomJobs] + + Attributes: + custom_jobs (MutableSequence[google.cloud.aiplatform_v1.types.CustomJob]): + List of CustomJobs in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListCustomJobsRequest.page_token][google.cloud.aiplatform.v1.ListCustomJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + custom_jobs: MutableSequence[gca_custom_job.CustomJob] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_custom_job.CustomJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteCustomJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteCustomJob][google.cloud.aiplatform.v1.JobService.DeleteCustomJob]. + + Attributes: + name (str): + Required. The name of the CustomJob resource to be deleted. + Format: + ``projects/{project}/locations/{location}/customJobs/{custom_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelCustomJobRequest(proto.Message): + r"""Request message for + [JobService.CancelCustomJob][google.cloud.aiplatform.v1.JobService.CancelCustomJob]. + + Attributes: + name (str): + Required. The name of the CustomJob to cancel. Format: + ``projects/{project}/locations/{location}/customJobs/{custom_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateDataLabelingJobRequest(proto.Message): + r"""Request message for + [JobService.CreateDataLabelingJob][google.cloud.aiplatform.v1.JobService.CreateDataLabelingJob]. + + Attributes: + parent (str): + Required. The parent of the DataLabelingJob. Format: + ``projects/{project}/locations/{location}`` + data_labeling_job (google.cloud.aiplatform_v1.types.DataLabelingJob): + Required. The DataLabelingJob to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + data_labeling_job: gca_data_labeling_job.DataLabelingJob = proto.Field( + proto.MESSAGE, + number=2, + message=gca_data_labeling_job.DataLabelingJob, + ) + + +class GetDataLabelingJobRequest(proto.Message): + r"""Request message for + [JobService.GetDataLabelingJob][google.cloud.aiplatform.v1.JobService.GetDataLabelingJob]. + + Attributes: + name (str): + Required. The name of the DataLabelingJob. Format: + ``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListDataLabelingJobsRequest(proto.Message): + r"""Request message for + [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]. + + Attributes: + parent (str): + Required. The parent of the DataLabelingJob. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. FieldMask represents a + set of symbolic field paths. For example, the mask can be + ``paths: "name"``. The "name" here is a field in + DataLabelingJob. If this field is not set, all fields of the + DataLabelingJob are returned. + order_by (str): + A comma-separated list of fields to order by, sorted in + ascending order by default. Use ``desc`` after a field name + for descending. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListDataLabelingJobsResponse(proto.Message): + r"""Response message for + [JobService.ListDataLabelingJobs][google.cloud.aiplatform.v1.JobService.ListDataLabelingJobs]. + + Attributes: + data_labeling_jobs (MutableSequence[google.cloud.aiplatform_v1.types.DataLabelingJob]): + A list of DataLabelingJobs that matches the + specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + data_labeling_jobs: MutableSequence[gca_data_labeling_job.DataLabelingJob] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_data_labeling_job.DataLabelingJob, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteDataLabelingJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteDataLabelingJob][google.cloud.aiplatform.v1.JobService.DeleteDataLabelingJob]. + + Attributes: + name (str): + Required. The name of the DataLabelingJob to be deleted. + Format: + ``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelDataLabelingJobRequest(proto.Message): + r"""Request message for + [JobService.CancelDataLabelingJob][google.cloud.aiplatform.v1.JobService.CancelDataLabelingJob]. + + Attributes: + name (str): + Required. The name of the DataLabelingJob. Format: + ``projects/{project}/locations/{location}/dataLabelingJobs/{data_labeling_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateHyperparameterTuningJobRequest(proto.Message): + r"""Request message for + [JobService.CreateHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CreateHyperparameterTuningJob]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + HyperparameterTuningJob in. Format: + ``projects/{project}/locations/{location}`` + hyperparameter_tuning_job (google.cloud.aiplatform_v1.types.HyperparameterTuningJob): + Required. The HyperparameterTuningJob to + create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + hyperparameter_tuning_job: gca_hyperparameter_tuning_job.HyperparameterTuningJob = ( + proto.Field( + proto.MESSAGE, + number=2, + message=gca_hyperparameter_tuning_job.HyperparameterTuningJob, + ) + ) + + +class GetHyperparameterTuningJobRequest(proto.Message): + r"""Request message for + [JobService.GetHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.GetHyperparameterTuningJob]. + + Attributes: + name (str): + Required. The name of the HyperparameterTuningJob resource. + Format: + ``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListHyperparameterTuningJobsRequest(proto.Message): + r"""Request message for + [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + HyperparameterTuningJobs from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListHyperparameterTuningJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsResponse.next_page_token] + of the previous + [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListHyperparameterTuningJobsResponse(proto.Message): + r"""Response message for + [JobService.ListHyperparameterTuningJobs][google.cloud.aiplatform.v1.JobService.ListHyperparameterTuningJobs] + + Attributes: + hyperparameter_tuning_jobs (MutableSequence[google.cloud.aiplatform_v1.types.HyperparameterTuningJob]): + List of HyperparameterTuningJobs in the requested page. + [HyperparameterTuningJob.trials][google.cloud.aiplatform.v1.HyperparameterTuningJob.trials] + of the jobs will be not be returned. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListHyperparameterTuningJobsRequest.page_token][google.cloud.aiplatform.v1.ListHyperparameterTuningJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + hyperparameter_tuning_jobs: MutableSequence[ + gca_hyperparameter_tuning_job.HyperparameterTuningJob + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_hyperparameter_tuning_job.HyperparameterTuningJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteHyperparameterTuningJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.DeleteHyperparameterTuningJob]. + + Attributes: + name (str): + Required. The name of the HyperparameterTuningJob resource + to be deleted. Format: + ``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelHyperparameterTuningJobRequest(proto.Message): + r"""Request message for + [JobService.CancelHyperparameterTuningJob][google.cloud.aiplatform.v1.JobService.CancelHyperparameterTuningJob]. + + Attributes: + name (str): + Required. The name of the HyperparameterTuningJob to cancel. + Format: + ``projects/{project}/locations/{location}/hyperparameterTuningJobs/{hyperparameter_tuning_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateNasJobRequest(proto.Message): + r"""Request message for + [JobService.CreateNasJob][google.cloud.aiplatform.v1.JobService.CreateNasJob]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + NasJob in. Format: + ``projects/{project}/locations/{location}`` + nas_job (google.cloud.aiplatform_v1.types.NasJob): + Required. The NasJob to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + nas_job: gca_nas_job.NasJob = proto.Field( + proto.MESSAGE, + number=2, + message=gca_nas_job.NasJob, + ) + + +class GetNasJobRequest(proto.Message): + r"""Request message for + [JobService.GetNasJob][google.cloud.aiplatform.v1.JobService.GetNasJob]. + + Attributes: + name (str): + Required. The name of the NasJob resource. Format: + ``projects/{project}/locations/{location}/nasJobs/{nas_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListNasJobsRequest(proto.Message): + r"""Request message for + [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + NasJobs from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListNasJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasJobsResponse.next_page_token] + of the previous + [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListNasJobsResponse(proto.Message): + r"""Response message for + [JobService.ListNasJobs][google.cloud.aiplatform.v1.JobService.ListNasJobs] + + Attributes: + nas_jobs (MutableSequence[google.cloud.aiplatform_v1.types.NasJob]): + List of NasJobs in the requested page. + [NasJob.nas_job_output][google.cloud.aiplatform.v1.NasJob.nas_job_output] + of the jobs will not be returned. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListNasJobsRequest.page_token][google.cloud.aiplatform.v1.ListNasJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + nas_jobs: MutableSequence[gca_nas_job.NasJob] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_nas_job.NasJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteNasJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteNasJob][google.cloud.aiplatform.v1.JobService.DeleteNasJob]. + + Attributes: + name (str): + Required. The name of the NasJob resource to be deleted. + Format: + ``projects/{project}/locations/{location}/nasJobs/{nas_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelNasJobRequest(proto.Message): + r"""Request message for + [JobService.CancelNasJob][google.cloud.aiplatform.v1.JobService.CancelNasJob]. + + Attributes: + name (str): + Required. The name of the NasJob to cancel. Format: + ``projects/{project}/locations/{location}/nasJobs/{nas_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class GetNasTrialDetailRequest(proto.Message): + r"""Request message for + [JobService.GetNasTrialDetail][google.cloud.aiplatform.v1.JobService.GetNasTrialDetail]. + + Attributes: + name (str): + Required. The name of the NasTrialDetail resource. Format: + ``projects/{project}/locations/{location}/nasJobs/{nas_job}/nasTrialDetails/{nas_trial_detail}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListNasTrialDetailsRequest(proto.Message): + r"""Request message for + [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails]. + + Attributes: + parent (str): + Required. The name of the NasJob resource. Format: + ``projects/{project}/locations/{location}/nasJobs/{nas_job}`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListNasTrialDetailsResponse.next_page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsResponse.next_page_token] + of the previous + [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails] + call. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListNasTrialDetailsResponse(proto.Message): + r"""Response message for + [JobService.ListNasTrialDetails][google.cloud.aiplatform.v1.JobService.ListNasTrialDetails] + + Attributes: + nas_trial_details (MutableSequence[google.cloud.aiplatform_v1.types.NasTrialDetail]): + List of top NasTrials in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListNasTrialDetailsRequest.page_token][google.cloud.aiplatform.v1.ListNasTrialDetailsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + nas_trial_details: MutableSequence[gca_nas_job.NasTrialDetail] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_nas_job.NasTrialDetail, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class CreateBatchPredictionJobRequest(proto.Message): + r"""Request message for + [JobService.CreateBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CreateBatchPredictionJob]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + BatchPredictionJob in. Format: + ``projects/{project}/locations/{location}`` + batch_prediction_job (google.cloud.aiplatform_v1.types.BatchPredictionJob): + Required. The BatchPredictionJob to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + batch_prediction_job: gca_batch_prediction_job.BatchPredictionJob = proto.Field( + proto.MESSAGE, + number=2, + message=gca_batch_prediction_job.BatchPredictionJob, + ) + + +class GetBatchPredictionJobRequest(proto.Message): + r"""Request message for + [JobService.GetBatchPredictionJob][google.cloud.aiplatform.v1.JobService.GetBatchPredictionJob]. + + Attributes: + name (str): + Required. The name of the BatchPredictionJob resource. + Format: + ``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListBatchPredictionJobsRequest(proto.Message): + r"""Request message for + [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + BatchPredictionJobs from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``model_display_name`` supports ``=``, ``!=`` comparisons. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListBatchPredictionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsResponse.next_page_token] + of the previous + [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListBatchPredictionJobsResponse(proto.Message): + r"""Response message for + [JobService.ListBatchPredictionJobs][google.cloud.aiplatform.v1.JobService.ListBatchPredictionJobs] + + Attributes: + batch_prediction_jobs (MutableSequence[google.cloud.aiplatform_v1.types.BatchPredictionJob]): + List of BatchPredictionJobs in the requested + page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListBatchPredictionJobsRequest.page_token][google.cloud.aiplatform.v1.ListBatchPredictionJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + batch_prediction_jobs: MutableSequence[ + gca_batch_prediction_job.BatchPredictionJob + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_batch_prediction_job.BatchPredictionJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteBatchPredictionJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteBatchPredictionJob][google.cloud.aiplatform.v1.JobService.DeleteBatchPredictionJob]. + + Attributes: + name (str): + Required. The name of the BatchPredictionJob resource to be + deleted. Format: + ``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelBatchPredictionJobRequest(proto.Message): + r"""Request message for + [JobService.CancelBatchPredictionJob][google.cloud.aiplatform.v1.JobService.CancelBatchPredictionJob]. + + Attributes: + name (str): + Required. The name of the BatchPredictionJob to cancel. + Format: + ``projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.CreateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.CreateModelDeploymentMonitoringJob]. + + Attributes: + parent (str): + Required. The parent of the ModelDeploymentMonitoringJob. + Format: ``projects/{project}/locations/{location}`` + model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob): + Required. The ModelDeploymentMonitoringJob to + create + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + model_deployment_monitoring_job: ( + gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob + ) = proto.Field( + proto.MESSAGE, + number=2, + message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob, + ) + + +class SearchModelDeploymentMonitoringStatsAnomaliesRequest(proto.Message): + r"""Request message for + [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]. + + Attributes: + model_deployment_monitoring_job (str): + Required. ModelDeploymentMonitoring Job resource name. + Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + deployed_model_id (str): + Required. The DeployedModel ID of the + [ModelDeploymentMonitoringObjectiveConfig.deployed_model_id]. + feature_display_name (str): + The feature display name. If specified, only return the + stats belonging to this feature. Format: + [ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.feature_display_name], + example: "user_destination". + objectives (MutableSequence[google.cloud.aiplatform_v1.types.SearchModelDeploymentMonitoringStatsAnomaliesRequest.StatsAnomaliesObjective]): + Required. Objectives of the stats to + retrieve. + page_size (int): + The standard list page size. + page_token (str): + A page token received from a previous + [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies] + call. + start_time (google.protobuf.timestamp_pb2.Timestamp): + The earliest timestamp of stats being + generated. If not set, indicates fetching stats + till the earliest possible one. + end_time (google.protobuf.timestamp_pb2.Timestamp): + The latest timestamp of stats being + generated. If not set, indicates feching stats + till the latest possible one. + """ + + class StatsAnomaliesObjective(proto.Message): + r"""Stats requested for specific objective. + + Attributes: + type_ (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringObjectiveType): + + top_feature_count (int): + If set, all attribution scores between + [SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.start_time] + and + [SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time][google.cloud.aiplatform.v1.SearchModelDeploymentMonitoringStatsAnomaliesRequest.end_time] + are fetched, and page token doesn't take effect in this + case. Only used to retrieve attribution score for the top + Features which has the highest attribution score in the + latest monitoring run. + """ + + type_: ( + gca_model_deployment_monitoring_job.ModelDeploymentMonitoringObjectiveType + ) = proto.Field( + proto.ENUM, + number=1, + enum=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringObjectiveType, + ) + top_feature_count: int = proto.Field( + proto.INT32, + number=4, + ) + + model_deployment_monitoring_job: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=2, + ) + feature_display_name: str = proto.Field( + proto.STRING, + number=3, + ) + objectives: MutableSequence[StatsAnomaliesObjective] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=StatsAnomaliesObjective, + ) + page_size: int = proto.Field( + proto.INT32, + number=5, + ) + page_token: str = proto.Field( + proto.STRING, + number=6, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + + +class SearchModelDeploymentMonitoringStatsAnomaliesResponse(proto.Message): + r"""Response message for + [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies]. + + Attributes: + monitoring_stats (MutableSequence[google.cloud.aiplatform_v1.types.ModelMonitoringStatsAnomalies]): + Stats retrieved for requested objectives. There are at most + 1000 + [ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies.prediction_stats] + in the response. + next_page_token (str): + The page token that can be used by the next + [JobService.SearchModelDeploymentMonitoringStatsAnomalies][google.cloud.aiplatform.v1.JobService.SearchModelDeploymentMonitoringStatsAnomalies] + call. + """ + + @property + def raw_page(self): + return self + + monitoring_stats: MutableSequence[ + gca_model_deployment_monitoring_job.ModelMonitoringStatsAnomalies + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_model_deployment_monitoring_job.ModelMonitoringStatsAnomalies, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class GetModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.GetModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.GetModelDeploymentMonitoringJob]. + + Attributes: + name (str): + Required. The resource name of the + ModelDeploymentMonitoringJob. Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListModelDeploymentMonitoringJobsRequest(proto.Message): + r"""Request message for + [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs]. + + Attributes: + parent (str): + Required. The parent of the ModelDeploymentMonitoringJob. + Format: ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="JOB_STATE_SUCCEEDED" AND display_name:"my_job_*"`` + - ``state!="JOB_STATE_FAILED" OR display_name="my_job"`` + - ``NOT display_name="my_job"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``labels.keyA=valueA`` + - ``labels.keyB:*`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListModelDeploymentMonitoringJobsResponse(proto.Message): + r"""Response message for + [JobService.ListModelDeploymentMonitoringJobs][google.cloud.aiplatform.v1.JobService.ListModelDeploymentMonitoringJobs]. + + Attributes: + model_deployment_monitoring_jobs (MutableSequence[google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob]): + A list of ModelDeploymentMonitoringJobs that + matches the specified filter in the request. + next_page_token (str): + The standard List next-page token. + """ + + @property + def raw_page(self): + return self + + model_deployment_monitoring_jobs: MutableSequence[ + gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob]. + + Attributes: + model_deployment_monitoring_job (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob): + Required. The model monitoring configuration + which replaces the resource on the server. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask is used to specify the fields to + be overwritten in the ModelDeploymentMonitoringJob resource + by the update. The fields specified in the update_mask are + relative to the resource, not the full request. A field will + be overwritten if it is in the mask. If the user does not + provide a mask then only the non-empty fields present in the + request will be overwritten. Set the update_mask to ``*`` to + override all fields. For the objective config, the user can + either provide the update mask for + model_deployment_monitoring_objective_configs or any + combination of its nested fields, such as: + model_deployment_monitoring_objective_configs.objective_config.training_dataset. + + Updatable fields: + + - ``display_name`` + - ``model_deployment_monitoring_schedule_config`` + - ``model_monitoring_alert_config`` + - ``logging_sampling_strategy`` + - ``labels`` + - ``log_ttl`` + - ``enable_monitoring_pipeline_logs`` . and + - ``model_deployment_monitoring_objective_configs`` . or + - ``model_deployment_monitoring_objective_configs.objective_config.training_dataset`` + - ``model_deployment_monitoring_objective_configs.objective_config.training_prediction_skew_detection_config`` + - ``model_deployment_monitoring_objective_configs.objective_config.prediction_drift_detection_config`` + """ + + model_deployment_monitoring_job: ( + gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob + ) = proto.Field( + proto.MESSAGE, + number=1, + message=gca_model_deployment_monitoring_job.ModelDeploymentMonitoringJob, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class DeleteModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.DeleteModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.DeleteModelDeploymentMonitoringJob]. + + Attributes: + name (str): + Required. The resource name of the model monitoring job to + delete. Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class PauseModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.PauseModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.PauseModelDeploymentMonitoringJob]. + + Attributes: + name (str): + Required. The resource name of the + ModelDeploymentMonitoringJob to pause. Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ResumeModelDeploymentMonitoringJobRequest(proto.Message): + r"""Request message for + [JobService.ResumeModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.ResumeModelDeploymentMonitoringJob]. + + Attributes: + name (str): + Required. The resource name of the + ModelDeploymentMonitoringJob to resume. Format: + ``projects/{project}/locations/{location}/modelDeploymentMonitoringJobs/{model_deployment_monitoring_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdateModelDeploymentMonitoringJobOperationMetadata(proto.Message): + r"""Runtime operation information for + [JobService.UpdateModelDeploymentMonitoringJob][google.cloud.aiplatform.v1.JobService.UpdateModelDeploymentMonitoringJob]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_state.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_state.py new file mode 100644 index 0000000000000000000000000000000000000000..ea784a89fd846c1dff174b9c226eb44abbfba1d0 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/job_state.py @@ -0,0 +1,81 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "JobState", + }, +) + + +class JobState(proto.Enum): + r"""Describes the state of a job. + + Values: + JOB_STATE_UNSPECIFIED (0): + The job state is unspecified. + JOB_STATE_QUEUED (1): + The job has been just created or resumed and + processing has not yet begun. + JOB_STATE_PENDING (2): + The service is preparing to run the job. + JOB_STATE_RUNNING (3): + The job is in progress. + JOB_STATE_SUCCEEDED (4): + The job completed successfully. + JOB_STATE_FAILED (5): + The job failed. + JOB_STATE_CANCELLING (6): + The job is being cancelled. From this state the job may only + go to either ``JOB_STATE_SUCCEEDED``, ``JOB_STATE_FAILED`` + or ``JOB_STATE_CANCELLED``. + JOB_STATE_CANCELLED (7): + The job has been cancelled. + JOB_STATE_PAUSED (8): + The job has been stopped, and can be resumed. + JOB_STATE_EXPIRED (9): + The job has expired. + JOB_STATE_UPDATING (10): + The job is being updated. Only jobs in the ``RUNNING`` state + can be updated. After updating, the job goes back to the + ``RUNNING`` state. + JOB_STATE_PARTIALLY_SUCCEEDED (11): + The job is partially succeeded, some results + may be missing due to errors. + """ + + JOB_STATE_UNSPECIFIED = 0 + JOB_STATE_QUEUED = 1 + JOB_STATE_PENDING = 2 + JOB_STATE_RUNNING = 3 + JOB_STATE_SUCCEEDED = 4 + JOB_STATE_FAILED = 5 + JOB_STATE_CANCELLING = 6 + JOB_STATE_CANCELLED = 7 + JOB_STATE_PAUSED = 8 + JOB_STATE_EXPIRED = 9 + JOB_STATE_UPDATING = 10 + JOB_STATE_PARTIALLY_SUCCEEDED = 11 + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/lineage_subgraph.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/lineage_subgraph.py new file mode 100644 index 0000000000000000000000000000000000000000..920918c8f1c217b2600c894cdac63015af58cc4d --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/lineage_subgraph.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import artifact +from google.cloud.aiplatform_v1.types import event +from google.cloud.aiplatform_v1.types import execution + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "LineageSubgraph", + }, +) + + +class LineageSubgraph(proto.Message): + r"""A subgraph of the overall lineage graph. Event edges connect + Artifact and Execution nodes. + + Attributes: + artifacts (MutableSequence[google.cloud.aiplatform_v1.types.Artifact]): + The Artifact nodes in the subgraph. + executions (MutableSequence[google.cloud.aiplatform_v1.types.Execution]): + The Execution nodes in the subgraph. + events (MutableSequence[google.cloud.aiplatform_v1.types.Event]): + The Event edges between Artifacts and + Executions in the subgraph. + """ + + artifacts: MutableSequence[artifact.Artifact] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=artifact.Artifact, + ) + executions: MutableSequence[execution.Execution] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=execution.Execution, + ) + events: MutableSequence[event.Event] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=event.Event, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/match_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/match_service.py new file mode 100644 index 0000000000000000000000000000000000000000..0247f6f142ed9dcef7879385194ae97ec8236d33 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/match_service.py @@ -0,0 +1,285 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import index + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "FindNeighborsRequest", + "FindNeighborsResponse", + "ReadIndexDatapointsRequest", + "ReadIndexDatapointsResponse", + }, +) + + +class FindNeighborsRequest(proto.Message): + r"""The request message for + [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors]. + + Attributes: + index_endpoint (str): + Required. The name of the index endpoint. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + deployed_index_id (str): + The ID of the DeployedIndex that will serve the request. + This request is sent to a specific IndexEndpoint, as per the + IndexEndpoint.network. That IndexEndpoint also has + IndexEndpoint.deployed_indexes, and each such index has a + DeployedIndex.id field. The value of the field below must + equal one of the DeployedIndex.id fields of the + IndexEndpoint that is being called for this request. + queries (MutableSequence[google.cloud.aiplatform_v1.types.FindNeighborsRequest.Query]): + The list of queries. + return_full_datapoint (bool): + If set to true, the full datapoints + (including all vector values and restricts) of + the nearest neighbors are returned. Note that + returning full datapoint will significantly + increase the latency and cost of the query. + """ + + class Query(proto.Message): + r"""A query to find a number of the nearest neighbors (most + similar vectors) of a vector. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rrf (google.cloud.aiplatform_v1.types.FindNeighborsRequest.Query.RRF): + Optional. Represents RRF algorithm that + combines search results. + + This field is a member of `oneof`_ ``ranking``. + datapoint (google.cloud.aiplatform_v1.types.IndexDatapoint): + Required. The datapoint/vector whose nearest + neighbors should be searched for. + neighbor_count (int): + The number of nearest neighbors to be + retrieved from database for each query. If not + set, will use the default from the service + configuration + (https://cloud.google.com/vertex-ai/docs/matching-engine/configuring-indexes#nearest-neighbor-search-config). + per_crowding_attribute_neighbor_count (int): + Crowding is a constraint on a neighbor list produced by + nearest neighbor search requiring that no more than some + value k' of the k neighbors returned have the same value of + crowding_attribute. It's used for improving result + diversity. This field is the maximum number of matches with + the same crowding tag. + approximate_neighbor_count (int): + The number of neighbors to find via + approximate search before exact reordering is + performed. If not set, the default value from + scam config is used; if set, this value must be + > 0. + fraction_leaf_nodes_to_search_override (float): + The fraction of the number of leaves to search, set at query + time allows user to tune search performance. This value + increase result in both search accuracy and latency + increase. The value should be between 0.0 and 1.0. If not + set or set to 0.0, query uses the default value specified in + NearestNeighborSearchConfig.TreeAHConfig.fraction_leaf_nodes_to_search. + """ + + class RRF(proto.Message): + r"""Parameters for RRF algorithm that combines search results. + + Attributes: + alpha (float): + Required. Users can provide an alpha value to + give more weight to dense vs sparse results. For + example, if the alpha is 0, we only return + sparse and if the alpha is 1, we only return + dense. + """ + + alpha: float = proto.Field( + proto.FLOAT, + number=1, + ) + + rrf: "FindNeighborsRequest.Query.RRF" = proto.Field( + proto.MESSAGE, + number=6, + oneof="ranking", + message="FindNeighborsRequest.Query.RRF", + ) + datapoint: index.IndexDatapoint = proto.Field( + proto.MESSAGE, + number=1, + message=index.IndexDatapoint, + ) + neighbor_count: int = proto.Field( + proto.INT32, + number=2, + ) + per_crowding_attribute_neighbor_count: int = proto.Field( + proto.INT32, + number=3, + ) + approximate_neighbor_count: int = proto.Field( + proto.INT32, + number=4, + ) + fraction_leaf_nodes_to_search_override: float = proto.Field( + proto.DOUBLE, + number=5, + ) + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_index_id: str = proto.Field( + proto.STRING, + number=2, + ) + queries: MutableSequence[Query] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=Query, + ) + return_full_datapoint: bool = proto.Field( + proto.BOOL, + number=4, + ) + + +class FindNeighborsResponse(proto.Message): + r"""The response message for + [MatchService.FindNeighbors][google.cloud.aiplatform.v1.MatchService.FindNeighbors]. + + Attributes: + nearest_neighbors (MutableSequence[google.cloud.aiplatform_v1.types.FindNeighborsResponse.NearestNeighbors]): + The nearest neighbors of the query + datapoints. + """ + + class Neighbor(proto.Message): + r"""A neighbor of the query vector. + + Attributes: + datapoint (google.cloud.aiplatform_v1.types.IndexDatapoint): + The datapoint of the neighbor. Note that full datapoints are + returned only when "return_full_datapoint" is set to true. + Otherwise, only the "datapoint_id" and "crowding_tag" fields + are populated. + distance (float): + The distance between the neighbor and the + dense embedding query. + sparse_distance (float): + The distance between the neighbor and the query + sparse_embedding. + """ + + datapoint: index.IndexDatapoint = proto.Field( + proto.MESSAGE, + number=1, + message=index.IndexDatapoint, + ) + distance: float = proto.Field( + proto.DOUBLE, + number=2, + ) + sparse_distance: float = proto.Field( + proto.DOUBLE, + number=3, + ) + + class NearestNeighbors(proto.Message): + r"""Nearest neighbors for one query. + + Attributes: + id (str): + The ID of the query datapoint. + neighbors (MutableSequence[google.cloud.aiplatform_v1.types.FindNeighborsResponse.Neighbor]): + All its neighbors. + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + neighbors: MutableSequence["FindNeighborsResponse.Neighbor"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=2, + message="FindNeighborsResponse.Neighbor", + ) + ) + + nearest_neighbors: MutableSequence[NearestNeighbors] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=NearestNeighbors, + ) + + +class ReadIndexDatapointsRequest(proto.Message): + r"""The request message for + [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]. + + Attributes: + index_endpoint (str): + Required. The name of the index endpoint. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + deployed_index_id (str): + The ID of the DeployedIndex that will serve + the request. + ids (MutableSequence[str]): + IDs of the datapoints to be searched for. + """ + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + deployed_index_id: str = proto.Field( + proto.STRING, + number=2, + ) + ids: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + +class ReadIndexDatapointsResponse(proto.Message): + r"""The response message for + [MatchService.ReadIndexDatapoints][google.cloud.aiplatform.v1.MatchService.ReadIndexDatapoints]. + + Attributes: + datapoints (MutableSequence[google.cloud.aiplatform_v1.types.IndexDatapoint]): + The result list of datapoints. + """ + + datapoints: MutableSequence[index.IndexDatapoint] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=index.IndexDatapoint, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/metadata_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/metadata_service.py new file mode 100644 index 0000000000000000000000000000000000000000..9a46a6307fe883a2c654609d9ad66721aca360d4 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/metadata_service.py @@ -0,0 +1,1568 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import artifact as gca_artifact +from google.cloud.aiplatform_v1.types import context as gca_context +from google.cloud.aiplatform_v1.types import event +from google.cloud.aiplatform_v1.types import execution as gca_execution +from google.cloud.aiplatform_v1.types import metadata_schema as gca_metadata_schema +from google.cloud.aiplatform_v1.types import metadata_store as gca_metadata_store +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateMetadataStoreRequest", + "CreateMetadataStoreOperationMetadata", + "GetMetadataStoreRequest", + "ListMetadataStoresRequest", + "ListMetadataStoresResponse", + "DeleteMetadataStoreRequest", + "DeleteMetadataStoreOperationMetadata", + "CreateArtifactRequest", + "GetArtifactRequest", + "ListArtifactsRequest", + "ListArtifactsResponse", + "UpdateArtifactRequest", + "DeleteArtifactRequest", + "PurgeArtifactsRequest", + "PurgeArtifactsResponse", + "PurgeArtifactsMetadata", + "CreateContextRequest", + "GetContextRequest", + "ListContextsRequest", + "ListContextsResponse", + "UpdateContextRequest", + "DeleteContextRequest", + "PurgeContextsRequest", + "PurgeContextsResponse", + "PurgeContextsMetadata", + "AddContextArtifactsAndExecutionsRequest", + "AddContextArtifactsAndExecutionsResponse", + "AddContextChildrenRequest", + "AddContextChildrenResponse", + "RemoveContextChildrenRequest", + "RemoveContextChildrenResponse", + "QueryContextLineageSubgraphRequest", + "CreateExecutionRequest", + "GetExecutionRequest", + "ListExecutionsRequest", + "ListExecutionsResponse", + "UpdateExecutionRequest", + "DeleteExecutionRequest", + "PurgeExecutionsRequest", + "PurgeExecutionsResponse", + "PurgeExecutionsMetadata", + "AddExecutionEventsRequest", + "AddExecutionEventsResponse", + "QueryExecutionInputsAndOutputsRequest", + "CreateMetadataSchemaRequest", + "GetMetadataSchemaRequest", + "ListMetadataSchemasRequest", + "ListMetadataSchemasResponse", + "QueryArtifactLineageSubgraphRequest", + }, +) + + +class CreateMetadataStoreRequest(proto.Message): + r"""Request message for + [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore]. + + Attributes: + parent (str): + Required. The resource name of the Location where the + MetadataStore should be created. Format: + ``projects/{project}/locations/{location}/`` + metadata_store (google.cloud.aiplatform_v1.types.MetadataStore): + Required. The MetadataStore to create. + metadata_store_id (str): + The {metadatastore} portion of the resource name with the + format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + If not provided, the MetadataStore's ID will be a UUID + generated by the service. Must be 4-128 characters in + length. Valid characters are ``/[a-z][0-9]-/``. Must be + unique across all MetadataStores in the parent Location. + (Otherwise the request will fail with ALREADY_EXISTS, or + PERMISSION_DENIED if the caller can't view the preexisting + MetadataStore.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + metadata_store: gca_metadata_store.MetadataStore = proto.Field( + proto.MESSAGE, + number=2, + message=gca_metadata_store.MetadataStore, + ) + metadata_store_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CreateMetadataStoreOperationMetadata(proto.Message): + r"""Details of operations that perform + [MetadataService.CreateMetadataStore][google.cloud.aiplatform.v1.MetadataService.CreateMetadataStore]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for creating a + MetadataStore. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetMetadataStoreRequest(proto.Message): + r"""Request message for + [MetadataService.GetMetadataStore][google.cloud.aiplatform.v1.MetadataService.GetMetadataStore]. + + Attributes: + name (str): + Required. The resource name of the MetadataStore to + retrieve. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListMetadataStoresRequest(proto.Message): + r"""Request message for + [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]. + + Attributes: + parent (str): + Required. The Location whose MetadataStores should be + listed. Format: ``projects/{project}/locations/{location}`` + page_size (int): + The maximum number of Metadata Stores to + return. The service may return fewer. + Must be in range 1-1000, inclusive. Defaults to + 100. + page_token (str): + A page token, received from a previous + [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores] + call. Provide this to retrieve the subsequent page. + + When paginating, all other provided parameters must match + the call that provided the page token. (Otherwise the + request will fail with INVALID_ARGUMENT error.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListMetadataStoresResponse(proto.Message): + r"""Response message for + [MetadataService.ListMetadataStores][google.cloud.aiplatform.v1.MetadataService.ListMetadataStores]. + + Attributes: + metadata_stores (MutableSequence[google.cloud.aiplatform_v1.types.MetadataStore]): + The MetadataStores found for the Location. + next_page_token (str): + A token, which can be sent as + [ListMetadataStoresRequest.page_token][google.cloud.aiplatform.v1.ListMetadataStoresRequest.page_token] + to retrieve the next page. If this field is not populated, + there are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + metadata_stores: MutableSequence[gca_metadata_store.MetadataStore] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_metadata_store.MetadataStore, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteMetadataStoreRequest(proto.Message): + r"""Request message for + [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore]. + + Attributes: + name (str): + Required. The resource name of the MetadataStore to delete. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + force (bool): + Deprecated: Field is no longer supported. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class DeleteMetadataStoreOperationMetadata(proto.Message): + r"""Details of operations that perform + [MetadataService.DeleteMetadataStore][google.cloud.aiplatform.v1.MetadataService.DeleteMetadataStore]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for deleting a + MetadataStore. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class CreateArtifactRequest(proto.Message): + r"""Request message for + [MetadataService.CreateArtifact][google.cloud.aiplatform.v1.MetadataService.CreateArtifact]. + + Attributes: + parent (str): + Required. The resource name of the MetadataStore where the + Artifact should be created. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + artifact (google.cloud.aiplatform_v1.types.Artifact): + Required. The Artifact to create. + artifact_id (str): + The {artifact} portion of the resource name with the format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + If not provided, the Artifact's ID will be a UUID generated + by the service. Must be 4-128 characters in length. Valid + characters are ``/[a-z][0-9]-/``. Must be unique across all + Artifacts in the parent MetadataStore. (Otherwise the + request will fail with ALREADY_EXISTS, or PERMISSION_DENIED + if the caller can't view the preexisting Artifact.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + artifact: gca_artifact.Artifact = proto.Field( + proto.MESSAGE, + number=2, + message=gca_artifact.Artifact, + ) + artifact_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetArtifactRequest(proto.Message): + r"""Request message for + [MetadataService.GetArtifact][google.cloud.aiplatform.v1.MetadataService.GetArtifact]. + + Attributes: + name (str): + Required. The resource name of the Artifact to retrieve. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListArtifactsRequest(proto.Message): + r"""Request message for + [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts]. + + Attributes: + parent (str): + Required. The MetadataStore whose Artifacts should be + listed. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + page_size (int): + The maximum number of Artifacts to return. + The service may return fewer. Must be in range + 1-1000, inclusive. Defaults to 100. + page_token (str): + A page token, received from a previous + [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts] + call. Provide this to retrieve the subsequent page. + + When paginating, all other provided parameters must match + the call that provided the page token. (Otherwise the + request will fail with INVALID_ARGUMENT error.) + filter (str): + Filter specifying the boolean condition for the Artifacts to + satisfy in order to be part of the result set. The syntax to + define filter query is based on https://google.aip.dev/160. + The supported set of filters include the following: + + - **Attribute filtering**: For example: + ``display_name = "test"``. Supported fields include: + ``name``, ``display_name``, ``uri``, ``state``, + ``schema_title``, ``create_time``, and ``update_time``. + Time fields, such as ``create_time`` and ``update_time``, + require values specified in RFC-3339 format. For example: + ``create_time = "2020-11-19T11:30:00-04:00"`` + - **Metadata field**: To filter on metadata fields use + traversal operation as follows: + ``metadata..``. For example: + ``metadata.field_1.number_value = 10.0`` In case the field + name contains special characters (such as colon), one can + embed it inside double quote. For example: + ``metadata."field:1".number_value = 10.0`` + - **Context based filtering**: To filter Artifacts based on + the contexts to which they belong, use the function + operator with the full resource name + ``in_context()``. For example: + ``in_context("projects//locations//metadataStores//contexts/")`` + + Each of the above supported filter types can be combined + together using logical operators (``AND`` & ``OR``). Maximum + nested expression depth allowed is 5. + + For example: + ``display_name = "test" AND metadata.field1.bool_value = true``. + order_by (str): + How the list of messages is ordered. Specify the values to + order by and an ordering operation. The default sorting + order is ascending. To specify descending order for a field, + users append a " desc" suffix; for example: "foo desc, bar". + Subfields are specified with a ``.`` character, such as + foo.bar. see https://google.aip.dev/132#ordering for more + details. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + filter: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + + +class ListArtifactsResponse(proto.Message): + r"""Response message for + [MetadataService.ListArtifacts][google.cloud.aiplatform.v1.MetadataService.ListArtifacts]. + + Attributes: + artifacts (MutableSequence[google.cloud.aiplatform_v1.types.Artifact]): + The Artifacts retrieved from the + MetadataStore. + next_page_token (str): + A token, which can be sent as + [ListArtifactsRequest.page_token][google.cloud.aiplatform.v1.ListArtifactsRequest.page_token] + to retrieve the next page. If this field is not populated, + there are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + artifacts: MutableSequence[gca_artifact.Artifact] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_artifact.Artifact, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateArtifactRequest(proto.Message): + r"""Request message for + [MetadataService.UpdateArtifact][google.cloud.aiplatform.v1.MetadataService.UpdateArtifact]. + + Attributes: + artifact (google.cloud.aiplatform_v1.types.Artifact): + Required. The Artifact containing updates. The Artifact's + [Artifact.name][google.cloud.aiplatform.v1.Artifact.name] + field is used to identify the Artifact to be updated. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. A FieldMask indicating which fields + should be updated. + allow_missing (bool): + If set to true, and the + [Artifact][google.cloud.aiplatform.v1.Artifact] is not + found, a new [Artifact][google.cloud.aiplatform.v1.Artifact] + is created. + """ + + artifact: gca_artifact.Artifact = proto.Field( + proto.MESSAGE, + number=1, + message=gca_artifact.Artifact, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + allow_missing: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class DeleteArtifactRequest(proto.Message): + r"""Request message for + [MetadataService.DeleteArtifact][google.cloud.aiplatform.v1.MetadataService.DeleteArtifact]. + + Attributes: + name (str): + Required. The resource name of the Artifact to delete. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + etag (str): + Optional. The etag of the Artifact to delete. If this is + provided, it must match the server's etag. Otherwise, the + request will fail with a FAILED_PRECONDITION. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + etag: str = proto.Field( + proto.STRING, + number=2, + ) + + +class PurgeArtifactsRequest(proto.Message): + r"""Request message for + [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]. + + Attributes: + parent (str): + Required. The metadata store to purge Artifacts from. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + filter (str): + Required. A required filter matching the Artifacts to be + purged. E.g., ``update_time <= 2020-11-19T11:30:00-04:00``. + force (bool): + Optional. Flag to indicate to actually perform the purge. If + ``force`` is set to false, the method will return a sample + of Artifact names that would be deleted. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + force: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class PurgeArtifactsResponse(proto.Message): + r"""Response message for + [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]. + + Attributes: + purge_count (int): + The number of Artifacts that this request deleted (or, if + ``force`` is false, the number of Artifacts that will be + deleted). This can be an estimate. + purge_sample (MutableSequence[str]): + A sample of the Artifact names that will be deleted. Only + populated if ``force`` is set to false. The maximum number + of samples is 100 (it is possible to return fewer). + """ + + purge_count: int = proto.Field( + proto.INT64, + number=1, + ) + purge_sample: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class PurgeArtifactsMetadata(proto.Message): + r"""Details of operations that perform + [MetadataService.PurgeArtifacts][google.cloud.aiplatform.v1.MetadataService.PurgeArtifacts]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for purging Artifacts. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class CreateContextRequest(proto.Message): + r"""Request message for + [MetadataService.CreateContext][google.cloud.aiplatform.v1.MetadataService.CreateContext]. + + Attributes: + parent (str): + Required. The resource name of the MetadataStore where the + Context should be created. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + context (google.cloud.aiplatform_v1.types.Context): + Required. The Context to create. + context_id (str): + The {context} portion of the resource name with the format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}``. + If not provided, the Context's ID will be a UUID generated + by the service. Must be 4-128 characters in length. Valid + characters are ``/[a-z][0-9]-/``. Must be unique across all + Contexts in the parent MetadataStore. (Otherwise the request + will fail with ALREADY_EXISTS, or PERMISSION_DENIED if the + caller can't view the preexisting Context.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + context: gca_context.Context = proto.Field( + proto.MESSAGE, + number=2, + message=gca_context.Context, + ) + context_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetContextRequest(proto.Message): + r"""Request message for + [MetadataService.GetContext][google.cloud.aiplatform.v1.MetadataService.GetContext]. + + Attributes: + name (str): + Required. The resource name of the Context to retrieve. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListContextsRequest(proto.Message): + r"""Request message for + [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts] + + Attributes: + parent (str): + Required. The MetadataStore whose Contexts should be listed. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + page_size (int): + The maximum number of Contexts to return. The + service may return fewer. Must be in range + 1-1000, inclusive. Defaults to 100. + page_token (str): + A page token, received from a previous + [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts] + call. Provide this to retrieve the subsequent page. + + When paginating, all other provided parameters must match + the call that provided the page token. (Otherwise the + request will fail with INVALID_ARGUMENT error.) + filter (str): + Filter specifying the boolean condition for the Contexts to + satisfy in order to be part of the result set. The syntax to + define filter query is based on https://google.aip.dev/160. + Following are the supported set of filters: + + - **Attribute filtering**: For example: + ``display_name = "test"``. Supported fields include: + ``name``, ``display_name``, ``schema_title``, + ``create_time``, and ``update_time``. Time fields, such as + ``create_time`` and ``update_time``, require values + specified in RFC-3339 format. For example: + ``create_time = "2020-11-19T11:30:00-04:00"``. + + - **Metadata field**: To filter on metadata fields use + traversal operation as follows: + ``metadata..``. For example: + ``metadata.field_1.number_value = 10.0``. In case the + field name contains special characters (such as colon), + one can embed it inside double quote. For example: + ``metadata."field:1".number_value = 10.0`` + + - **Parent Child filtering**: To filter Contexts based on + parent-child relationship use the HAS operator as follows: + + :: + + parent_contexts: + "projects//locations//metadataStores//contexts/" + child_contexts: + "projects//locations//metadataStores//contexts/" + + Each of the above supported filters can be combined together + using logical operators (``AND`` & ``OR``). Maximum nested + expression depth allowed is 5. + + For example: + ``display_name = "test" AND metadata.field1.bool_value = true``. + order_by (str): + How the list of messages is ordered. Specify the values to + order by and an ordering operation. The default sorting + order is ascending. To specify descending order for a field, + users append a " desc" suffix; for example: "foo desc, bar". + Subfields are specified with a ``.`` character, such as + foo.bar. see https://google.aip.dev/132#ordering for more + details. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + filter: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + + +class ListContextsResponse(proto.Message): + r"""Response message for + [MetadataService.ListContexts][google.cloud.aiplatform.v1.MetadataService.ListContexts]. + + Attributes: + contexts (MutableSequence[google.cloud.aiplatform_v1.types.Context]): + The Contexts retrieved from the + MetadataStore. + next_page_token (str): + A token, which can be sent as + [ListContextsRequest.page_token][google.cloud.aiplatform.v1.ListContextsRequest.page_token] + to retrieve the next page. If this field is not populated, + there are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + contexts: MutableSequence[gca_context.Context] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_context.Context, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateContextRequest(proto.Message): + r"""Request message for + [MetadataService.UpdateContext][google.cloud.aiplatform.v1.MetadataService.UpdateContext]. + + Attributes: + context (google.cloud.aiplatform_v1.types.Context): + Required. The Context containing updates. The Context's + [Context.name][google.cloud.aiplatform.v1.Context.name] + field is used to identify the Context to be updated. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. A FieldMask indicating which fields + should be updated. + allow_missing (bool): + If set to true, and the + [Context][google.cloud.aiplatform.v1.Context] is not found, + a new [Context][google.cloud.aiplatform.v1.Context] is + created. + """ + + context: gca_context.Context = proto.Field( + proto.MESSAGE, + number=1, + message=gca_context.Context, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + allow_missing: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class DeleteContextRequest(proto.Message): + r"""Request message for + [MetadataService.DeleteContext][google.cloud.aiplatform.v1.MetadataService.DeleteContext]. + + Attributes: + name (str): + Required. The resource name of the Context to delete. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + force (bool): + The force deletion semantics is still + undefined. Users should not use this field. + etag (str): + Optional. The etag of the Context to delete. If this is + provided, it must match the server's etag. Otherwise, the + request will fail with a FAILED_PRECONDITION. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + etag: str = proto.Field( + proto.STRING, + number=3, + ) + + +class PurgeContextsRequest(proto.Message): + r"""Request message for + [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts]. + + Attributes: + parent (str): + Required. The metadata store to purge Contexts from. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + filter (str): + Required. A required filter matching the Contexts to be + purged. E.g., ``update_time <= 2020-11-19T11:30:00-04:00``. + force (bool): + Optional. Flag to indicate to actually perform the purge. If + ``force`` is set to false, the method will return a sample + of Context names that would be deleted. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + force: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class PurgeContextsResponse(proto.Message): + r"""Response message for + [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts]. + + Attributes: + purge_count (int): + The number of Contexts that this request deleted (or, if + ``force`` is false, the number of Contexts that will be + deleted). This can be an estimate. + purge_sample (MutableSequence[str]): + A sample of the Context names that will be deleted. Only + populated if ``force`` is set to false. The maximum number + of samples is 100 (it is possible to return fewer). + """ + + purge_count: int = proto.Field( + proto.INT64, + number=1, + ) + purge_sample: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class PurgeContextsMetadata(proto.Message): + r"""Details of operations that perform + [MetadataService.PurgeContexts][google.cloud.aiplatform.v1.MetadataService.PurgeContexts]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for purging Contexts. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class AddContextArtifactsAndExecutionsRequest(proto.Message): + r"""Request message for + [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions]. + + Attributes: + context (str): + Required. The resource name of the Context that the + Artifacts and Executions belong to. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + artifacts (MutableSequence[str]): + The resource names of the Artifacts to attribute to the + Context. + + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + executions (MutableSequence[str]): + The resource names of the Executions to associate with the + Context. + + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + """ + + context: str = proto.Field( + proto.STRING, + number=1, + ) + artifacts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + executions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + +class AddContextArtifactsAndExecutionsResponse(proto.Message): + r"""Response message for + [MetadataService.AddContextArtifactsAndExecutions][google.cloud.aiplatform.v1.MetadataService.AddContextArtifactsAndExecutions]. + + """ + + +class AddContextChildrenRequest(proto.Message): + r"""Request message for + [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren]. + + Attributes: + context (str): + Required. The resource name of the parent Context. + + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + child_contexts (MutableSequence[str]): + The resource names of the child Contexts. + """ + + context: str = proto.Field( + proto.STRING, + number=1, + ) + child_contexts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class AddContextChildrenResponse(proto.Message): + r"""Response message for + [MetadataService.AddContextChildren][google.cloud.aiplatform.v1.MetadataService.AddContextChildren]. + + """ + + +class RemoveContextChildrenRequest(proto.Message): + r"""Request message for + [MetadataService.DeleteContextChildrenRequest][]. + + Attributes: + context (str): + Required. The resource name of the parent Context. + + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + child_contexts (MutableSequence[str]): + The resource names of the child Contexts. + """ + + context: str = proto.Field( + proto.STRING, + number=1, + ) + child_contexts: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class RemoveContextChildrenResponse(proto.Message): + r"""Response message for + [MetadataService.RemoveContextChildren][google.cloud.aiplatform.v1.MetadataService.RemoveContextChildren]. + + """ + + +class QueryContextLineageSubgraphRequest(proto.Message): + r"""Request message for + [MetadataService.QueryContextLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryContextLineageSubgraph]. + + Attributes: + context (str): + Required. The resource name of the Context whose Artifacts + and Executions should be retrieved as a LineageSubgraph. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/contexts/{context}`` + + The request may error with FAILED_PRECONDITION if the number + of Artifacts, the number of Executions, or the number of + Events that would be returned for the Context exceeds 1000. + """ + + context: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateExecutionRequest(proto.Message): + r"""Request message for + [MetadataService.CreateExecution][google.cloud.aiplatform.v1.MetadataService.CreateExecution]. + + Attributes: + parent (str): + Required. The resource name of the MetadataStore where the + Execution should be created. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + execution (google.cloud.aiplatform_v1.types.Execution): + Required. The Execution to create. + execution_id (str): + The {execution} portion of the resource name with the + format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + If not provided, the Execution's ID will be a UUID generated + by the service. Must be 4-128 characters in length. Valid + characters are ``/[a-z][0-9]-/``. Must be unique across all + Executions in the parent MetadataStore. (Otherwise the + request will fail with ALREADY_EXISTS, or PERMISSION_DENIED + if the caller can't view the preexisting Execution.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + execution: gca_execution.Execution = proto.Field( + proto.MESSAGE, + number=2, + message=gca_execution.Execution, + ) + execution_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetExecutionRequest(proto.Message): + r"""Request message for + [MetadataService.GetExecution][google.cloud.aiplatform.v1.MetadataService.GetExecution]. + + Attributes: + name (str): + Required. The resource name of the Execution to retrieve. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListExecutionsRequest(proto.Message): + r"""Request message for + [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions]. + + Attributes: + parent (str): + Required. The MetadataStore whose Executions should be + listed. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + page_size (int): + The maximum number of Executions to return. + The service may return fewer. Must be in range + 1-1000, inclusive. Defaults to 100. + page_token (str): + A page token, received from a previous + [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions] + call. Provide this to retrieve the subsequent page. + + When paginating, all other provided parameters must match + the call that provided the page token. (Otherwise the + request will fail with an INVALID_ARGUMENT error.) + filter (str): + Filter specifying the boolean condition for the Executions + to satisfy in order to be part of the result set. The syntax + to define filter query is based on + https://google.aip.dev/160. Following are the supported set + of filters: + + - **Attribute filtering**: For example: + ``display_name = "test"``. Supported fields include: + ``name``, ``display_name``, ``state``, ``schema_title``, + ``create_time``, and ``update_time``. Time fields, such as + ``create_time`` and ``update_time``, require values + specified in RFC-3339 format. For example: + ``create_time = "2020-11-19T11:30:00-04:00"``. + - **Metadata field**: To filter on metadata fields use + traversal operation as follows: + ``metadata..`` For example: + ``metadata.field_1.number_value = 10.0`` In case the field + name contains special characters (such as colon), one can + embed it inside double quote. For example: + ``metadata."field:1".number_value = 10.0`` + - **Context based filtering**: To filter Executions based on + the contexts to which they belong use the function + operator with the full resource name: + ``in_context()``. For example: + ``in_context("projects//locations//metadataStores//contexts/")`` + + Each of the above supported filters can be combined together + using logical operators (``AND`` & ``OR``). Maximum nested + expression depth allowed is 5. + + For example: + ``display_name = "test" AND metadata.field1.bool_value = true``. + order_by (str): + How the list of messages is ordered. Specify the values to + order by and an ordering operation. The default sorting + order is ascending. To specify descending order for a field, + users append a " desc" suffix; for example: "foo desc, bar". + Subfields are specified with a ``.`` character, such as + foo.bar. see https://google.aip.dev/132#ordering for more + details. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + filter: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + + +class ListExecutionsResponse(proto.Message): + r"""Response message for + [MetadataService.ListExecutions][google.cloud.aiplatform.v1.MetadataService.ListExecutions]. + + Attributes: + executions (MutableSequence[google.cloud.aiplatform_v1.types.Execution]): + The Executions retrieved from the + MetadataStore. + next_page_token (str): + A token, which can be sent as + [ListExecutionsRequest.page_token][google.cloud.aiplatform.v1.ListExecutionsRequest.page_token] + to retrieve the next page. If this field is not populated, + there are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + executions: MutableSequence[gca_execution.Execution] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_execution.Execution, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdateExecutionRequest(proto.Message): + r"""Request message for + [MetadataService.UpdateExecution][google.cloud.aiplatform.v1.MetadataService.UpdateExecution]. + + Attributes: + execution (google.cloud.aiplatform_v1.types.Execution): + Required. The Execution containing updates. The Execution's + [Execution.name][google.cloud.aiplatform.v1.Execution.name] + field is used to identify the Execution to be updated. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. A FieldMask indicating which fields + should be updated. + allow_missing (bool): + If set to true, and the + [Execution][google.cloud.aiplatform.v1.Execution] is not + found, a new + [Execution][google.cloud.aiplatform.v1.Execution] is + created. + """ + + execution: gca_execution.Execution = proto.Field( + proto.MESSAGE, + number=1, + message=gca_execution.Execution, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + allow_missing: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class DeleteExecutionRequest(proto.Message): + r"""Request message for + [MetadataService.DeleteExecution][google.cloud.aiplatform.v1.MetadataService.DeleteExecution]. + + Attributes: + name (str): + Required. The resource name of the Execution to delete. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + etag (str): + Optional. The etag of the Execution to delete. If this is + provided, it must match the server's etag. Otherwise, the + request will fail with a FAILED_PRECONDITION. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + etag: str = proto.Field( + proto.STRING, + number=2, + ) + + +class PurgeExecutionsRequest(proto.Message): + r"""Request message for + [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]. + + Attributes: + parent (str): + Required. The metadata store to purge Executions from. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + filter (str): + Required. A required filter matching the Executions to be + purged. E.g., ``update_time <= 2020-11-19T11:30:00-04:00``. + force (bool): + Optional. Flag to indicate to actually perform the purge. If + ``force`` is set to false, the method will return a sample + of Execution names that would be deleted. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + force: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class PurgeExecutionsResponse(proto.Message): + r"""Response message for + [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]. + + Attributes: + purge_count (int): + The number of Executions that this request deleted (or, if + ``force`` is false, the number of Executions that will be + deleted). This can be an estimate. + purge_sample (MutableSequence[str]): + A sample of the Execution names that will be deleted. Only + populated if ``force`` is set to false. The maximum number + of samples is 100 (it is possible to return fewer). + """ + + purge_count: int = proto.Field( + proto.INT64, + number=1, + ) + purge_sample: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class PurgeExecutionsMetadata(proto.Message): + r"""Details of operations that perform + [MetadataService.PurgeExecutions][google.cloud.aiplatform.v1.MetadataService.PurgeExecutions]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for purging Executions. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class AddExecutionEventsRequest(proto.Message): + r"""Request message for + [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents]. + + Attributes: + execution (str): + Required. The resource name of the Execution that the Events + connect Artifacts with. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + events (MutableSequence[google.cloud.aiplatform_v1.types.Event]): + The Events to create and add. + """ + + execution: str = proto.Field( + proto.STRING, + number=1, + ) + events: MutableSequence[event.Event] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=event.Event, + ) + + +class AddExecutionEventsResponse(proto.Message): + r"""Response message for + [MetadataService.AddExecutionEvents][google.cloud.aiplatform.v1.MetadataService.AddExecutionEvents]. + + """ + + +class QueryExecutionInputsAndOutputsRequest(proto.Message): + r"""Request message for + [MetadataService.QueryExecutionInputsAndOutputs][google.cloud.aiplatform.v1.MetadataService.QueryExecutionInputsAndOutputs]. + + Attributes: + execution (str): + Required. The resource name of the Execution whose input and + output Artifacts should be retrieved as a LineageSubgraph. + Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/executions/{execution}`` + """ + + execution: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateMetadataSchemaRequest(proto.Message): + r"""Request message for + [MetadataService.CreateMetadataSchema][google.cloud.aiplatform.v1.MetadataService.CreateMetadataSchema]. + + Attributes: + parent (str): + Required. The resource name of the MetadataStore where the + MetadataSchema should be created. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + metadata_schema (google.cloud.aiplatform_v1.types.MetadataSchema): + Required. The MetadataSchema to create. + metadata_schema_id (str): + The {metadata_schema} portion of the resource name with the + format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`` + If not provided, the MetadataStore's ID will be a UUID + generated by the service. Must be 4-128 characters in + length. Valid characters are ``/[a-z][0-9]-/``. Must be + unique across all MetadataSchemas in the parent Location. + (Otherwise the request will fail with ALREADY_EXISTS, or + PERMISSION_DENIED if the caller can't view the preexisting + MetadataSchema.) + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + metadata_schema: gca_metadata_schema.MetadataSchema = proto.Field( + proto.MESSAGE, + number=2, + message=gca_metadata_schema.MetadataSchema, + ) + metadata_schema_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetMetadataSchemaRequest(proto.Message): + r"""Request message for + [MetadataService.GetMetadataSchema][google.cloud.aiplatform.v1.MetadataService.GetMetadataSchema]. + + Attributes: + name (str): + Required. The resource name of the MetadataSchema to + retrieve. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/metadataSchemas/{metadataschema}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListMetadataSchemasRequest(proto.Message): + r"""Request message for + [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]. + + Attributes: + parent (str): + Required. The MetadataStore whose MetadataSchemas should be + listed. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}`` + page_size (int): + The maximum number of MetadataSchemas to + return. The service may return fewer. + Must be in range 1-1000, inclusive. Defaults to + 100. + page_token (str): + A page token, received from a previous + [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas] + call. Provide this to retrieve the next page. + + When paginating, all other provided parameters must match + the call that provided the page token. (Otherwise the + request will fail with INVALID_ARGUMENT error.) + filter (str): + A query to filter available MetadataSchemas + for matching results. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + filter: str = proto.Field( + proto.STRING, + number=4, + ) + + +class ListMetadataSchemasResponse(proto.Message): + r"""Response message for + [MetadataService.ListMetadataSchemas][google.cloud.aiplatform.v1.MetadataService.ListMetadataSchemas]. + + Attributes: + metadata_schemas (MutableSequence[google.cloud.aiplatform_v1.types.MetadataSchema]): + The MetadataSchemas found for the + MetadataStore. + next_page_token (str): + A token, which can be sent as + [ListMetadataSchemasRequest.page_token][google.cloud.aiplatform.v1.ListMetadataSchemasRequest.page_token] + to retrieve the next page. If this field is not populated, + there are no subsequent pages. + """ + + @property + def raw_page(self): + return self + + metadata_schemas: MutableSequence[gca_metadata_schema.MetadataSchema] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_metadata_schema.MetadataSchema, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class QueryArtifactLineageSubgraphRequest(proto.Message): + r"""Request message for + [MetadataService.QueryArtifactLineageSubgraph][google.cloud.aiplatform.v1.MetadataService.QueryArtifactLineageSubgraph]. + + Attributes: + artifact (str): + Required. The resource name of the Artifact whose Lineage + needs to be retrieved as a LineageSubgraph. Format: + ``projects/{project}/locations/{location}/metadataStores/{metadatastore}/artifacts/{artifact}`` + + The request may error with FAILED_PRECONDITION if the number + of Artifacts, the number of Executions, or the number of + Events that would be returned for the Context exceeds 1000. + max_hops (int): + Specifies the size of the lineage graph in terms of number + of hops from the specified artifact. Negative Value: + INVALID_ARGUMENT error is returned 0: Only input artifact is + returned. No value: Transitive closure is performed to + return the complete graph. + filter (str): + Filter specifying the boolean condition for the Artifacts to + satisfy in order to be part of the Lineage Subgraph. The + syntax to define filter query is based on + https://google.aip.dev/160. The supported set of filters + include the following: + + - **Attribute filtering**: For example: + ``display_name = "test"`` Supported fields include: + ``name``, ``display_name``, ``uri``, ``state``, + ``schema_title``, ``create_time``, and ``update_time``. + Time fields, such as ``create_time`` and ``update_time``, + require values specified in RFC-3339 format. For example: + ``create_time = "2020-11-19T11:30:00-04:00"`` + - **Metadata field**: To filter on metadata fields use + traversal operation as follows: + ``metadata..``. For example: + ``metadata.field_1.number_value = 10.0`` In case the field + name contains special characters (such as colon), one can + embed it inside double quote. For example: + ``metadata."field:1".number_value = 10.0`` + + Each of the above supported filter types can be combined + together using logical operators (``AND`` & ``OR``). Maximum + nested expression depth allowed is 5. + + For example: + ``display_name = "test" AND metadata.field1.bool_value = true``. + """ + + artifact: str = proto.Field( + proto.STRING, + number=1, + ) + max_hops: int = proto.Field( + proto.INT32, + number=2, + ) + filter: str = proto.Field( + proto.STRING, + number=3, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model.py new file mode 100644 index 0000000000000000000000000000000000000000..80453ee31d25c427617273afc9b10f8fda62d873 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model.py @@ -0,0 +1,1524 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import deployed_model_ref +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import env_var +from google.cloud.aiplatform_v1.types import explanation +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Model", + "LargeModelReference", + "ModelGardenSource", + "GenieSource", + "PredictSchemata", + "ModelContainerSpec", + "Port", + "ModelSourceInfo", + "Probe", + "Checkpoint", + }, +) + + +class Model(proto.Message): + r"""A trained machine learning Model. + + Attributes: + name (str): + The resource name of the Model. + version_id (str): + Output only. Immutable. The version ID of the + model. A new version is committed when a new + model version is uploaded or trained under an + existing model id. It is an auto-incrementing + decimal number in string representation. + version_aliases (MutableSequence[str]): + User provided version aliases so that a model version can be + referenced via alias (i.e. + ``projects/{project}/locations/{location}/models/{model_id}@{version_alias}`` + instead of auto-generated version id (i.e. + ``projects/{project}/locations/{location}/models/{model_id}@{version_id})``. + The format is [a-z][a-zA-Z0-9-]{0,126}[a-z0-9] to + distinguish from version_id. A default version alias will be + created for the first version of the model, and there must + be exactly one default version alias for a model. + version_create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this version was + created. + version_update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this version was + most recently updated. + display_name (str): + Required. The display name of the Model. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + description (str): + The description of the Model. + version_description (str): + The description of this version. + default_checkpoint_id (str): + The default checkpoint id of a model version. + predict_schemata (google.cloud.aiplatform_v1.types.PredictSchemata): + The schemata that describe formats of the Model's + predictions and explanations as given and returned via + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] + and + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. + metadata_schema_uri (str): + Immutable. Points to a YAML file stored on Google Cloud + Storage describing additional information about the Model, + that is specific to it. Unset if the Model does not have any + additional information. The schema is defined as an OpenAPI + 3.0.2 `Schema + Object `__. + AutoML Models always have this field populated by Vertex AI, + if no additional metadata is needed, this field is set to an + empty string. Note: The URI given on output will be + immutable and probably different, including the URI scheme, + than the one given on input. The output URI will point to a + location where the user only has a read access. + metadata (google.protobuf.struct_pb2.Value): + Immutable. An additional information about the Model; the + schema of the metadata can be found in + [metadata_schema][google.cloud.aiplatform.v1.Model.metadata_schema_uri]. + Unset if the Model does not have any additional information. + supported_export_formats (MutableSequence[google.cloud.aiplatform_v1.types.Model.ExportFormat]): + Output only. The formats in which this Model + may be exported. If empty, this Model is not + available for export. + training_pipeline (str): + Output only. The resource name of the + TrainingPipeline that uploaded this Model, if + any. + pipeline_job (str): + Optional. This field is populated if the + model is produced by a pipeline job. + container_spec (google.cloud.aiplatform_v1.types.ModelContainerSpec): + Input only. The specification of the container that is to be + used when deploying this Model. The specification is + ingested upon + [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], + and all binaries it contains are copied and stored + internally by Vertex AI. Not required for AutoML Models. + artifact_uri (str): + Immutable. The path to the directory + containing the Model artifact and any of its + supporting files. Not required for AutoML + Models. + supported_deployment_resources_types (MutableSequence[google.cloud.aiplatform_v1.types.Model.DeploymentResourcesType]): + Output only. When this Model is deployed, its prediction + resources are described by the ``prediction_resources`` + field of the + [Endpoint.deployed_models][google.cloud.aiplatform.v1.Endpoint.deployed_models] + object. Because not all Models support all resource + configuration types, the configuration types this Model + supports are listed here. If no configuration types are + listed, the Model cannot be deployed to an + [Endpoint][google.cloud.aiplatform.v1.Endpoint] and does not + support online predictions + ([PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] + or + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]). + Such a Model can serve predictions by using a + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob], + if it has at least one entry each in + [supported_input_storage_formats][google.cloud.aiplatform.v1.Model.supported_input_storage_formats] + and + [supported_output_storage_formats][google.cloud.aiplatform.v1.Model.supported_output_storage_formats]. + supported_input_storage_formats (MutableSequence[str]): + Output only. The formats this Model supports in + [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. + If + [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + exists, the instances should be given as per that schema. + + The possible formats are: + + - ``jsonl`` The JSON Lines format, where each instance is a + single line. Uses + [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + + - ``csv`` The CSV format, where each instance is a single + comma-separated line. The first line in the file is the + header, containing comma-separated field names. Uses + [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + + - ``tf-record`` The TFRecord format, where each instance is + a single record in tfrecord syntax. Uses + [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + + - ``tf-record-gzip`` Similar to ``tf-record``, but the file + is gzipped. Uses + [GcsSource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.gcs_source]. + + - ``bigquery`` Each instance is a single row in BigQuery. + Uses + [BigQuerySource][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig.bigquery_source]. + + - ``file-list`` Each line of the file is the location of an + instance to process, uses ``gcs_source`` field of the + [InputConfig][google.cloud.aiplatform.v1.BatchPredictionJob.InputConfig] + object. + + If this Model doesn't support any of these formats it means + it cannot be used with a + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + However, if it has + [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], + it could serve online predictions by using + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] + or + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. + supported_output_storage_formats (MutableSequence[str]): + Output only. The formats this Model supports in + [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. + If both + [PredictSchemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + and + [PredictSchemata.prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri] + exist, the predictions are returned together with their + instances. In other words, the prediction has the original + instance data first, followed by the actual prediction + content (as per the schema). + + The possible formats are: + + - ``jsonl`` The JSON Lines format, where each prediction is + a single line. Uses + [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. + + - ``csv`` The CSV format, where each prediction is a single + comma-separated line. The first line in the file is the + header, containing comma-separated field names. Uses + [GcsDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.gcs_destination]. + + - ``bigquery`` Each prediction is a single row in a BigQuery + table, uses + [BigQueryDestination][google.cloud.aiplatform.v1.BatchPredictionJob.OutputConfig.bigquery_destination] + . + + If this Model doesn't support any of these formats it means + it cannot be used with a + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + However, if it has + [supported_deployment_resources_types][google.cloud.aiplatform.v1.Model.supported_deployment_resources_types], + it could serve online predictions by using + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict] + or + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Model was + uploaded into Vertex AI. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Model was + most recently updated. + deployed_models (MutableSequence[google.cloud.aiplatform_v1.types.DeployedModelRef]): + Output only. The pointers to DeployedModels + created from this Model. Note that Model could + have been deployed to Endpoints in different + Locations. + explanation_spec (google.cloud.aiplatform_v1.types.ExplanationSpec): + The default explanation specification for this Model. + + The Model can be used for [requesting + explanation][google.cloud.aiplatform.v1.PredictionService.Explain] + after being + [deployed][google.cloud.aiplatform.v1.EndpointService.DeployModel] + if it is populated. The Model can be used for [batch + explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + if it is populated. + + All fields of the explanation_spec can be overridden by + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + of + [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model], + or + [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] + of + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + + If the default explanation specification is not set for this + Model, this Model can still be used for [requesting + explanation][google.cloud.aiplatform.v1.PredictionService.Explain] + by setting + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + of + [DeployModelRequest.deployed_model][google.cloud.aiplatform.v1.DeployModelRequest.deployed_model] + and for [batch + explanation][google.cloud.aiplatform.v1.BatchPredictionJob.generate_explanation] + by setting + [explanation_spec][google.cloud.aiplatform.v1.BatchPredictionJob.explanation_spec] + of + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Models. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + data_stats (google.cloud.aiplatform_v1.types.Model.DataStats): + Stats of data used for training or evaluating the Model. + + Only populated when the Model is trained by a + TrainingPipeline with + [data_input_config][google.cloud.aiplatform.v1.TrainingPipeline.input_data_config]. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for a + Model. If set, this Model and all sub-resources + of this Model will be secured by this key. + model_source_info (google.cloud.aiplatform_v1.types.ModelSourceInfo): + Output only. Source of a model. It can either + be automl training pipeline, custom training + pipeline, BigQuery ML, or saved and tuned from + Genie or Model Garden. + original_model_info (google.cloud.aiplatform_v1.types.Model.OriginalModelInfo): + Output only. If this Model is a copy of + another Model, this contains info about the + original. + metadata_artifact (str): + Output only. The resource name of the Artifact that was + created in MetadataStore when creating the Model. The + Artifact resource name pattern is + ``projects/{project}/locations/{location}/metadataStores/{metadata_store}/artifacts/{artifact}``. + base_model_source (google.cloud.aiplatform_v1.types.Model.BaseModelSource): + Optional. User input field to specify the + base model source. Currently it only supports + specifing the Model Garden models and Genie + models. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + checkpoints (MutableSequence[google.cloud.aiplatform_v1.types.Checkpoint]): + Optional. Output only. The checkpoints of the + model. + """ + + class DeploymentResourcesType(proto.Enum): + r"""Identifies a type of Model's prediction resources. + + Values: + DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED (0): + Should not be used. + DEDICATED_RESOURCES (1): + Resources that are dedicated to the + [DeployedModel][google.cloud.aiplatform.v1.DeployedModel], + and that need a higher degree of manual configuration. + AUTOMATIC_RESOURCES (2): + Resources that to large degree are decided by + Vertex AI, and require only a modest additional + configuration. + SHARED_RESOURCES (3): + Resources that can be shared by multiple + [DeployedModels][google.cloud.aiplatform.v1.DeployedModel]. + A pre-configured + [DeploymentResourcePool][google.cloud.aiplatform.v1.DeploymentResourcePool] + is required. + """ + + DEPLOYMENT_RESOURCES_TYPE_UNSPECIFIED = 0 + DEDICATED_RESOURCES = 1 + AUTOMATIC_RESOURCES = 2 + SHARED_RESOURCES = 3 + + class ExportFormat(proto.Message): + r"""Represents export format supported by the Model. + All formats export to Google Cloud Storage. + + Attributes: + id (str): + Output only. The ID of the export format. The possible + format IDs are: + + - ``tflite`` Used for Android mobile devices. + + - ``edgetpu-tflite`` Used for `Edge + TPU `__ devices. + + - ``tf-saved-model`` A tensorflow model in SavedModel + format. + + - ``tf-js`` A + `TensorFlow.js `__ model + that can be used in the browser and in Node.js using + JavaScript. + + - ``core-ml`` Used for iOS mobile devices. + + - ``custom-trained`` A Model that was uploaded or trained by + custom code. + exportable_contents (MutableSequence[google.cloud.aiplatform_v1.types.Model.ExportFormat.ExportableContent]): + Output only. The content of this Model that + may be exported. + """ + + class ExportableContent(proto.Enum): + r"""The Model content that can be exported. + + Values: + EXPORTABLE_CONTENT_UNSPECIFIED (0): + Should not be used. + ARTIFACT (1): + Model artifact and any of its supported files. Will be + exported to the location specified by the + ``artifactDestination`` field of the + [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] + object. + IMAGE (2): + The container image that is to be used when deploying this + Model. Will be exported to the location specified by the + ``imageDestination`` field of the + [ExportModelRequest.output_config][google.cloud.aiplatform.v1.ExportModelRequest.output_config] + object. + """ + + EXPORTABLE_CONTENT_UNSPECIFIED = 0 + ARTIFACT = 1 + IMAGE = 2 + + id: str = proto.Field( + proto.STRING, + number=1, + ) + exportable_contents: MutableSequence["Model.ExportFormat.ExportableContent"] = ( + proto.RepeatedField( + proto.ENUM, + number=2, + enum="Model.ExportFormat.ExportableContent", + ) + ) + + class DataStats(proto.Message): + r"""Stats of data used for train or evaluate the Model. + + Attributes: + training_data_items_count (int): + Number of DataItems that were used for + training this Model. + validation_data_items_count (int): + Number of DataItems that were used for + validating this Model during training. + test_data_items_count (int): + Number of DataItems that were used for + evaluating this Model. If the Model is evaluated + multiple times, this will be the number of test + DataItems used by the first evaluation. If the + Model is not evaluated, the number is 0. + training_annotations_count (int): + Number of Annotations that are used for + training this Model. + validation_annotations_count (int): + Number of Annotations that are used for + validating this Model during training. + test_annotations_count (int): + Number of Annotations that are used for + evaluating this Model. If the Model is evaluated + multiple times, this will be the number of test + Annotations used by the first evaluation. If the + Model is not evaluated, the number is 0. + """ + + training_data_items_count: int = proto.Field( + proto.INT64, + number=1, + ) + validation_data_items_count: int = proto.Field( + proto.INT64, + number=2, + ) + test_data_items_count: int = proto.Field( + proto.INT64, + number=3, + ) + training_annotations_count: int = proto.Field( + proto.INT64, + number=4, + ) + validation_annotations_count: int = proto.Field( + proto.INT64, + number=5, + ) + test_annotations_count: int = proto.Field( + proto.INT64, + number=6, + ) + + class OriginalModelInfo(proto.Message): + r"""Contains information about the original Model if this Model + is a copy. + + Attributes: + model (str): + Output only. The resource name of the Model this Model is a + copy of, including the revision. Format: + ``projects/{project}/locations/{location}/models/{model_id}@{version_id}`` + """ + + model: str = proto.Field( + proto.STRING, + number=1, + ) + + class BaseModelSource(proto.Message): + r"""User input field to specify the base model source. Currently + it only supports specifing the Model Garden models and Genie + models. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model_garden_source (google.cloud.aiplatform_v1.types.ModelGardenSource): + Source information of Model Garden models. + + This field is a member of `oneof`_ ``source``. + genie_source (google.cloud.aiplatform_v1.types.GenieSource): + Information about the base model of Genie + models. + + This field is a member of `oneof`_ ``source``. + """ + + model_garden_source: "ModelGardenSource" = proto.Field( + proto.MESSAGE, + number=1, + oneof="source", + message="ModelGardenSource", + ) + genie_source: "GenieSource" = proto.Field( + proto.MESSAGE, + number=2, + oneof="source", + message="GenieSource", + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + version_id: str = proto.Field( + proto.STRING, + number=28, + ) + version_aliases: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=29, + ) + version_create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=31, + message=timestamp_pb2.Timestamp, + ) + version_update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=32, + message=timestamp_pb2.Timestamp, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + version_description: str = proto.Field( + proto.STRING, + number=30, + ) + default_checkpoint_id: str = proto.Field( + proto.STRING, + number=53, + ) + predict_schemata: "PredictSchemata" = proto.Field( + proto.MESSAGE, + number=4, + message="PredictSchemata", + ) + metadata_schema_uri: str = proto.Field( + proto.STRING, + number=5, + ) + metadata: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=6, + message=struct_pb2.Value, + ) + supported_export_formats: MutableSequence[ExportFormat] = proto.RepeatedField( + proto.MESSAGE, + number=20, + message=ExportFormat, + ) + training_pipeline: str = proto.Field( + proto.STRING, + number=7, + ) + pipeline_job: str = proto.Field( + proto.STRING, + number=47, + ) + container_spec: "ModelContainerSpec" = proto.Field( + proto.MESSAGE, + number=9, + message="ModelContainerSpec", + ) + artifact_uri: str = proto.Field( + proto.STRING, + number=26, + ) + supported_deployment_resources_types: MutableSequence[DeploymentResourcesType] = ( + proto.RepeatedField( + proto.ENUM, + number=10, + enum=DeploymentResourcesType, + ) + ) + supported_input_storage_formats: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=11, + ) + supported_output_storage_formats: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=12, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=13, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=14, + message=timestamp_pb2.Timestamp, + ) + deployed_models: MutableSequence[deployed_model_ref.DeployedModelRef] = ( + proto.RepeatedField( + proto.MESSAGE, + number=15, + message=deployed_model_ref.DeployedModelRef, + ) + ) + explanation_spec: explanation.ExplanationSpec = proto.Field( + proto.MESSAGE, + number=23, + message=explanation.ExplanationSpec, + ) + etag: str = proto.Field( + proto.STRING, + number=16, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=17, + ) + data_stats: DataStats = proto.Field( + proto.MESSAGE, + number=21, + message=DataStats, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=24, + message=gca_encryption_spec.EncryptionSpec, + ) + model_source_info: "ModelSourceInfo" = proto.Field( + proto.MESSAGE, + number=38, + message="ModelSourceInfo", + ) + original_model_info: OriginalModelInfo = proto.Field( + proto.MESSAGE, + number=34, + message=OriginalModelInfo, + ) + metadata_artifact: str = proto.Field( + proto.STRING, + number=44, + ) + base_model_source: BaseModelSource = proto.Field( + proto.MESSAGE, + number=50, + message=BaseModelSource, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=51, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=52, + ) + checkpoints: MutableSequence["Checkpoint"] = proto.RepeatedField( + proto.MESSAGE, + number=57, + message="Checkpoint", + ) + + +class LargeModelReference(proto.Message): + r"""Contains information about the Large Model. + + Attributes: + name (str): + Required. The unique name of the large + Foundation or pre-built model. Like + "chat-bison", "text-bison". Or model name with + version ID, like "chat-bison@001", + "text-bison@005", etc. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ModelGardenSource(proto.Message): + r"""Contains information about the source of the models generated + from Model Garden. + + Attributes: + public_model_name (str): + Required. The model garden source model + resource name. + version_id (str): + Optional. The model garden source model + version ID. + skip_hf_model_cache (bool): + Optional. Whether to avoid pulling the model + from the HF cache. + """ + + public_model_name: str = proto.Field( + proto.STRING, + number=1, + ) + version_id: str = proto.Field( + proto.STRING, + number=3, + ) + skip_hf_model_cache: bool = proto.Field( + proto.BOOL, + number=4, + ) + + +class GenieSource(proto.Message): + r"""Contains information about the source of the models generated + from Generative AI Studio. + + Attributes: + base_model_uri (str): + Required. The public base model URI. + """ + + base_model_uri: str = proto.Field( + proto.STRING, + number=1, + ) + + +class PredictSchemata(proto.Message): + r"""Contains the schemata used in Model's predictions and explanations + via + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict], + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain] + and + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob]. + + Attributes: + instance_schema_uri (str): + Immutable. Points to a YAML file stored on Google Cloud + Storage describing the format of a single instance, which + are used in + [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances], + [ExplainRequest.instances][google.cloud.aiplatform.v1.ExplainRequest.instances] + and + [BatchPredictionJob.input_config][google.cloud.aiplatform.v1.BatchPredictionJob.input_config]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + AutoML Models always have this field populated by Vertex AI. + Note: The URI given on output will be immutable and probably + different, including the URI scheme, than the one given on + input. The output URI will point to a location where the + user only has a read access. + parameters_schema_uri (str): + Immutable. Points to a YAML file stored on Google Cloud + Storage describing the parameters of prediction and + explanation via + [PredictRequest.parameters][google.cloud.aiplatform.v1.PredictRequest.parameters], + [ExplainRequest.parameters][google.cloud.aiplatform.v1.ExplainRequest.parameters] + and + [BatchPredictionJob.model_parameters][google.cloud.aiplatform.v1.BatchPredictionJob.model_parameters]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + AutoML Models always have this field populated by Vertex AI, + if no parameters are supported, then it is set to an empty + string. Note: The URI given on output will be immutable and + probably different, including the URI scheme, than the one + given on input. The output URI will point to a location + where the user only has a read access. + prediction_schema_uri (str): + Immutable. Points to a YAML file stored on Google Cloud + Storage describing the format of a single prediction + produced by this Model, which are returned via + [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions], + [ExplainResponse.explanations][google.cloud.aiplatform.v1.ExplainResponse.explanations], + and + [BatchPredictionJob.output_config][google.cloud.aiplatform.v1.BatchPredictionJob.output_config]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + AutoML Models always have this field populated by Vertex AI. + Note: The URI given on output will be immutable and probably + different, including the URI scheme, than the one given on + input. The output URI will point to a location where the + user only has a read access. + """ + + instance_schema_uri: str = proto.Field( + proto.STRING, + number=1, + ) + parameters_schema_uri: str = proto.Field( + proto.STRING, + number=2, + ) + prediction_schema_uri: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ModelContainerSpec(proto.Message): + r"""Specification of a container for serving predictions. Some fields in + this message correspond to fields in the `Kubernetes Container v1 + core + specification `__. + + Attributes: + image_uri (str): + Required. Immutable. URI of the Docker image to be used as + the custom container for serving predictions. This URI must + identify an image in Artifact Registry or Container + Registry. Learn more about the `container publishing + requirements `__, + including permissions requirements for the Vertex AI Service + Agent. + + The container image is ingested upon + [ModelService.UploadModel][google.cloud.aiplatform.v1.ModelService.UploadModel], + stored internally, and this original path is afterwards not + used. + + To learn about the requirements for the Docker image itself, + see `Custom container + requirements `__. + + You can use the URI to one of Vertex AI's `pre-built + container images for + prediction `__ + in this field. + command (MutableSequence[str]): + Immutable. Specifies the command that runs when the + container starts. This overrides the container's + `ENTRYPOINT `__. + Specify this field as an array of executable and arguments, + similar to a Docker ``ENTRYPOINT``'s "exec" form, not its + "shell" form. + + If you do not specify this field, then the container's + ``ENTRYPOINT`` runs, in conjunction with the + [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] + field or the container's + ```CMD`` `__, + if either exists. If this field is not specified and the + container does not have an ``ENTRYPOINT``, then refer to the + Docker documentation about `how ``CMD`` and ``ENTRYPOINT`` + interact `__. + + If you specify this field, then you can also specify the + ``args`` field to provide additional arguments for this + command. However, if you specify this field, then the + container's ``CMD`` is ignored. See the `Kubernetes + documentation about how the ``command`` and ``args`` fields + interact with a container's ``ENTRYPOINT`` and + ``CMD`` `__. + + In this field, you can reference `environment variables set + by Vertex + AI `__ + and environment variables set in the + [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] + field. You cannot reference environment variables set in the + Docker image. In order for environment variables to be + expanded, reference them by using the following syntax: + $(VARIABLE_NAME) Note that this differs from Bash variable + expansion, which does not use parentheses. If a variable + cannot be resolved, the reference in the input string is + used unchanged. To avoid variable expansion, you can escape + this syntax with ``$$``; for example: $$(VARIABLE_NAME) This + field corresponds to the ``command`` field of the Kubernetes + Containers `v1 core + API `__. + args (MutableSequence[str]): + Immutable. Specifies arguments for the command that runs + when the container starts. This overrides the container's + ```CMD`` `__. + Specify this field as an array of executable and arguments, + similar to a Docker ``CMD``'s "default parameters" form. + + If you don't specify this field but do specify the + [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] + field, then the command from the ``command`` field runs + without any additional arguments. See the `Kubernetes + documentation about how the ``command`` and ``args`` fields + interact with a container's ``ENTRYPOINT`` and + ``CMD`` `__. + + If you don't specify this field and don't specify the + ``command`` field, then the container's + ```ENTRYPOINT`` `__ + and ``CMD`` determine what runs based on their default + behavior. See the Docker documentation about `how ``CMD`` + and ``ENTRYPOINT`` + interact `__. + + In this field, you can reference `environment variables set + by Vertex + AI `__ + and environment variables set in the + [env][google.cloud.aiplatform.v1.ModelContainerSpec.env] + field. You cannot reference environment variables set in the + Docker image. In order for environment variables to be + expanded, reference them by using the following syntax: + $(VARIABLE_NAME) Note that this differs from Bash variable + expansion, which does not use parentheses. If a variable + cannot be resolved, the reference in the input string is + used unchanged. To avoid variable expansion, you can escape + this syntax with ``$$``; for example: $$(VARIABLE_NAME) This + field corresponds to the ``args`` field of the Kubernetes + Containers `v1 core + API `__. + env (MutableSequence[google.cloud.aiplatform_v1.types.EnvVar]): + Immutable. List of environment variables to set in the + container. After the container starts running, code running + in the container can read these environment variables. + + Additionally, the + [command][google.cloud.aiplatform.v1.ModelContainerSpec.command] + and + [args][google.cloud.aiplatform.v1.ModelContainerSpec.args] + fields can reference these variables. Later entries in this + list can also reference earlier entries. For example, the + following example sets the variable ``VAR_2`` to have the + value ``foo bar``: + + .. code:: json + + [ + { + "name": "VAR_1", + "value": "foo" + }, + { + "name": "VAR_2", + "value": "$(VAR_1) bar" + } + ] + + If you switch the order of the variables in the example, + then the expansion does not occur. + + This field corresponds to the ``env`` field of the + Kubernetes Containers `v1 core + API `__. + ports (MutableSequence[google.cloud.aiplatform_v1.types.Port]): + Immutable. List of ports to expose from the container. + Vertex AI sends any prediction requests that it receives to + the first port on this list. Vertex AI also sends `liveness + and health + checks `__ + to this port. + + If you do not specify this field, it defaults to following + value: + + .. code:: json + + [ + { + "containerPort": 8080 + } + ] + + Vertex AI does not use ports other than the first one + listed. This field corresponds to the ``ports`` field of the + Kubernetes Containers `v1 core + API `__. + predict_route (str): + Immutable. HTTP path on the container to send prediction + requests to. Vertex AI forwards requests sent using + [projects.locations.endpoints.predict][google.cloud.aiplatform.v1.PredictionService.Predict] + to this path on the container's IP address and port. Vertex + AI then returns the container's response in the API + response. + + For example, if you set this field to ``/foo``, then when + Vertex AI receives a prediction request, it forwards the + request body in a POST request to the ``/foo`` path on the + port of your container specified by the first value of this + ``ModelContainerSpec``'s + [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] + field. + + If you don't specify this field, it defaults to the + following value when you [deploy this Model to an + Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: + /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict + The placeholders in this value are replaced as follows: + + - ENDPOINT: The last segment (following ``endpoints/``)of + the Endpoint.name][] field of the Endpoint where this + Model has been deployed. (Vertex AI makes this value + available to your container code as the + ```AIP_ENDPOINT_ID`` environment + variable `__.) + + - DEPLOYED_MODEL: + [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] + of the ``DeployedModel``. (Vertex AI makes this value + available to your container code as the + ```AIP_DEPLOYED_MODEL_ID`` environment + variable `__.) + health_route (str): + Immutable. HTTP path on the container to send health checks + to. Vertex AI intermittently sends GET requests to this path + on the container's IP address and port to check that the + container is healthy. Read more about `health + checks `__. + + For example, if you set this field to ``/bar``, then Vertex + AI intermittently sends a GET request to the ``/bar`` path + on the port of your container specified by the first value + of this ``ModelContainerSpec``'s + [ports][google.cloud.aiplatform.v1.ModelContainerSpec.ports] + field. + + If you don't specify this field, it defaults to the + following value when you [deploy this Model to an + Endpoint][google.cloud.aiplatform.v1.EndpointService.DeployModel]: + /v1/endpoints/ENDPOINT/deployedModels/DEPLOYED_MODEL:predict + The placeholders in this value are replaced as follows: + + - ENDPOINT: The last segment (following ``endpoints/``)of + the Endpoint.name][] field of the Endpoint where this + Model has been deployed. (Vertex AI makes this value + available to your container code as the + ```AIP_ENDPOINT_ID`` environment + variable `__.) + + - DEPLOYED_MODEL: + [DeployedModel.id][google.cloud.aiplatform.v1.DeployedModel.id] + of the ``DeployedModel``. (Vertex AI makes this value + available to your container code as the + ```AIP_DEPLOYED_MODEL_ID`` environment + variable `__.) + invoke_route_prefix (str): + Immutable. Invoke route prefix for the custom container. + "/\*" is the only supported value right now. By setting this + field, any non-root route on this model will be accessible + with invoke http call eg: "/invoke/foo/bar", however the + [PredictionService.Invoke] RPC is not supported yet. + + Only one of ``predict_route`` or ``invoke_route_prefix`` can + be set, and we default to using ``predict_route`` if this + field is not set. If this field is set, the Model can only + be deployed to dedicated endpoint. + grpc_ports (MutableSequence[google.cloud.aiplatform_v1.types.Port]): + Immutable. List of ports to expose from the container. + Vertex AI sends gRPC prediction requests that it receives to + the first port on this list. Vertex AI also sends liveness + and health checks to this port. + + If you do not specify this field, gRPC requests to the + container will be disabled. + + Vertex AI does not use ports other than the first one + listed. This field corresponds to the ``ports`` field of the + Kubernetes Containers v1 core API. + deployment_timeout (google.protobuf.duration_pb2.Duration): + Immutable. Deployment timeout. + Limit for deployment timeout is 2 hours. + shared_memory_size_mb (int): + Immutable. The amount of the VM memory to + reserve as the shared memory for the model in + megabytes. + startup_probe (google.cloud.aiplatform_v1.types.Probe): + Immutable. Specification for Kubernetes + startup probe. + health_probe (google.cloud.aiplatform_v1.types.Probe): + Immutable. Specification for Kubernetes + readiness probe. + liveness_probe (google.cloud.aiplatform_v1.types.Probe): + Immutable. Specification for Kubernetes + liveness probe. + """ + + image_uri: str = proto.Field( + proto.STRING, + number=1, + ) + command: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + args: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + env: MutableSequence[env_var.EnvVar] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=env_var.EnvVar, + ) + ports: MutableSequence["Port"] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message="Port", + ) + predict_route: str = proto.Field( + proto.STRING, + number=6, + ) + health_route: str = proto.Field( + proto.STRING, + number=7, + ) + invoke_route_prefix: str = proto.Field( + proto.STRING, + number=15, + ) + grpc_ports: MutableSequence["Port"] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message="Port", + ) + deployment_timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=10, + message=duration_pb2.Duration, + ) + shared_memory_size_mb: int = proto.Field( + proto.INT64, + number=11, + ) + startup_probe: "Probe" = proto.Field( + proto.MESSAGE, + number=12, + message="Probe", + ) + health_probe: "Probe" = proto.Field( + proto.MESSAGE, + number=13, + message="Probe", + ) + liveness_probe: "Probe" = proto.Field( + proto.MESSAGE, + number=14, + message="Probe", + ) + + +class Port(proto.Message): + r"""Represents a network port in a container. + + Attributes: + container_port (int): + The number of the port to expose on the pod's + IP address. Must be a valid port number, between + 1 and 65535 inclusive. + """ + + container_port: int = proto.Field( + proto.INT32, + number=3, + ) + + +class ModelSourceInfo(proto.Message): + r"""Detail description of the source information of the model. + + Attributes: + source_type (google.cloud.aiplatform_v1.types.ModelSourceInfo.ModelSourceType): + Type of the model source. + copy (bool): + If this Model is copy of another Model. If true then + [source_type][google.cloud.aiplatform.v1.ModelSourceInfo.source_type] + pertains to the original. + """ + + class ModelSourceType(proto.Enum): + r"""Source of the model. Different from ``objective`` field, this + ``ModelSourceType`` enum indicates the source from which the model + was accessed or obtained, whereas the ``objective`` indicates the + overall aim or function of this model. + + Values: + MODEL_SOURCE_TYPE_UNSPECIFIED (0): + Should not be used. + AUTOML (1): + The Model is uploaded by automl training + pipeline. + CUSTOM (2): + The Model is uploaded by user or custom + training pipeline. + BQML (3): + The Model is registered and sync'ed from + BigQuery ML. + MODEL_GARDEN (4): + The Model is saved or tuned from Model + Garden. + GENIE (5): + The Model is saved or tuned from Genie. + CUSTOM_TEXT_EMBEDDING (6): + The Model is uploaded by text embedding + finetuning pipeline. + MARKETPLACE (7): + The Model is saved or tuned from Marketplace. + """ + + MODEL_SOURCE_TYPE_UNSPECIFIED = 0 + AUTOML = 1 + CUSTOM = 2 + BQML = 3 + MODEL_GARDEN = 4 + GENIE = 5 + CUSTOM_TEXT_EMBEDDING = 6 + MARKETPLACE = 7 + + source_type: ModelSourceType = proto.Field( + proto.ENUM, + number=1, + enum=ModelSourceType, + ) + copy: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class Probe(proto.Message): + r"""Probe describes a health check to be performed against a + container to determine whether it is alive or ready to receive + traffic. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exec_ (google.cloud.aiplatform_v1.types.Probe.ExecAction): + ExecAction probes the health of a container + by executing a command. + + This field is a member of `oneof`_ ``probe_type``. + http_get (google.cloud.aiplatform_v1.types.Probe.HttpGetAction): + HttpGetAction probes the health of a + container by sending an HTTP GET request. + + This field is a member of `oneof`_ ``probe_type``. + grpc (google.cloud.aiplatform_v1.types.Probe.GrpcAction): + GrpcAction probes the health of a container + by sending a gRPC request. + + This field is a member of `oneof`_ ``probe_type``. + tcp_socket (google.cloud.aiplatform_v1.types.Probe.TcpSocketAction): + TcpSocketAction probes the health of a + container by opening a TCP socket connection. + + This field is a member of `oneof`_ ``probe_type``. + period_seconds (int): + How often (in seconds) to perform the probe. Default to 10 + seconds. Minimum value is 1. Must be less than + timeout_seconds. + + Maps to Kubernetes probe argument 'periodSeconds'. + timeout_seconds (int): + Number of seconds after which the probe times out. Defaults + to 1 second. Minimum value is 1. Must be greater or equal to + period_seconds. + + Maps to Kubernetes probe argument 'timeoutSeconds'. + failure_threshold (int): + Number of consecutive failures before the + probe is considered failed. Defaults to 3. + Minimum value is 1. + + Maps to Kubernetes probe argument + 'failureThreshold'. + success_threshold (int): + Number of consecutive successes before the + probe is considered successful. Defaults to 1. + Minimum value is 1. + + Maps to Kubernetes probe argument + 'successThreshold'. + initial_delay_seconds (int): + Number of seconds to wait before starting the + probe. Defaults to 0. Minimum value is 0. + + Maps to Kubernetes probe argument + 'initialDelaySeconds'. + """ + + class ExecAction(proto.Message): + r"""ExecAction specifies a command to execute. + + Attributes: + command (MutableSequence[str]): + Command is the command line to execute inside the container, + the working directory for the command is root ('/') in the + container's filesystem. The command is simply exec'd, it is + not run inside a shell, so traditional shell instructions + ('\|', etc) won't work. To use a shell, you need to + explicitly call out to that shell. Exit status of 0 is + treated as live/healthy and non-zero is unhealthy. + """ + + command: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + class HttpGetAction(proto.Message): + r"""HttpGetAction describes an action based on HTTP Get requests. + + Attributes: + path (str): + Path to access on the HTTP server. + port (int): + Number of the port to access on the + container. Number must be in the range 1 to + 65535. + host (str): + Host name to connect to, defaults to the + model serving container's IP. You probably want + to set "Host" in httpHeaders instead. + scheme (str): + Scheme to use for connecting to the host. + Defaults to HTTP. Acceptable values are "HTTP" + or "HTTPS". + http_headers (MutableSequence[google.cloud.aiplatform_v1.types.Probe.HttpHeader]): + Custom headers to set in the request. HTTP + allows repeated headers. + """ + + path: str = proto.Field( + proto.STRING, + number=1, + ) + port: int = proto.Field( + proto.INT32, + number=2, + ) + host: str = proto.Field( + proto.STRING, + number=3, + ) + scheme: str = proto.Field( + proto.STRING, + number=4, + ) + http_headers: MutableSequence["Probe.HttpHeader"] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message="Probe.HttpHeader", + ) + + class GrpcAction(proto.Message): + r"""GrpcAction checks the health of a container using a gRPC + service. + + Attributes: + port (int): + Port number of the gRPC service. Number must + be in the range 1 to 65535. + service (str): + Service is the name of the service to place + in the gRPC HealthCheckRequest (see + https://github.com/grpc/grpc/blob/master/doc/health-checking.md). + + If this is not specified, the default behavior + is defined by gRPC. + """ + + port: int = proto.Field( + proto.INT32, + number=1, + ) + service: str = proto.Field( + proto.STRING, + number=2, + ) + + class TcpSocketAction(proto.Message): + r"""TcpSocketAction probes the health of a container by opening a + TCP socket connection. + + Attributes: + port (int): + Number of the port to access on the + container. Number must be in the range 1 to + 65535. + host (str): + Optional: Host name to connect to, defaults + to the model serving container's IP. + """ + + port: int = proto.Field( + proto.INT32, + number=1, + ) + host: str = proto.Field( + proto.STRING, + number=2, + ) + + class HttpHeader(proto.Message): + r"""HttpHeader describes a custom header to be used in HTTP + probes + + Attributes: + name (str): + The header field name. + This will be canonicalized upon output, so + case-variant names will be understood as the + same header. + value (str): + The header field value + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + value: str = proto.Field( + proto.STRING, + number=2, + ) + + exec_: ExecAction = proto.Field( + proto.MESSAGE, + number=1, + oneof="probe_type", + message=ExecAction, + ) + http_get: HttpGetAction = proto.Field( + proto.MESSAGE, + number=4, + oneof="probe_type", + message=HttpGetAction, + ) + grpc: GrpcAction = proto.Field( + proto.MESSAGE, + number=5, + oneof="probe_type", + message=GrpcAction, + ) + tcp_socket: TcpSocketAction = proto.Field( + proto.MESSAGE, + number=6, + oneof="probe_type", + message=TcpSocketAction, + ) + period_seconds: int = proto.Field( + proto.INT32, + number=2, + ) + timeout_seconds: int = proto.Field( + proto.INT32, + number=3, + ) + failure_threshold: int = proto.Field( + proto.INT32, + number=7, + ) + success_threshold: int = proto.Field( + proto.INT32, + number=8, + ) + initial_delay_seconds: int = proto.Field( + proto.INT32, + number=9, + ) + + +class Checkpoint(proto.Message): + r"""Describes the machine learning model version checkpoint. + + Attributes: + checkpoint_id (str): + The ID of the checkpoint. + epoch (int): + The epoch of the checkpoint. + step (int): + The step of the checkpoint. + """ + + checkpoint_id: str = proto.Field( + proto.STRING, + number=1, + ) + epoch: int = proto.Field( + proto.INT64, + number=2, + ) + step: int = proto.Field( + proto.INT64, + number=3, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py new file mode 100644 index 0000000000000000000000000000000000000000..3b84bfbcd0649178f2e3f688f415bb94c912c842 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_deployment_monitoring_job.py @@ -0,0 +1,580 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import feature_monitoring_stats +from google.cloud.aiplatform_v1.types import io +from google.cloud.aiplatform_v1.types import job_state +from google.cloud.aiplatform_v1.types import model_monitoring +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ModelDeploymentMonitoringObjectiveType", + "ModelDeploymentMonitoringJob", + "ModelDeploymentMonitoringBigQueryTable", + "ModelDeploymentMonitoringObjectiveConfig", + "ModelDeploymentMonitoringScheduleConfig", + "ModelMonitoringStatsAnomalies", + }, +) + + +class ModelDeploymentMonitoringObjectiveType(proto.Enum): + r"""The Model Monitoring Objective types. + + Values: + MODEL_DEPLOYMENT_MONITORING_OBJECTIVE_TYPE_UNSPECIFIED (0): + Default value, should not be set. + RAW_FEATURE_SKEW (1): + Raw feature values' stats to detect skew + between Training-Prediction datasets. + RAW_FEATURE_DRIFT (2): + Raw feature values' stats to detect drift + between Serving-Prediction datasets. + FEATURE_ATTRIBUTION_SKEW (3): + Feature attribution scores to detect skew + between Training-Prediction datasets. + FEATURE_ATTRIBUTION_DRIFT (4): + Feature attribution scores to detect skew + between Prediction datasets collected within + different time windows. + """ + + MODEL_DEPLOYMENT_MONITORING_OBJECTIVE_TYPE_UNSPECIFIED = 0 + RAW_FEATURE_SKEW = 1 + RAW_FEATURE_DRIFT = 2 + FEATURE_ATTRIBUTION_SKEW = 3 + FEATURE_ATTRIBUTION_DRIFT = 4 + + +class ModelDeploymentMonitoringJob(proto.Message): + r"""Represents a job that runs periodically to monitor the + deployed models in an endpoint. It will analyze the logged + training & prediction data to detect any abnormal behaviors. + + Attributes: + name (str): + Output only. Resource name of a + ModelDeploymentMonitoringJob. + display_name (str): + Required. The user-defined name of the + ModelDeploymentMonitoringJob. The name can be up + to 128 characters long and can consist of any + UTF-8 characters. + Display name of a ModelDeploymentMonitoringJob. + endpoint (str): + Required. Endpoint resource name. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the + monitoring job. When the job is still creating, + the state will be 'PENDING'. Once the job is + successfully created, the state will be + 'RUNNING'. Pause the job, the state will be + 'PAUSED'. + Resume the job, the state will return to + 'RUNNING'. + schedule_state (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob.MonitoringScheduleState): + Output only. Schedule state when the + monitoring job is in Running state. + latest_monitoring_pipeline_metadata (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringJob.LatestMonitoringPipelineMetadata): + Output only. Latest triggered monitoring + pipeline metadata. + model_deployment_monitoring_objective_configs (MutableSequence[google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringObjectiveConfig]): + Required. The config for monitoring + objectives. This is a per DeployedModel config. + Each DeployedModel needs to be configured + separately. + model_deployment_monitoring_schedule_config (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringScheduleConfig): + Required. Schedule config for running the + monitoring job. + logging_sampling_strategy (google.cloud.aiplatform_v1.types.SamplingStrategy): + Required. Sample Strategy for logging. + model_monitoring_alert_config (google.cloud.aiplatform_v1.types.ModelMonitoringAlertConfig): + Alert config for model monitoring. + predict_instance_schema_uri (str): + YAML schema file uri describing the format of + a single instance, which are given to format + this Endpoint's prediction (and explanation). If + not set, we will generate predict schema from + collected predict requests. + sample_predict_instance (google.protobuf.struct_pb2.Value): + Sample Predict instance, same format as + [PredictRequest.instances][google.cloud.aiplatform.v1.PredictRequest.instances], + this can be set as a replacement of + [ModelDeploymentMonitoringJob.predict_instance_schema_uri][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri]. + If not set, we will generate predict schema from collected + predict requests. + analysis_instance_schema_uri (str): + YAML schema file uri describing the format of a single + instance that you want Tensorflow Data Validation (TFDV) to + analyze. + + If this field is empty, all the feature data types are + inferred from + [predict_instance_schema_uri][google.cloud.aiplatform.v1.ModelDeploymentMonitoringJob.predict_instance_schema_uri], + meaning that TFDV will use the data in the exact format(data + type) as prediction request/response. If there are any data + type differences between predict instance and TFDV instance, + this field can be used to override the schema. For models + trained with Vertex AI, this field must be set as all the + fields in predict instance formatted as string. + bigquery_tables (MutableSequence[google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringBigQueryTable]): + Output only. The created bigquery tables for + the job under customer project. Customer could + do their own query & analysis. There could be 4 + log tables in maximum: + + 1. Training data logging predict + request/response + 2. Serving data logging predict request/response + log_ttl (google.protobuf.duration_pb2.Duration): + The TTL of BigQuery tables in user projects + which stores logs. A day is the basic unit of + the TTL and we take the ceil of TTL/86400(a + day). e.g. { second: 3600} indicates ttl = 1 + day. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your ModelDeploymentMonitoringJob. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + ModelDeploymentMonitoringJob was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + ModelDeploymentMonitoringJob was updated most + recently. + next_schedule_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this monitoring + pipeline will be scheduled to run for the next + round. + stats_anomalies_base_directory (google.cloud.aiplatform_v1.types.GcsDestination): + Stats anomalies base folder path. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for a + ModelDeploymentMonitoringJob. If set, this + ModelDeploymentMonitoringJob and all + sub-resources of this + ModelDeploymentMonitoringJob will be secured by + this key. + enable_monitoring_pipeline_logs (bool): + If true, the scheduled monitoring pipeline logs are sent to + Google Cloud Logging, including pipeline status and + anomalies detected. Please note the logs incur cost, which + are subject to `Cloud Logging + pricing `__. + error (google.rpc.status_pb2.Status): + Output only. Only populated when the job's state is + ``JOB_STATE_FAILED`` or ``JOB_STATE_CANCELLED``. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class MonitoringScheduleState(proto.Enum): + r"""The state to Specify the monitoring pipeline. + + Values: + MONITORING_SCHEDULE_STATE_UNSPECIFIED (0): + Unspecified state. + PENDING (1): + The pipeline is picked up and wait to run. + OFFLINE (2): + The pipeline is offline and will be scheduled + for next run. + RUNNING (3): + The pipeline is running. + """ + + MONITORING_SCHEDULE_STATE_UNSPECIFIED = 0 + PENDING = 1 + OFFLINE = 2 + RUNNING = 3 + + class LatestMonitoringPipelineMetadata(proto.Message): + r"""All metadata of most recent monitoring pipelines. + + Attributes: + run_time (google.protobuf.timestamp_pb2.Timestamp): + The time that most recent monitoring + pipelines that is related to this run. + status (google.rpc.status_pb2.Status): + The status of the most recent monitoring + pipeline. + """ + + run_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + status: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=2, + message=status_pb2.Status, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + endpoint: str = proto.Field( + proto.STRING, + number=3, + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=4, + enum=job_state.JobState, + ) + schedule_state: MonitoringScheduleState = proto.Field( + proto.ENUM, + number=5, + enum=MonitoringScheduleState, + ) + latest_monitoring_pipeline_metadata: LatestMonitoringPipelineMetadata = proto.Field( + proto.MESSAGE, + number=25, + message=LatestMonitoringPipelineMetadata, + ) + model_deployment_monitoring_objective_configs: MutableSequence[ + "ModelDeploymentMonitoringObjectiveConfig" + ] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="ModelDeploymentMonitoringObjectiveConfig", + ) + model_deployment_monitoring_schedule_config: ( + "ModelDeploymentMonitoringScheduleConfig" + ) = proto.Field( + proto.MESSAGE, + number=7, + message="ModelDeploymentMonitoringScheduleConfig", + ) + logging_sampling_strategy: model_monitoring.SamplingStrategy = proto.Field( + proto.MESSAGE, + number=8, + message=model_monitoring.SamplingStrategy, + ) + model_monitoring_alert_config: model_monitoring.ModelMonitoringAlertConfig = ( + proto.Field( + proto.MESSAGE, + number=15, + message=model_monitoring.ModelMonitoringAlertConfig, + ) + ) + predict_instance_schema_uri: str = proto.Field( + proto.STRING, + number=9, + ) + sample_predict_instance: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=19, + message=struct_pb2.Value, + ) + analysis_instance_schema_uri: str = proto.Field( + proto.STRING, + number=16, + ) + bigquery_tables: MutableSequence["ModelDeploymentMonitoringBigQueryTable"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=10, + message="ModelDeploymentMonitoringBigQueryTable", + ) + ) + log_ttl: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=17, + message=duration_pb2.Duration, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=11, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=13, + message=timestamp_pb2.Timestamp, + ) + next_schedule_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=14, + message=timestamp_pb2.Timestamp, + ) + stats_anomalies_base_directory: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=20, + message=io.GcsDestination, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=21, + message=gca_encryption_spec.EncryptionSpec, + ) + enable_monitoring_pipeline_logs: bool = proto.Field( + proto.BOOL, + number=22, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=23, + message=status_pb2.Status, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=26, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=27, + ) + + +class ModelDeploymentMonitoringBigQueryTable(proto.Message): + r"""ModelDeploymentMonitoringBigQueryTable specifies the BigQuery + table name as well as some information of the logs stored in + this table. + + Attributes: + log_source (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringBigQueryTable.LogSource): + The source of log. + log_type (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringBigQueryTable.LogType): + The type of log. + bigquery_table_path (str): + The created BigQuery table to store logs. Customer could do + their own query & analysis. Format: + ``bq://.model_deployment_monitoring_._`` + request_response_logging_schema_version (str): + Output only. The schema version of the + request/response logging BigQuery table. Default + to v1 if unset. + """ + + class LogSource(proto.Enum): + r"""Indicates where does the log come from. + + Values: + LOG_SOURCE_UNSPECIFIED (0): + Unspecified source. + TRAINING (1): + Logs coming from Training dataset. + SERVING (2): + Logs coming from Serving traffic. + """ + + LOG_SOURCE_UNSPECIFIED = 0 + TRAINING = 1 + SERVING = 2 + + class LogType(proto.Enum): + r"""Indicates what type of traffic does the log belong to. + + Values: + LOG_TYPE_UNSPECIFIED (0): + Unspecified type. + PREDICT (1): + Predict logs. + EXPLAIN (2): + Explain logs. + """ + + LOG_TYPE_UNSPECIFIED = 0 + PREDICT = 1 + EXPLAIN = 2 + + log_source: LogSource = proto.Field( + proto.ENUM, + number=1, + enum=LogSource, + ) + log_type: LogType = proto.Field( + proto.ENUM, + number=2, + enum=LogType, + ) + bigquery_table_path: str = proto.Field( + proto.STRING, + number=3, + ) + request_response_logging_schema_version: str = proto.Field( + proto.STRING, + number=4, + ) + + +class ModelDeploymentMonitoringObjectiveConfig(proto.Message): + r"""ModelDeploymentMonitoringObjectiveConfig contains the pair of + deployed_model_id to ModelMonitoringObjectiveConfig. + + Attributes: + deployed_model_id (str): + The DeployedModel ID of the objective config. + objective_config (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig): + The objective config of for the + modelmonitoring job of this deployed model. + """ + + deployed_model_id: str = proto.Field( + proto.STRING, + number=1, + ) + objective_config: model_monitoring.ModelMonitoringObjectiveConfig = proto.Field( + proto.MESSAGE, + number=2, + message=model_monitoring.ModelMonitoringObjectiveConfig, + ) + + +class ModelDeploymentMonitoringScheduleConfig(proto.Message): + r"""The config for scheduling monitoring job. + + Attributes: + monitor_interval (google.protobuf.duration_pb2.Duration): + Required. The model monitoring job scheduling + interval. It will be rounded up to next full + hour. This defines how often the monitoring jobs + are triggered. + monitor_window (google.protobuf.duration_pb2.Duration): + The time window of the prediction data being included in + each prediction dataset. This window specifies how long the + data should be collected from historical model results for + each run. If not set, + [ModelDeploymentMonitoringScheduleConfig.monitor_interval][google.cloud.aiplatform.v1.ModelDeploymentMonitoringScheduleConfig.monitor_interval] + will be used. e.g. If currently the cutoff time is + 2022-01-08 14:30:00 and the monitor_window is set to be + 3600, then data from 2022-01-08 13:30:00 to 2022-01-08 + 14:30:00 will be retrieved and aggregated to calculate the + monitoring statistics. + """ + + monitor_interval: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + monitor_window: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=2, + message=duration_pb2.Duration, + ) + + +class ModelMonitoringStatsAnomalies(proto.Message): + r"""Statistics and anomalies generated by Model Monitoring. + + Attributes: + objective (google.cloud.aiplatform_v1.types.ModelDeploymentMonitoringObjectiveType): + Model Monitoring Objective those stats and + anomalies belonging to. + deployed_model_id (str): + Deployed Model ID. + anomaly_count (int): + Number of anomalies within all stats. + feature_stats (MutableSequence[google.cloud.aiplatform_v1.types.ModelMonitoringStatsAnomalies.FeatureHistoricStatsAnomalies]): + A list of historical Stats and Anomalies + generated for all Features. + """ + + class FeatureHistoricStatsAnomalies(proto.Message): + r"""Historical Stats (and Anomalies) for a specific Feature. + + Attributes: + feature_display_name (str): + Display Name of the Feature. + threshold (google.cloud.aiplatform_v1.types.ThresholdConfig): + Threshold for anomaly detection. + training_stats (google.cloud.aiplatform_v1.types.FeatureStatsAnomaly): + Stats calculated for the Training Dataset. + prediction_stats (MutableSequence[google.cloud.aiplatform_v1.types.FeatureStatsAnomaly]): + A list of historical stats generated by + different time window's Prediction Dataset. + """ + + feature_display_name: str = proto.Field( + proto.STRING, + number=1, + ) + threshold: model_monitoring.ThresholdConfig = proto.Field( + proto.MESSAGE, + number=3, + message=model_monitoring.ThresholdConfig, + ) + training_stats: feature_monitoring_stats.FeatureStatsAnomaly = proto.Field( + proto.MESSAGE, + number=4, + message=feature_monitoring_stats.FeatureStatsAnomaly, + ) + prediction_stats: MutableSequence[ + feature_monitoring_stats.FeatureStatsAnomaly + ] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=feature_monitoring_stats.FeatureStatsAnomaly, + ) + + objective: "ModelDeploymentMonitoringObjectiveType" = proto.Field( + proto.ENUM, + number=1, + enum="ModelDeploymentMonitoringObjectiveType", + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=2, + ) + anomaly_count: int = proto.Field( + proto.INT32, + number=3, + ) + feature_stats: MutableSequence[FeatureHistoricStatsAnomalies] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=FeatureHistoricStatsAnomalies, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation.py new file mode 100644 index 0000000000000000000000000000000000000000..a7c7d4973807db3317fd51834e478e02a9a2cd37 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation.py @@ -0,0 +1,188 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import explanation +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ModelEvaluation", + }, +) + + +class ModelEvaluation(proto.Message): + r"""A collection of metrics calculated by comparing Model's + predictions on all of the test data against annotations from the + test data. + + Attributes: + name (str): + Output only. The resource name of the + ModelEvaluation. + display_name (str): + The display name of the ModelEvaluation. + metrics_schema_uri (str): + Points to a YAML file stored on Google Cloud Storage + describing the + [metrics][google.cloud.aiplatform.v1.ModelEvaluation.metrics] + of this ModelEvaluation. The schema is defined as an OpenAPI + 3.0.2 `Schema + Object `__. + metrics (google.protobuf.struct_pb2.Value): + Evaluation metrics of the Model. The schema of the metrics + is stored in + [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluation.metrics_schema_uri] + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + ModelEvaluation was created. + slice_dimensions (MutableSequence[str]): + All possible + [dimensions][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.dimension] + of ModelEvaluationSlices. The dimensions can be used as the + filter of the + [ModelService.ListModelEvaluationSlices][google.cloud.aiplatform.v1.ModelService.ListModelEvaluationSlices] + request, in the form of ``slice.dimension = ``. + data_item_schema_uri (str): + Points to a YAML file stored on Google Cloud Storage + describing [EvaluatedDataItemView.data_item_payload][] and + [EvaluatedAnnotation.data_item_payload][google.cloud.aiplatform.v1.EvaluatedAnnotation.data_item_payload]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + + This field is not populated if there are neither + EvaluatedDataItemViews nor EvaluatedAnnotations under this + ModelEvaluation. + annotation_schema_uri (str): + Points to a YAML file stored on Google Cloud Storage + describing [EvaluatedDataItemView.predictions][], + [EvaluatedDataItemView.ground_truths][], + [EvaluatedAnnotation.predictions][google.cloud.aiplatform.v1.EvaluatedAnnotation.predictions], + and + [EvaluatedAnnotation.ground_truths][google.cloud.aiplatform.v1.EvaluatedAnnotation.ground_truths]. + The schema is defined as an OpenAPI 3.0.2 `Schema + Object `__. + + This field is not populated if there are neither + EvaluatedDataItemViews nor EvaluatedAnnotations under this + ModelEvaluation. + model_explanation (google.cloud.aiplatform_v1.types.ModelExplanation): + Aggregated explanation metrics for the + Model's prediction output over the data this + ModelEvaluation uses. This field is populated + only if the Model is evaluated with + explanations, and only for AutoML tabular + Models. + explanation_specs (MutableSequence[google.cloud.aiplatform_v1.types.ModelEvaluation.ModelEvaluationExplanationSpec]): + Describes the values of + [ExplanationSpec][google.cloud.aiplatform.v1.ExplanationSpec] + that are used for explaining the predicted values on the + evaluated data. + metadata (google.protobuf.struct_pb2.Value): + The metadata of the ModelEvaluation. For the ModelEvaluation + uploaded from Managed Pipeline, metadata contains a + structured value with keys of "pipeline_job_id", + "evaluation_dataset_type", "evaluation_dataset_path", + "row_based_metrics_path". + """ + + class ModelEvaluationExplanationSpec(proto.Message): + r""" + + Attributes: + explanation_type (str): + Explanation type. + + For AutoML Image Classification models, possible values are: + + - ``image-integrated-gradients`` + - ``image-xrai`` + explanation_spec (google.cloud.aiplatform_v1.types.ExplanationSpec): + Explanation spec details. + """ + + explanation_type: str = proto.Field( + proto.STRING, + number=1, + ) + explanation_spec: explanation.ExplanationSpec = proto.Field( + proto.MESSAGE, + number=2, + message=explanation.ExplanationSpec, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=10, + ) + metrics_schema_uri: str = proto.Field( + proto.STRING, + number=2, + ) + metrics: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=3, + message=struct_pb2.Value, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + slice_dimensions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + data_item_schema_uri: str = proto.Field( + proto.STRING, + number=6, + ) + annotation_schema_uri: str = proto.Field( + proto.STRING, + number=7, + ) + model_explanation: explanation.ModelExplanation = proto.Field( + proto.MESSAGE, + number=8, + message=explanation.ModelExplanation, + ) + explanation_specs: MutableSequence[ModelEvaluationExplanationSpec] = ( + proto.RepeatedField( + proto.MESSAGE, + number=9, + message=ModelEvaluationExplanationSpec, + ) + ) + metadata: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=11, + message=struct_pb2.Value, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation_slice.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation_slice.py new file mode 100644 index 0000000000000000000000000000000000000000..98cbcda3baff00a90e825b022aa411fd85192ed2 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_evaluation_slice.py @@ -0,0 +1,324 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import explanation +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ModelEvaluationSlice", + }, +) + + +class ModelEvaluationSlice(proto.Message): + r"""A collection of metrics calculated by comparing Model's + predictions on a slice of the test data against ground truth + annotations. + + Attributes: + name (str): + Output only. The resource name of the + ModelEvaluationSlice. + slice_ (google.cloud.aiplatform_v1.types.ModelEvaluationSlice.Slice): + Output only. The slice of the test data that + is used to evaluate the Model. + metrics_schema_uri (str): + Output only. Points to a YAML file stored on Google Cloud + Storage describing the + [metrics][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics] + of this ModelEvaluationSlice. The schema is defined as an + OpenAPI 3.0.2 `Schema + Object `__. + metrics (google.protobuf.struct_pb2.Value): + Output only. Sliced evaluation metrics of the Model. The + schema of the metrics is stored in + [metrics_schema_uri][google.cloud.aiplatform.v1.ModelEvaluationSlice.metrics_schema_uri] + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + ModelEvaluationSlice was created. + model_explanation (google.cloud.aiplatform_v1.types.ModelExplanation): + Output only. Aggregated explanation metrics + for the Model's prediction output over the data + this ModelEvaluation uses. This field is + populated only if the Model is evaluated with + explanations, and only for tabular Models. + """ + + class Slice(proto.Message): + r"""Definition of a slice. + + Attributes: + dimension (str): + Output only. The dimension of the slice. Well-known + dimensions are: + + - ``annotationSpec``: This slice is on the test data that + has either ground truth or prediction with + [AnnotationSpec.display_name][google.cloud.aiplatform.v1.AnnotationSpec.display_name] + equals to + [value][google.cloud.aiplatform.v1.ModelEvaluationSlice.Slice.value]. + - ``slice``: This slice is a user customized slice defined + by its SliceSpec. + value (str): + Output only. The value of the dimension in + this slice. + slice_spec (google.cloud.aiplatform_v1.types.ModelEvaluationSlice.Slice.SliceSpec): + Output only. Specification for how the data + was sliced. + """ + + class SliceSpec(proto.Message): + r"""Specification for how the data should be sliced. + + Attributes: + configs (MutableMapping[str, google.cloud.aiplatform_v1.types.ModelEvaluationSlice.Slice.SliceSpec.SliceConfig]): + Mapping configuration for this SliceSpec. + The key is the name of the feature. + By default, the key will be prefixed by + "instance" as a dictionary prefix for Vertex + Batch Predictions output format. + """ + + class SliceConfig(proto.Message): + r"""Specification message containing the config for this SliceSpec. When + ``kind`` is selected as ``value`` and/or ``range``, only a single + slice will be computed. When ``all_values`` is present, a separate + slice will be computed for each possible label/value for the + corresponding key in ``config``. Examples, with feature zip_code + with values 12345, 23334, 88888 and feature country with values + "US", "Canada", "Mexico" in the dataset: + + Example 1: + + :: + + { + "zip_code": { "value": { "float_value": 12345.0 } } + } + + A single slice for any data with zip_code 12345 in the dataset. + + Example 2: + + :: + + { + "zip_code": { "range": { "low": 12345, "high": 20000 } } + } + + A single slice containing data where the zip_codes between 12345 and + 20000 For this example, data with the zip_code of 12345 will be in + this slice. + + Example 3: + + :: + + { + "zip_code": { "range": { "low": 10000, "high": 20000 } }, + "country": { "value": { "string_value": "US" } } + } + + A single slice containing data where the zip_codes between 10000 and + 20000 has the country "US". For this example, data with the zip_code + of 12345 and country "US" will be in this slice. + + Example 4: + + :: + + { "country": {"all_values": { "value": true } } } + + Three slices are computed, one for each unique country in the + dataset. + + Example 5: + + :: + + { + "country": { "all_values": { "value": true } }, + "zip_code": { "value": { "float_value": 12345.0 } } + } + + Three slices are computed, one for each unique country in the + dataset where the zip_code is also 12345. For this example, data + with zip_code 12345 and country "US" will be in one slice, zip_code + 12345 and country "Canada" in another slice, and zip_code 12345 and + country "Mexico" in another slice, totaling 3 slices. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + value (google.cloud.aiplatform_v1.types.ModelEvaluationSlice.Slice.SliceSpec.Value): + A unique specific value for a given feature. Example: + ``{ "value": { "string_value": "12345" } }`` + + This field is a member of `oneof`_ ``kind``. + range_ (google.cloud.aiplatform_v1.types.ModelEvaluationSlice.Slice.SliceSpec.Range): + A range of values for a numerical feature. Example: + ``{"range":{"low":10000.0,"high":50000.0}}`` will capture + 12345 and 23334 in the slice. + + This field is a member of `oneof`_ ``kind``. + all_values (google.protobuf.wrappers_pb2.BoolValue): + If all_values is set to true, then all possible labels of + the keyed feature will have another slice computed. Example: + ``{"all_values":{"value":true}}`` + + This field is a member of `oneof`_ ``kind``. + """ + + value: "ModelEvaluationSlice.Slice.SliceSpec.Value" = proto.Field( + proto.MESSAGE, + number=1, + oneof="kind", + message="ModelEvaluationSlice.Slice.SliceSpec.Value", + ) + range_: "ModelEvaluationSlice.Slice.SliceSpec.Range" = proto.Field( + proto.MESSAGE, + number=2, + oneof="kind", + message="ModelEvaluationSlice.Slice.SliceSpec.Range", + ) + all_values: wrappers_pb2.BoolValue = proto.Field( + proto.MESSAGE, + number=3, + oneof="kind", + message=wrappers_pb2.BoolValue, + ) + + class Range(proto.Message): + r"""A range of values for slice(s). ``low`` is inclusive, ``high`` is + exclusive. + + Attributes: + low (float): + Inclusive low value for the range. + high (float): + Exclusive high value for the range. + """ + + low: float = proto.Field( + proto.FLOAT, + number=1, + ) + high: float = proto.Field( + proto.FLOAT, + number=2, + ) + + class Value(proto.Message): + r"""Single value that supports strings and floats. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + string_value (str): + String type. + + This field is a member of `oneof`_ ``kind``. + float_value (float): + Float type. + + This field is a member of `oneof`_ ``kind``. + """ + + string_value: str = proto.Field( + proto.STRING, + number=1, + oneof="kind", + ) + float_value: float = proto.Field( + proto.FLOAT, + number=2, + oneof="kind", + ) + + configs: MutableMapping[ + str, "ModelEvaluationSlice.Slice.SliceSpec.SliceConfig" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message="ModelEvaluationSlice.Slice.SliceSpec.SliceConfig", + ) + + dimension: str = proto.Field( + proto.STRING, + number=1, + ) + value: str = proto.Field( + proto.STRING, + number=2, + ) + slice_spec: "ModelEvaluationSlice.Slice.SliceSpec" = proto.Field( + proto.MESSAGE, + number=3, + message="ModelEvaluationSlice.Slice.SliceSpec", + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + slice_: Slice = proto.Field( + proto.MESSAGE, + number=2, + message=Slice, + ) + metrics_schema_uri: str = proto.Field( + proto.STRING, + number=3, + ) + metrics: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=4, + message=struct_pb2.Value, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + model_explanation: explanation.ModelExplanation = proto.Field( + proto.MESSAGE, + number=6, + message=explanation.ModelExplanation, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_garden_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_garden_service.py new file mode 100644 index 0000000000000000000000000000000000000000..2e50eed22880565d0afa74e982e9ab1de2d5092c --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_garden_service.py @@ -0,0 +1,421 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import model as gca_model +from google.cloud.aiplatform_v1.types import operation + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PublisherModelView", + "GetPublisherModelRequest", + "DeployRequest", + "DeployResponse", + "DeployOperationMetadata", + }, +) + + +class PublisherModelView(proto.Enum): + r"""View enumeration of PublisherModel. + + Values: + PUBLISHER_MODEL_VIEW_UNSPECIFIED (0): + The default / unset value. The API will + default to the BASIC view. + PUBLISHER_MODEL_VIEW_BASIC (1): + Include basic metadata about the publisher + model, but not the full contents. + PUBLISHER_MODEL_VIEW_FULL (2): + Include everything. + PUBLISHER_MODEL_VERSION_VIEW_BASIC (3): + Include: VersionId, ModelVersionExternalName, + and SupportedActions. + """ + + PUBLISHER_MODEL_VIEW_UNSPECIFIED = 0 + PUBLISHER_MODEL_VIEW_BASIC = 1 + PUBLISHER_MODEL_VIEW_FULL = 2 + PUBLISHER_MODEL_VERSION_VIEW_BASIC = 3 + + +class GetPublisherModelRequest(proto.Message): + r"""Request message for + [ModelGardenService.GetPublisherModel][google.cloud.aiplatform.v1.ModelGardenService.GetPublisherModel] + + Attributes: + name (str): + Required. The name of the PublisherModel resource. Format: + ``publishers/{publisher}/models/{publisher_model}`` + language_code (str): + Optional. The IETF BCP-47 language code + representing the language in which the publisher + model's text information should be written in. + view (google.cloud.aiplatform_v1.types.PublisherModelView): + Optional. PublisherModel view specifying + which fields to read. + is_hugging_face_model (bool): + Optional. Boolean indicates whether the + requested model is a Hugging Face model. + hugging_face_token (str): + Optional. Token used to access Hugging Face + gated models. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + language_code: str = proto.Field( + proto.STRING, + number=2, + ) + view: "PublisherModelView" = proto.Field( + proto.ENUM, + number=3, + enum="PublisherModelView", + ) + is_hugging_face_model: bool = proto.Field( + proto.BOOL, + number=5, + ) + hugging_face_token: str = proto.Field( + proto.STRING, + number=6, + ) + + +class DeployRequest(proto.Message): + r"""Request message for + [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + publisher_model_name (str): + The Model Garden model to deploy. Format: + ``publishers/{publisher}/models/{publisher_model}@{version_id}``, + or + ``publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001``. + + This field is a member of `oneof`_ ``artifacts``. + hugging_face_model_id (str): + The Hugging Face model to deploy. Format: Hugging Face model + ID like ``google/gemma-2-2b-it``. + + This field is a member of `oneof`_ ``artifacts``. + destination (str): + Required. The resource name of the Location to deploy the + model in. Format: + ``projects/{project}/locations/{location}`` + model_config (google.cloud.aiplatform_v1.types.DeployRequest.ModelConfig): + Optional. The model config to use for the + deployment. If not specified, the default model + config will be used. + endpoint_config (google.cloud.aiplatform_v1.types.DeployRequest.EndpointConfig): + Optional. The endpoint config to use for the + deployment. If not specified, the default + endpoint config will be used. + deploy_config (google.cloud.aiplatform_v1.types.DeployRequest.DeployConfig): + Optional. The deploy config to use for the + deployment. If not specified, the default deploy + config will be used. + """ + + class ModelConfig(proto.Message): + r"""The model config to use for the deployment. + + Attributes: + accept_eula (bool): + Optional. Whether the user accepts the End + User License Agreement (EULA) for the model. + hugging_face_access_token (str): + Optional. The Hugging Face read access token + used to access the model artifacts of gated + models. + hugging_face_cache_enabled (bool): + Optional. If true, the model will deploy with + a cached version instead of directly downloading + the model artifacts from Hugging Face. This is + suitable for VPC-SC users with limited internet + access. + model_display_name (str): + Optional. The user-specified display name of + the uploaded model. If not set, a default name + will be used. + container_spec (google.cloud.aiplatform_v1.types.ModelContainerSpec): + Optional. The specification of the container + that is to be used when deploying. If not set, + the default container spec will be used. + model_user_id (str): + Optional. The ID to use for the uploaded Model, which will + become the final component of the model resource name. When + not provided, Vertex AI will generate a value for this ID. + When Model Registry model is provided, this field will be + ignored. + + This value may be up to 63 characters, and valid characters + are ``[a-z0-9_-]``. The first character cannot be a number + or hyphen. + """ + + accept_eula: bool = proto.Field( + proto.BOOL, + number=1, + ) + hugging_face_access_token: str = proto.Field( + proto.STRING, + number=2, + ) + hugging_face_cache_enabled: bool = proto.Field( + proto.BOOL, + number=3, + ) + model_display_name: str = proto.Field( + proto.STRING, + number=4, + ) + container_spec: gca_model.ModelContainerSpec = proto.Field( + proto.MESSAGE, + number=5, + message=gca_model.ModelContainerSpec, + ) + model_user_id: str = proto.Field( + proto.STRING, + number=6, + ) + + class EndpointConfig(proto.Message): + r"""The endpoint config to use for the deployment. + + Attributes: + endpoint_display_name (str): + Optional. The user-specified display name of + the endpoint. If not set, a default name will be + used. + dedicated_endpoint_enabled (bool): + Optional. Deprecated. Use dedicated_endpoint_disabled + instead. If true, the endpoint will be exposed through a + dedicated DNS [Endpoint.dedicated_endpoint_dns]. Your + request to the dedicated DNS will be isolated from other + users' traffic and will have better performance and + reliability. Note: Once you enabled dedicated endpoint, you + won't be able to send request to the shared DNS + {region}-aiplatform.googleapis.com. The limitations will be + removed soon. + dedicated_endpoint_disabled (bool): + Optional. By default, if dedicated endpoint is enabled, the + endpoint will be exposed through a dedicated DNS + [Endpoint.dedicated_endpoint_dns]. Your request to the + dedicated DNS will be isolated from other users' traffic and + will have better performance and reliability. Note: Once you + enabled dedicated endpoint, you won't be able to send + request to the shared DNS + {region}-aiplatform.googleapis.com. The limitations will be + removed soon. + + If this field is set to true, the dedicated endpoint will be + disabled and the deployed model will be exposed through the + shared DNS {region}-aiplatform.googleapis.com. + endpoint_user_id (str): + Optional. Immutable. The ID to use for endpoint, which will + become the final component of the endpoint resource name. If + not provided, Vertex AI will generate a value for this ID. + + If the first character is a letter, this value may be up to + 63 characters, and valid characters are ``[a-z0-9-]``. The + last character must be a letter or number. + + If the first character is a number, this value may be up to + 9 characters, and valid characters are ``[0-9]`` with no + leading zeros. + + When using HTTP/JSON, this field is populated based on a + query string argument, such as ``?endpoint_id=12345``. This + is the fallback for fields that are not included in either + the URI or the body. + """ + + endpoint_display_name: str = proto.Field( + proto.STRING, + number=1, + ) + dedicated_endpoint_enabled: bool = proto.Field( + proto.BOOL, + number=2, + ) + dedicated_endpoint_disabled: bool = proto.Field( + proto.BOOL, + number=4, + ) + endpoint_user_id: str = proto.Field( + proto.STRING, + number=3, + ) + + class DeployConfig(proto.Message): + r"""The deploy config to use for the deployment. + + Attributes: + dedicated_resources (google.cloud.aiplatform_v1.types.DedicatedResources): + Optional. The dedicated resources to use for + the endpoint. If not set, the default resources + will be used. + fast_tryout_enabled (bool): + Optional. If true, enable the QMT fast tryout + feature for this model if possible. + system_labels (MutableMapping[str, str]): + Optional. System labels for Model Garden + deployments. These labels are managed by Google + and for tracking purposes only. + """ + + dedicated_resources: machine_resources.DedicatedResources = proto.Field( + proto.MESSAGE, + number=1, + message=machine_resources.DedicatedResources, + ) + fast_tryout_enabled: bool = proto.Field( + proto.BOOL, + number=2, + ) + system_labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=3, + ) + + publisher_model_name: str = proto.Field( + proto.STRING, + number=1, + oneof="artifacts", + ) + hugging_face_model_id: str = proto.Field( + proto.STRING, + number=2, + oneof="artifacts", + ) + destination: str = proto.Field( + proto.STRING, + number=4, + ) + model_config: ModelConfig = proto.Field( + proto.MESSAGE, + number=5, + message=ModelConfig, + ) + endpoint_config: EndpointConfig = proto.Field( + proto.MESSAGE, + number=6, + message=EndpointConfig, + ) + deploy_config: DeployConfig = proto.Field( + proto.MESSAGE, + number=7, + message=DeployConfig, + ) + + +class DeployResponse(proto.Message): + r"""Response message for + [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy]. + + Attributes: + publisher_model (str): + Output only. The name of the PublisherModel resource. + Format: + ``publishers/{publisher}/models/{publisher_model}@{version_id}``, + or + ``publishers/hf-{hugging-face-author}/models/{hugging-face-model-name}@001`` + endpoint (str): + Output only. The name of the Endpoint created. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + model (str): + Output only. The name of the Model created. Format: + ``projects/{project}/locations/{location}/models/{model}`` + """ + + publisher_model: str = proto.Field( + proto.STRING, + number=1, + ) + endpoint: str = proto.Field( + proto.STRING, + number=2, + ) + model: str = proto.Field( + proto.STRING, + number=3, + ) + + +class DeployOperationMetadata(proto.Message): + r"""Runtime operation information for + [ModelGardenService.Deploy][google.cloud.aiplatform.v1.ModelGardenService.Deploy]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + publisher_model (str): + Output only. The name of the model resource. + destination (str): + Output only. The resource name of the Location to deploy the + model in. Format: + ``projects/{project}/locations/{location}`` + project_number (int): + Output only. The project number where the + deploy model request is sent. + model_id (str): + Output only. The model id to be used at query + time. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + publisher_model: str = proto.Field( + proto.STRING, + number=2, + ) + destination: str = proto.Field( + proto.STRING, + number=3, + ) + project_number: int = proto.Field( + proto.INT64, + number=4, + ) + model_id: str = proto.Field( + proto.STRING, + number=5, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_monitoring.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_monitoring.py new file mode 100644 index 0000000000000000000000000000000000000000..8ded08af30b3b346b70fdd9237ba3945d3229457 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/model_monitoring.py @@ -0,0 +1,451 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import io + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ModelMonitoringObjectiveConfig", + "ModelMonitoringAlertConfig", + "ThresholdConfig", + "SamplingStrategy", + }, +) + + +class ModelMonitoringObjectiveConfig(proto.Message): + r"""The objective configuration for model monitoring, including + the information needed to detect anomalies for one particular + model. + + Attributes: + training_dataset (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.TrainingDataset): + Training dataset for models. This field has + to be set only if + TrainingPredictionSkewDetectionConfig is + specified. + training_prediction_skew_detection_config (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.TrainingPredictionSkewDetectionConfig): + The config for skew between training data and + prediction data. + prediction_drift_detection_config (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.PredictionDriftDetectionConfig): + The config for drift of prediction data. + explanation_config (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.ExplanationConfig): + The config for integrating with Vertex + Explainable AI. + """ + + class TrainingDataset(proto.Message): + r"""Training Dataset information. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dataset (str): + The resource name of the Dataset used to + train this Model. + + This field is a member of `oneof`_ ``data_source``. + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + The Google Cloud Storage uri of the unmanaged + Dataset used to train this Model. + + This field is a member of `oneof`_ ``data_source``. + bigquery_source (google.cloud.aiplatform_v1.types.BigQuerySource): + The BigQuery table of the unmanaged Dataset + used to train this Model. + + This field is a member of `oneof`_ ``data_source``. + data_format (str): + Data format of the dataset, only applicable + if the input is from Google Cloud Storage. + The possible formats are: + + "tf-record" + The source file is a TFRecord file. + + "csv" + The source file is a CSV file. + "jsonl" + The source file is a JSONL file. + target_field (str): + The target field name the model is to + predict. This field will be excluded when doing + Predict and (or) Explain for the training data. + logging_sampling_strategy (google.cloud.aiplatform_v1.types.SamplingStrategy): + Strategy to sample data from Training + Dataset. If not set, we process the whole + dataset. + """ + + dataset: str = proto.Field( + proto.STRING, + number=3, + oneof="data_source", + ) + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=4, + oneof="data_source", + message=io.GcsSource, + ) + bigquery_source: io.BigQuerySource = proto.Field( + proto.MESSAGE, + number=5, + oneof="data_source", + message=io.BigQuerySource, + ) + data_format: str = proto.Field( + proto.STRING, + number=2, + ) + target_field: str = proto.Field( + proto.STRING, + number=6, + ) + logging_sampling_strategy: "SamplingStrategy" = proto.Field( + proto.MESSAGE, + number=7, + message="SamplingStrategy", + ) + + class TrainingPredictionSkewDetectionConfig(proto.Message): + r"""The config for Training & Prediction data skew detection. It + specifies the training dataset sources and the skew detection + parameters. + + Attributes: + skew_thresholds (MutableMapping[str, google.cloud.aiplatform_v1.types.ThresholdConfig]): + Key is the feature name and value is the + threshold. If a feature needs to be monitored + for skew, a value threshold must be configured + for that feature. The threshold here is against + feature distribution distance between the + training and prediction feature. + attribution_score_skew_thresholds (MutableMapping[str, google.cloud.aiplatform_v1.types.ThresholdConfig]): + Key is the feature name and value is the + threshold. The threshold here is against + attribution score distance between the training + and prediction feature. + default_skew_threshold (google.cloud.aiplatform_v1.types.ThresholdConfig): + Skew anomaly detection threshold used by all + features. When the per-feature thresholds are + not set, this field can be used to specify a + threshold for all features. + """ + + skew_thresholds: MutableMapping[str, "ThresholdConfig"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message="ThresholdConfig", + ) + attribution_score_skew_thresholds: MutableMapping[str, "ThresholdConfig"] = ( + proto.MapField( + proto.STRING, + proto.MESSAGE, + number=2, + message="ThresholdConfig", + ) + ) + default_skew_threshold: "ThresholdConfig" = proto.Field( + proto.MESSAGE, + number=6, + message="ThresholdConfig", + ) + + class PredictionDriftDetectionConfig(proto.Message): + r"""The config for Prediction data drift detection. + + Attributes: + drift_thresholds (MutableMapping[str, google.cloud.aiplatform_v1.types.ThresholdConfig]): + Key is the feature name and value is the + threshold. If a feature needs to be monitored + for drift, a value threshold must be configured + for that feature. The threshold here is against + feature distribution distance between different + time windws. + attribution_score_drift_thresholds (MutableMapping[str, google.cloud.aiplatform_v1.types.ThresholdConfig]): + Key is the feature name and value is the + threshold. The threshold here is against + attribution score distance between different + time windows. + default_drift_threshold (google.cloud.aiplatform_v1.types.ThresholdConfig): + Drift anomaly detection threshold used by all + features. When the per-feature thresholds are + not set, this field can be used to specify a + threshold for all features. + """ + + drift_thresholds: MutableMapping[str, "ThresholdConfig"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message="ThresholdConfig", + ) + attribution_score_drift_thresholds: MutableMapping[str, "ThresholdConfig"] = ( + proto.MapField( + proto.STRING, + proto.MESSAGE, + number=2, + message="ThresholdConfig", + ) + ) + default_drift_threshold: "ThresholdConfig" = proto.Field( + proto.MESSAGE, + number=5, + message="ThresholdConfig", + ) + + class ExplanationConfig(proto.Message): + r"""The config for integrating with Vertex Explainable AI. Only + applicable if the Model has explanation_spec populated. + + Attributes: + enable_feature_attributes (bool): + If want to analyze the Vertex Explainable AI + feature attribute scores or not. If set to true, + Vertex AI will log the feature attributions from + explain response and do the skew/drift detection + for them. + explanation_baseline (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline): + Predictions generated by the + BatchPredictionJob using baseline dataset. + """ + + class ExplanationBaseline(proto.Message): + r"""Output from + [BatchPredictionJob][google.cloud.aiplatform.v1.BatchPredictionJob] + for Model Monitoring baseline dataset, which can be used to generate + baseline attribution scores. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs (google.cloud.aiplatform_v1.types.GcsDestination): + Cloud Storage location for BatchExplain + output. + + This field is a member of `oneof`_ ``destination``. + bigquery (google.cloud.aiplatform_v1.types.BigQueryDestination): + BigQuery location for BatchExplain output. + + This field is a member of `oneof`_ ``destination``. + prediction_format (google.cloud.aiplatform_v1.types.ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline.PredictionFormat): + The storage format of the predictions + generated BatchPrediction job. + """ + + class PredictionFormat(proto.Enum): + r"""The storage format of the predictions generated + BatchPrediction job. + + Values: + PREDICTION_FORMAT_UNSPECIFIED (0): + Should not be set. + JSONL (2): + Predictions are in JSONL files. + BIGQUERY (3): + Predictions are in BigQuery. + """ + + PREDICTION_FORMAT_UNSPECIFIED = 0 + JSONL = 2 + BIGQUERY = 3 + + gcs: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=2, + oneof="destination", + message=io.GcsDestination, + ) + bigquery: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=3, + oneof="destination", + message=io.BigQueryDestination, + ) + prediction_format: "ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline.PredictionFormat" = proto.Field( + proto.ENUM, + number=1, + enum="ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline.PredictionFormat", + ) + + enable_feature_attributes: bool = proto.Field( + proto.BOOL, + number=1, + ) + explanation_baseline: ( + "ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline" + ) = proto.Field( + proto.MESSAGE, + number=2, + message="ModelMonitoringObjectiveConfig.ExplanationConfig.ExplanationBaseline", + ) + + training_dataset: TrainingDataset = proto.Field( + proto.MESSAGE, + number=1, + message=TrainingDataset, + ) + training_prediction_skew_detection_config: TrainingPredictionSkewDetectionConfig = ( + proto.Field( + proto.MESSAGE, + number=2, + message=TrainingPredictionSkewDetectionConfig, + ) + ) + prediction_drift_detection_config: PredictionDriftDetectionConfig = proto.Field( + proto.MESSAGE, + number=3, + message=PredictionDriftDetectionConfig, + ) + explanation_config: ExplanationConfig = proto.Field( + proto.MESSAGE, + number=5, + message=ExplanationConfig, + ) + + +class ModelMonitoringAlertConfig(proto.Message): + r"""The alert config for model monitoring. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + email_alert_config (google.cloud.aiplatform_v1.types.ModelMonitoringAlertConfig.EmailAlertConfig): + Email alert config. + + This field is a member of `oneof`_ ``alert``. + enable_logging (bool): + Dump the anomalies to Cloud Logging. The anomalies will be + put to json payload encoded from proto + [ModelMonitoringStatsAnomalies][google.cloud.aiplatform.v1.ModelMonitoringStatsAnomalies]. + This can be further synced to Pub/Sub or any other services + supported by Cloud Logging. + notification_channels (MutableSequence[str]): + Resource names of the NotificationChannels to send alert. + Must be of the format + ``projects//notificationChannels/`` + """ + + class EmailAlertConfig(proto.Message): + r"""The config for email alert. + + Attributes: + user_emails (MutableSequence[str]): + The email addresses to send the alert. + """ + + user_emails: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + email_alert_config: EmailAlertConfig = proto.Field( + proto.MESSAGE, + number=1, + oneof="alert", + message=EmailAlertConfig, + ) + enable_logging: bool = proto.Field( + proto.BOOL, + number=2, + ) + notification_channels: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + +class ThresholdConfig(proto.Message): + r"""The config for feature monitoring threshold. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + value (float): + Specify a threshold value that can trigger + the alert. If this threshold config is for + feature distribution distance: + + 1. For categorical feature, the distribution + distance is calculated by L-inifinity + norm. + 2. For numerical feature, the distribution + distance is calculated by + Jensen–Shannon divergence. + Each feature must have a non-zero threshold if + they need to be monitored. Otherwise no alert + will be triggered for that feature. + + This field is a member of `oneof`_ ``threshold``. + """ + + value: float = proto.Field( + proto.DOUBLE, + number=1, + oneof="threshold", + ) + + +class SamplingStrategy(proto.Message): + r"""Sampling Strategy for logging, can be for both training and + prediction dataset. + + Attributes: + random_sample_config (google.cloud.aiplatform_v1.types.SamplingStrategy.RandomSampleConfig): + Random sample config. Will support more + sampling strategies later. + """ + + class RandomSampleConfig(proto.Message): + r"""Requests are randomly selected. + + Attributes: + sample_rate (float): + Sample rate (0, 1] + """ + + sample_rate: float = proto.Field( + proto.DOUBLE, + number=1, + ) + + random_sample_config: RandomSampleConfig = proto.Field( + proto.MESSAGE, + number=1, + message=RandomSampleConfig, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/nas_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/nas_job.py new file mode 100644 index 0000000000000000000000000000000000000000..a52163a0ffc9f98223a43ce7a744c85bcf32da02 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/nas_job.py @@ -0,0 +1,548 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import custom_job +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import job_state +from google.cloud.aiplatform_v1.types import study +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "NasJob", + "NasTrialDetail", + "NasJobSpec", + "NasJobOutput", + "NasTrial", + }, +) + + +class NasJob(proto.Message): + r"""Represents a Neural Architecture Search (NAS) job. + + Attributes: + name (str): + Output only. Resource name of the NasJob. + display_name (str): + Required. The display name of the NasJob. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + nas_job_spec (google.cloud.aiplatform_v1.types.NasJobSpec): + Required. The specification of a NasJob. + nas_job_output (google.cloud.aiplatform_v1.types.NasJobOutput): + Output only. Output of the NasJob. + state (google.cloud.aiplatform_v1.types.JobState): + Output only. The detailed state of the job. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasJob was + created. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasJob for the first time entered + the ``JOB_STATE_RUNNING`` state. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasJob entered any of the + following states: ``JOB_STATE_SUCCEEDED``, + ``JOB_STATE_FAILED``, ``JOB_STATE_CANCELLED``. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasJob was most + recently updated. + error (google.rpc.status_pb2.Status): + Output only. Only populated when job's state is + JOB_STATE_FAILED or JOB_STATE_CANCELLED. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize NasJobs. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key options for a + NasJob. If this is set, then all resources + created by the NasJob will be encrypted with the + provided encryption key. + enable_restricted_image_training (bool): + Optional. Enable a separation of Custom model + training and restricted image training for + tenant project. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + nas_job_spec: "NasJobSpec" = proto.Field( + proto.MESSAGE, + number=4, + message="NasJobSpec", + ) + nas_job_output: "NasJobOutput" = proto.Field( + proto.MESSAGE, + number=5, + message="NasJobOutput", + ) + state: job_state.JobState = proto.Field( + proto.ENUM, + number=6, + enum=job_state.JobState, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=10, + message=timestamp_pb2.Timestamp, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=11, + message=status_pb2.Status, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=12, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=13, + message=gca_encryption_spec.EncryptionSpec, + ) + enable_restricted_image_training: bool = proto.Field( + proto.BOOL, + number=14, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=15, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=16, + ) + + +class NasTrialDetail(proto.Message): + r"""Represents a NasTrial details along with its parameters. If + there is a corresponding train NasTrial, the train NasTrial is + also returned. + + Attributes: + name (str): + Output only. Resource name of the + NasTrialDetail. + parameters (str): + The parameters for the NasJob NasTrial. + search_trial (google.cloud.aiplatform_v1.types.NasTrial): + The requested search NasTrial. + train_trial (google.cloud.aiplatform_v1.types.NasTrial): + The train NasTrial corresponding to + [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial]. + Only populated if + [search_trial][google.cloud.aiplatform.v1.NasTrialDetail.search_trial] + is used for training. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + parameters: str = proto.Field( + proto.STRING, + number=2, + ) + search_trial: "NasTrial" = proto.Field( + proto.MESSAGE, + number=3, + message="NasTrial", + ) + train_trial: "NasTrial" = proto.Field( + proto.MESSAGE, + number=4, + message="NasTrial", + ) + + +class NasJobSpec(proto.Message): + r"""Represents the spec of a NasJob. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + multi_trial_algorithm_spec (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec): + The spec of multi-trial algorithms. + + This field is a member of `oneof`_ ``nas_algorithm_spec``. + resume_nas_job_id (str): + The ID of the existing NasJob in the same Project and + Location which will be used to resume search. + search_space_spec and nas_algorithm_spec are obtained from + previous NasJob hence should not provide them again for this + NasJob. + search_space_spec (str): + It defines the search space for Neural + Architecture Search (NAS). + """ + + class MultiTrialAlgorithmSpec(proto.Message): + r"""The spec of multi-trial Neural Architecture Search (NAS). + + Attributes: + multi_trial_algorithm (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm): + The multi-trial Neural Architecture Search (NAS) algorithm + type. Defaults to ``REINFORCEMENT_LEARNING``. + metric (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec): + Metric specs for the NAS job. Validation for this field is + done at ``multi_trial_algorithm_spec`` field. + search_trial_spec (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec): + Required. Spec for search trials. + train_trial_spec (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec): + Spec for train trials. Top N + [TrainTrialSpec.max_parallel_trial_count] search trials will + be trained for every M [TrainTrialSpec.frequency] trials + searched. + """ + + class MultiTrialAlgorithm(proto.Enum): + r"""The available types of multi-trial algorithms. + + Values: + MULTI_TRIAL_ALGORITHM_UNSPECIFIED (0): + Defaults to ``REINFORCEMENT_LEARNING``. + REINFORCEMENT_LEARNING (1): + The Reinforcement Learning Algorithm for + Multi-trial Neural Architecture Search (NAS). + GRID_SEARCH (2): + The Grid Search Algorithm for Multi-trial + Neural Architecture Search (NAS). + """ + + MULTI_TRIAL_ALGORITHM_UNSPECIFIED = 0 + REINFORCEMENT_LEARNING = 1 + GRID_SEARCH = 2 + + class MetricSpec(proto.Message): + r"""Represents a metric to optimize. + + Attributes: + metric_id (str): + Required. The ID of the metric. Must not + contain whitespaces. + goal (google.cloud.aiplatform_v1.types.NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType): + Required. The optimization goal of the + metric. + """ + + class GoalType(proto.Enum): + r"""The available types of optimization goals. + + Values: + GOAL_TYPE_UNSPECIFIED (0): + Goal Type will default to maximize. + MAXIMIZE (1): + Maximize the goal metric. + MINIMIZE (2): + Minimize the goal metric. + """ + + GOAL_TYPE_UNSPECIFIED = 0 + MAXIMIZE = 1 + MINIMIZE = 2 + + metric_id: str = proto.Field( + proto.STRING, + number=1, + ) + goal: "NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType" = ( + proto.Field( + proto.ENUM, + number=2, + enum="NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec.GoalType", + ) + ) + + class SearchTrialSpec(proto.Message): + r"""Represent spec for search trials. + + Attributes: + search_trial_job_spec (google.cloud.aiplatform_v1.types.CustomJobSpec): + Required. The spec of a search trial job. The + same spec applies to all search trials. + max_trial_count (int): + Required. The maximum number of Neural + Architecture Search (NAS) trials to run. + max_parallel_trial_count (int): + Required. The maximum number of trials to run + in parallel. + max_failed_trial_count (int): + The number of failed trials that need to be + seen before failing the NasJob. + + If set to 0, Vertex AI decides how many trials + must fail before the whole job fails. + """ + + search_trial_job_spec: custom_job.CustomJobSpec = proto.Field( + proto.MESSAGE, + number=1, + message=custom_job.CustomJobSpec, + ) + max_trial_count: int = proto.Field( + proto.INT32, + number=2, + ) + max_parallel_trial_count: int = proto.Field( + proto.INT32, + number=3, + ) + max_failed_trial_count: int = proto.Field( + proto.INT32, + number=4, + ) + + class TrainTrialSpec(proto.Message): + r"""Represent spec for train trials. + + Attributes: + train_trial_job_spec (google.cloud.aiplatform_v1.types.CustomJobSpec): + Required. The spec of a train trial job. The + same spec applies to all train trials. + max_parallel_trial_count (int): + Required. The maximum number of trials to run + in parallel. + frequency (int): + Required. Frequency of search trials to start train stage. + Top N [TrainTrialSpec.max_parallel_trial_count] search + trials will be trained for every M + [TrainTrialSpec.frequency] trials searched. + """ + + train_trial_job_spec: custom_job.CustomJobSpec = proto.Field( + proto.MESSAGE, + number=1, + message=custom_job.CustomJobSpec, + ) + max_parallel_trial_count: int = proto.Field( + proto.INT32, + number=2, + ) + frequency: int = proto.Field( + proto.INT32, + number=3, + ) + + multi_trial_algorithm: ( + "NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm" + ) = proto.Field( + proto.ENUM, + number=1, + enum="NasJobSpec.MultiTrialAlgorithmSpec.MultiTrialAlgorithm", + ) + metric: "NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec" = proto.Field( + proto.MESSAGE, + number=2, + message="NasJobSpec.MultiTrialAlgorithmSpec.MetricSpec", + ) + search_trial_spec: "NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec" = ( + proto.Field( + proto.MESSAGE, + number=3, + message="NasJobSpec.MultiTrialAlgorithmSpec.SearchTrialSpec", + ) + ) + train_trial_spec: "NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec" = ( + proto.Field( + proto.MESSAGE, + number=4, + message="NasJobSpec.MultiTrialAlgorithmSpec.TrainTrialSpec", + ) + ) + + multi_trial_algorithm_spec: MultiTrialAlgorithmSpec = proto.Field( + proto.MESSAGE, + number=2, + oneof="nas_algorithm_spec", + message=MultiTrialAlgorithmSpec, + ) + resume_nas_job_id: str = proto.Field( + proto.STRING, + number=3, + ) + search_space_spec: str = proto.Field( + proto.STRING, + number=1, + ) + + +class NasJobOutput(proto.Message): + r"""Represents a uCAIP NasJob output. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + multi_trial_job_output (google.cloud.aiplatform_v1.types.NasJobOutput.MultiTrialJobOutput): + Output only. The output of this multi-trial + Neural Architecture Search (NAS) job. + + This field is a member of `oneof`_ ``output``. + """ + + class MultiTrialJobOutput(proto.Message): + r"""The output of a multi-trial Neural Architecture Search (NAS) + jobs. + + Attributes: + search_trials (MutableSequence[google.cloud.aiplatform_v1.types.NasTrial]): + Output only. List of NasTrials that were + started as part of search stage. + train_trials (MutableSequence[google.cloud.aiplatform_v1.types.NasTrial]): + Output only. List of NasTrials that were + started as part of train stage. + """ + + search_trials: MutableSequence["NasTrial"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="NasTrial", + ) + train_trials: MutableSequence["NasTrial"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="NasTrial", + ) + + multi_trial_job_output: MultiTrialJobOutput = proto.Field( + proto.MESSAGE, + number=1, + oneof="output", + message=MultiTrialJobOutput, + ) + + +class NasTrial(proto.Message): + r"""Represents a uCAIP NasJob trial. + + Attributes: + id (str): + Output only. The identifier of the NasTrial + assigned by the service. + state (google.cloud.aiplatform_v1.types.NasTrial.State): + Output only. The detailed state of the + NasTrial. + final_measurement (google.cloud.aiplatform_v1.types.Measurement): + Output only. The final measurement containing + the objective value. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasTrial was + started. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the NasTrial's status changed to + ``SUCCEEDED`` or ``INFEASIBLE``. + """ + + class State(proto.Enum): + r"""Describes a NasTrial state. + + Values: + STATE_UNSPECIFIED (0): + The NasTrial state is unspecified. + REQUESTED (1): + Indicates that a specific NasTrial has been + requested, but it has not yet been suggested by + the service. + ACTIVE (2): + Indicates that the NasTrial has been + suggested. + STOPPING (3): + Indicates that the NasTrial should stop + according to the service. + SUCCEEDED (4): + Indicates that the NasTrial is completed + successfully. + INFEASIBLE (5): + Indicates that the NasTrial should not be attempted again. + The service will set a NasTrial to INFEASIBLE when it's done + but missing the final_measurement. + """ + + STATE_UNSPECIFIED = 0 + REQUESTED = 1 + ACTIVE = 2 + STOPPING = 3 + SUCCEEDED = 4 + INFEASIBLE = 5 + + id: str = proto.Field( + proto.STRING, + number=1, + ) + state: State = proto.Field( + proto.ENUM, + number=2, + enum=State, + ) + final_measurement: study.Measurement = proto.Field( + proto.MESSAGE, + number=3, + message=study.Measurement, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/network_spec.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/network_spec.py new file mode 100644 index 0000000000000000000000000000000000000000..48d7d78b627a7755a2c7180000efdd70c3519b9a --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/network_spec.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "NetworkSpec", + }, +) + + +class NetworkSpec(proto.Message): + r"""Network spec. + + Attributes: + enable_internet_access (bool): + Whether to enable public internet access. + Default false. + network (str): + The full name of the Google Compute Engine + `network `__ + subnetwork (str): + The name of the subnet that this instance is in. Format: + ``projects/{project_id_or_number}/regions/{region}/subnetworks/{subnetwork_id}`` + """ + + enable_internet_access: bool = proto.Field( + proto.BOOL, + number=1, + ) + network: str = proto.Field( + proto.STRING, + number=2, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=3, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime.py new file mode 100644 index 0000000000000000000000000000000000000000..d26993a462d022631759f9a4e4bb1284b0ac97da --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime.py @@ -0,0 +1,564 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import network_spec as gca_network_spec +from google.cloud.aiplatform_v1.types import notebook_euc_config +from google.cloud.aiplatform_v1.types import notebook_idle_shutdown_config +from google.cloud.aiplatform_v1.types import ( + notebook_runtime_template_ref as gca_notebook_runtime_template_ref, +) +from google.cloud.aiplatform_v1.types import notebook_software_config +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "NotebookRuntimeType", + "NotebookRuntimeTemplate", + "NotebookRuntime", + }, +) + + +class NotebookRuntimeType(proto.Enum): + r"""Represents a notebook runtime type. + + Values: + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED (0): + Unspecified notebook runtime type, NotebookRuntimeType will + default to USER_DEFINED. + USER_DEFINED (1): + runtime or template with coustomized + configurations from user. + ONE_CLICK (2): + runtime or template with system defined + configurations. + """ + + NOTEBOOK_RUNTIME_TYPE_UNSPECIFIED = 0 + USER_DEFINED = 1 + ONE_CLICK = 2 + + +class NotebookRuntimeTemplate(proto.Message): + r"""A template that specifies runtime configurations such as + machine type, runtime version, network configurations, etc. + Multiple runtimes can be created from a runtime template. + + Attributes: + name (str): + The resource name of the + NotebookRuntimeTemplate. + display_name (str): + Required. The display name of the + NotebookRuntimeTemplate. The name can be up to + 128 characters long and can consist of any UTF-8 + characters. + description (str): + The description of the + NotebookRuntimeTemplate. + is_default (bool): + Output only. Deprecated: This field has no behavior. Use + notebook_runtime_type = 'ONE_CLICK' instead. + + The default template to use if not specified. + machine_spec (google.cloud.aiplatform_v1.types.MachineSpec): + Optional. Immutable. The specification of a + single machine for the template. + data_persistent_disk_spec (google.cloud.aiplatform_v1.types.PersistentDiskSpec): + Optional. The specification of [persistent + disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + attached to the runtime as data disk storage. + network_spec (google.cloud.aiplatform_v1.types.NetworkSpec): + Optional. Network spec. + service_account (str): + Deprecated: This field is ignored and the "Vertex AI + Notebook Service Account" + (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) + is used for the runtime workload identity. See + https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + for more details. For NotebookExecutionJob, use + NotebookExecutionJob.service_account instead. + + The service account that the runtime workload runs as. You + can use any service account within the same project, but you + must have the service account user permission to use the + instance. + + If not specified, the `Compute Engine default service + account `__ + is used. + etag (str): + Used to perform consistent read-modify-write + updates. If not set, a blind "overwrite" update + happens. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize the NotebookRuntimeTemplates. + + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + idle_shutdown_config (google.cloud.aiplatform_v1.types.NotebookIdleShutdownConfig): + The idle shutdown configuration of + NotebookRuntimeTemplate. This config will only + be set when idle shutdown is enabled. + euc_config (google.cloud.aiplatform_v1.types.NotebookEucConfig): + EUC configuration of the + NotebookRuntimeTemplate. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + NotebookRuntimeTemplate was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + NotebookRuntimeTemplate was most recently + updated. + notebook_runtime_type (google.cloud.aiplatform_v1.types.NotebookRuntimeType): + Optional. Immutable. The type of the notebook + runtime template. + shielded_vm_config (google.cloud.aiplatform_v1.types.ShieldedVmConfig): + Optional. Immutable. Runtime Shielded VM + spec. + network_tags (MutableSequence[str]): + Optional. The Compute Engine tags to add to runtime (see + `Tagging + instances `__). + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for the + notebook runtime. + software_config (google.cloud.aiplatform_v1.types.NotebookSoftwareConfig): + Optional. The notebook software configuration + of the notebook runtime. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + is_default: bool = proto.Field( + proto.BOOL, + number=4, + ) + machine_spec: machine_resources.MachineSpec = proto.Field( + proto.MESSAGE, + number=5, + message=machine_resources.MachineSpec, + ) + data_persistent_disk_spec: machine_resources.PersistentDiskSpec = proto.Field( + proto.MESSAGE, + number=8, + message=machine_resources.PersistentDiskSpec, + ) + network_spec: gca_network_spec.NetworkSpec = proto.Field( + proto.MESSAGE, + number=12, + message=gca_network_spec.NetworkSpec, + ) + service_account: str = proto.Field( + proto.STRING, + number=13, + ) + etag: str = proto.Field( + proto.STRING, + number=14, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=15, + ) + idle_shutdown_config: notebook_idle_shutdown_config.NotebookIdleShutdownConfig = ( + proto.Field( + proto.MESSAGE, + number=17, + message=notebook_idle_shutdown_config.NotebookIdleShutdownConfig, + ) + ) + euc_config: notebook_euc_config.NotebookEucConfig = proto.Field( + proto.MESSAGE, + number=18, + message=notebook_euc_config.NotebookEucConfig, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=10, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + notebook_runtime_type: "NotebookRuntimeType" = proto.Field( + proto.ENUM, + number=19, + enum="NotebookRuntimeType", + ) + shielded_vm_config: machine_resources.ShieldedVmConfig = proto.Field( + proto.MESSAGE, + number=20, + message=machine_resources.ShieldedVmConfig, + ) + network_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=21, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=23, + message=gca_encryption_spec.EncryptionSpec, + ) + software_config: notebook_software_config.NotebookSoftwareConfig = proto.Field( + proto.MESSAGE, + number=24, + message=notebook_software_config.NotebookSoftwareConfig, + ) + + +class NotebookRuntime(proto.Message): + r"""A runtime is a virtual machine allocated to a particular user + for a particular Notebook file on temporary basis with lifetime. + Default runtimes have a lifetime of 18 hours, while custom + runtimes last for 6 months from their creation or last upgrade. + + Attributes: + name (str): + Output only. The resource name of the + NotebookRuntime. + runtime_user (str): + Required. The user email of the + NotebookRuntime. + notebook_runtime_template_ref (google.cloud.aiplatform_v1.types.NotebookRuntimeTemplateRef): + Output only. The pointer to + NotebookRuntimeTemplate this NotebookRuntime is + created from. + proxy_uri (str): + Output only. The proxy endpoint used to + access the NotebookRuntime. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + NotebookRuntime was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + NotebookRuntime was most recently updated. + health_state (google.cloud.aiplatform_v1.types.NotebookRuntime.HealthState): + Output only. The health state of the + NotebookRuntime. + display_name (str): + Required. The display name of the + NotebookRuntime. The name can be up to 128 + characters long and can consist of any UTF-8 + characters. + description (str): + The description of the NotebookRuntime. + service_account (str): + Output only. Deprecated: This field is no longer used and + the "Vertex AI Notebook Service Account" + (service-PROJECT_NUMBER@gcp-sa-aiplatform-vm.iam.gserviceaccount.com) + is used for the runtime workload identity. See + https://cloud.google.com/iam/docs/service-agents#vertex-ai-notebook-service-account + for more details. + + The service account that the NotebookRuntime workload runs + as. + runtime_state (google.cloud.aiplatform_v1.types.NotebookRuntime.RuntimeState): + Output only. The runtime (instance) state of + the NotebookRuntime. + is_upgradable (bool): + Output only. Whether NotebookRuntime is + upgradable. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to organize your + NotebookRuntime. + + Label keys and values can be no longer than 64 characters + (Unicode codepoints), can only contain lowercase letters, + numeric characters, underscores and dashes. International + characters are allowed. No more than 64 user labels can be + associated with one NotebookRuntime (System labels are + excluded). + + See https://goo.gl/xmQnxf for more information and examples + of labels. System reserved label keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. Following + system labels exist for NotebookRuntime: + + - "aiplatform.googleapis.com/notebook_runtime_gce_instance_id": + output only, its value is the Compute Engine instance id. + - "aiplatform.googleapis.com/colab_enterprise_entry_service": + its value is either "bigquery" or "vertex"; if absent, it + should be "vertex". This is to describe the entry service, + either BigQuery or Vertex. + expiration_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + NotebookRuntime will be expired: + + 1. System Predefined NotebookRuntime: 24 hours + after creation. After expiration, system + predifined runtime will be deleted. + 2. User created NotebookRuntime: 6 months after + last upgrade. After expiration, user created + runtime will be stopped and allowed for + upgrade. + version (str): + Output only. The VM os image version of + NotebookRuntime. + notebook_runtime_type (google.cloud.aiplatform_v1.types.NotebookRuntimeType): + Output only. The type of the notebook + runtime. + machine_spec (google.cloud.aiplatform_v1.types.MachineSpec): + Output only. The specification of a single + machine used by the notebook runtime. + data_persistent_disk_spec (google.cloud.aiplatform_v1.types.PersistentDiskSpec): + Output only. The specification of [persistent + disk][https://cloud.google.com/compute/docs/disks/persistent-disks] + attached to the notebook runtime as data disk storage. + network_spec (google.cloud.aiplatform_v1.types.NetworkSpec): + Output only. Network spec of the notebook + runtime. + idle_shutdown_config (google.cloud.aiplatform_v1.types.NotebookIdleShutdownConfig): + Output only. The idle shutdown configuration + of the notebook runtime. + euc_config (google.cloud.aiplatform_v1.types.NotebookEucConfig): + Output only. EUC configuration of the + notebook runtime. + shielded_vm_config (google.cloud.aiplatform_v1.types.ShieldedVmConfig): + Output only. Runtime Shielded VM spec. + network_tags (MutableSequence[str]): + Optional. The Compute Engine tags to add to runtime (see + `Tagging + instances `__). + software_config (google.cloud.aiplatform_v1.types.NotebookSoftwareConfig): + Output only. Software config of the notebook + runtime. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Output only. Customer-managed encryption key + spec for the notebook runtime. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + class HealthState(proto.Enum): + r"""The substate of the NotebookRuntime to display health + information. + + Values: + HEALTH_STATE_UNSPECIFIED (0): + Unspecified health state. + HEALTHY (1): + NotebookRuntime is in healthy state. Applies + to ACTIVE state. + UNHEALTHY (2): + NotebookRuntime is in unhealthy state. + Applies to ACTIVE state. + """ + + HEALTH_STATE_UNSPECIFIED = 0 + HEALTHY = 1 + UNHEALTHY = 2 + + class RuntimeState(proto.Enum): + r"""The substate of the NotebookRuntime to display state of + runtime. The resource of NotebookRuntime is in ACTIVE state for + these sub state. + + Values: + RUNTIME_STATE_UNSPECIFIED (0): + Unspecified runtime state. + RUNNING (1): + NotebookRuntime is in running state. + BEING_STARTED (2): + NotebookRuntime is in starting state. This is + when the runtime is being started from a stopped + state. + BEING_STOPPED (3): + NotebookRuntime is in stopping state. + STOPPED (4): + NotebookRuntime is in stopped state. + BEING_UPGRADED (5): + NotebookRuntime is in upgrading state. It is + in the middle of upgrading process. + ERROR (100): + NotebookRuntime was unable to start/stop + properly. + INVALID (101): + NotebookRuntime is in invalid state. Cannot + be recovered. + """ + + RUNTIME_STATE_UNSPECIFIED = 0 + RUNNING = 1 + BEING_STARTED = 2 + BEING_STOPPED = 3 + STOPPED = 4 + BEING_UPGRADED = 5 + ERROR = 100 + INVALID = 101 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + runtime_user: str = proto.Field( + proto.STRING, + number=2, + ) + notebook_runtime_template_ref: ( + gca_notebook_runtime_template_ref.NotebookRuntimeTemplateRef + ) = proto.Field( + proto.MESSAGE, + number=3, + message=gca_notebook_runtime_template_ref.NotebookRuntimeTemplateRef, + ) + proxy_uri: str = proto.Field( + proto.STRING, + number=5, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + health_state: HealthState = proto.Field( + proto.ENUM, + number=8, + enum=HealthState, + ) + display_name: str = proto.Field( + proto.STRING, + number=10, + ) + description: str = proto.Field( + proto.STRING, + number=11, + ) + service_account: str = proto.Field( + proto.STRING, + number=13, + ) + runtime_state: RuntimeState = proto.Field( + proto.ENUM, + number=14, + enum=RuntimeState, + ) + is_upgradable: bool = proto.Field( + proto.BOOL, + number=15, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=16, + ) + expiration_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=17, + message=timestamp_pb2.Timestamp, + ) + version: str = proto.Field( + proto.STRING, + number=18, + ) + notebook_runtime_type: "NotebookRuntimeType" = proto.Field( + proto.ENUM, + number=19, + enum="NotebookRuntimeType", + ) + machine_spec: machine_resources.MachineSpec = proto.Field( + proto.MESSAGE, + number=20, + message=machine_resources.MachineSpec, + ) + data_persistent_disk_spec: machine_resources.PersistentDiskSpec = proto.Field( + proto.MESSAGE, + number=21, + message=machine_resources.PersistentDiskSpec, + ) + network_spec: gca_network_spec.NetworkSpec = proto.Field( + proto.MESSAGE, + number=22, + message=gca_network_spec.NetworkSpec, + ) + idle_shutdown_config: notebook_idle_shutdown_config.NotebookIdleShutdownConfig = ( + proto.Field( + proto.MESSAGE, + number=23, + message=notebook_idle_shutdown_config.NotebookIdleShutdownConfig, + ) + ) + euc_config: notebook_euc_config.NotebookEucConfig = proto.Field( + proto.MESSAGE, + number=24, + message=notebook_euc_config.NotebookEucConfig, + ) + shielded_vm_config: machine_resources.ShieldedVmConfig = proto.Field( + proto.MESSAGE, + number=32, + message=machine_resources.ShieldedVmConfig, + ) + network_tags: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=25, + ) + software_config: notebook_software_config.NotebookSoftwareConfig = proto.Field( + proto.MESSAGE, + number=31, + message=notebook_software_config.NotebookSoftwareConfig, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=28, + message=gca_encryption_spec.EncryptionSpec, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=29, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=30, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime_template_ref.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime_template_ref.py new file mode 100644 index 0000000000000000000000000000000000000000..d1f3e94f135525701aca22febdc0d914a0ad2524 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_runtime_template_ref.py @@ -0,0 +1,46 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "NotebookRuntimeTemplateRef", + }, +) + + +class NotebookRuntimeTemplateRef(proto.Message): + r"""Points to a NotebookRuntimeTemplateRef. + + Attributes: + notebook_runtime_template (str): + Immutable. A resource name of the + NotebookRuntimeTemplate. + """ + + notebook_runtime_template: str = proto.Field( + proto.STRING, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_service.py new file mode 100644 index 0000000000000000000000000000000000000000..240967ca9d9df102c7941de582cec08309b6eeee --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/notebook_service.py @@ -0,0 +1,908 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import ( + notebook_execution_job as gca_notebook_execution_job, +) +from google.cloud.aiplatform_v1.types import notebook_runtime as gca_notebook_runtime +from google.cloud.aiplatform_v1.types import operation +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "NotebookExecutionJobView", + "CreateNotebookRuntimeTemplateRequest", + "CreateNotebookRuntimeTemplateOperationMetadata", + "GetNotebookRuntimeTemplateRequest", + "ListNotebookRuntimeTemplatesRequest", + "ListNotebookRuntimeTemplatesResponse", + "DeleteNotebookRuntimeTemplateRequest", + "UpdateNotebookRuntimeTemplateRequest", + "AssignNotebookRuntimeRequest", + "AssignNotebookRuntimeOperationMetadata", + "GetNotebookRuntimeRequest", + "ListNotebookRuntimesRequest", + "ListNotebookRuntimesResponse", + "DeleteNotebookRuntimeRequest", + "UpgradeNotebookRuntimeRequest", + "UpgradeNotebookRuntimeOperationMetadata", + "UpgradeNotebookRuntimeResponse", + "StartNotebookRuntimeRequest", + "StartNotebookRuntimeOperationMetadata", + "StartNotebookRuntimeResponse", + "StopNotebookRuntimeRequest", + "StopNotebookRuntimeOperationMetadata", + "StopNotebookRuntimeResponse", + "CreateNotebookExecutionJobRequest", + "CreateNotebookExecutionJobOperationMetadata", + "GetNotebookExecutionJobRequest", + "ListNotebookExecutionJobsRequest", + "ListNotebookExecutionJobsResponse", + "DeleteNotebookExecutionJobRequest", + }, +) + + +class NotebookExecutionJobView(proto.Enum): + r"""Views for Get/List NotebookExecutionJob + + Values: + NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED (0): + When unspecified, the API defaults to the + BASIC view. + NOTEBOOK_EXECUTION_JOB_VIEW_BASIC (1): + Includes all fields except for direct + notebook inputs. + NOTEBOOK_EXECUTION_JOB_VIEW_FULL (2): + Includes all fields. + """ + + NOTEBOOK_EXECUTION_JOB_VIEW_UNSPECIFIED = 0 + NOTEBOOK_EXECUTION_JOB_VIEW_BASIC = 1 + NOTEBOOK_EXECUTION_JOB_VIEW_FULL = 2 + + +class CreateNotebookRuntimeTemplateRequest(proto.Message): + r"""Request message for + [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + NotebookRuntimeTemplate. Format: + ``projects/{project}/locations/{location}`` + notebook_runtime_template (google.cloud.aiplatform_v1.types.NotebookRuntimeTemplate): + Required. The NotebookRuntimeTemplate to + create. + notebook_runtime_template_id (str): + Optional. User specified ID for the notebook + runtime template. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + notebook_runtime_template: gca_notebook_runtime.NotebookRuntimeTemplate = ( + proto.Field( + proto.MESSAGE, + number=2, + message=gca_notebook_runtime.NotebookRuntimeTemplate, + ) + ) + notebook_runtime_template_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CreateNotebookRuntimeTemplateOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.CreateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.CreateNotebookRuntimeTemplate]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetNotebookRuntimeTemplateRequest(proto.Message): + r"""Request message for + [NotebookService.GetNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntimeTemplate] + + Attributes: + name (str): + Required. The name of the NotebookRuntimeTemplate resource. + Format: + ``projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListNotebookRuntimeTemplatesRequest(proto.Message): + r"""Request message for + [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]. + + Attributes: + parent (str): + Required. The resource name of the Location from which to + list the NotebookRuntimeTemplates. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Optional. An expression for filtering the results of the + request. For field names both snake_case and camelCase are + supported. + + - ``notebookRuntimeTemplate`` supports = and !=. + ``notebookRuntimeTemplate`` represents the + NotebookRuntimeTemplate ID, i.e. the last segment of the + NotebookRuntimeTemplate's [resource name] + [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + - ``display_name`` supports = and != + - ``labels`` supports general map functions that is: + + - ``labels.key=value`` - key:value equality + - \`labels.key:\* or labels:key - key existence + - A key including a space must be quoted. + ``labels."a key"``. + + - ``notebookRuntimeType`` supports = and !=. + notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. + - ``machineType`` supports = and !=. + - ``acceleratorType`` supports = and !=. + + Some examples: + + - ``notebookRuntimeTemplate=notebookRuntimeTemplate123`` + - ``displayName="myDisplayName"`` + - ``labels.myKey="myValue"`` + - ``notebookRuntimeType=USER_DEFINED`` + - ``machineType=e2-standard-4`` + - ``acceleratorType=NVIDIA_TESLA_T4`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListNotebookRuntimeTemplatesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesResponse.next_page_token] + of the previous + [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. Mask specifying which fields to + read. + order_by (str): + Optional. A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a field name for + descending. Supported fields: + + - ``display_name`` + - ``create_time`` + - ``update_time`` + + Example: ``display_name, create_time desc``. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListNotebookRuntimeTemplatesResponse(proto.Message): + r"""Response message for + [NotebookService.ListNotebookRuntimeTemplates][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimeTemplates]. + + Attributes: + notebook_runtime_templates (MutableSequence[google.cloud.aiplatform_v1.types.NotebookRuntimeTemplate]): + List of NotebookRuntimeTemplates in the + requested page. + next_page_token (str): + A token to retrieve next page of results. Pass to + [ListNotebookRuntimeTemplatesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimeTemplatesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + notebook_runtime_templates: MutableSequence[ + gca_notebook_runtime.NotebookRuntimeTemplate + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_notebook_runtime.NotebookRuntimeTemplate, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteNotebookRuntimeTemplateRequest(proto.Message): + r"""Request message for + [NotebookService.DeleteNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntimeTemplate]. + + Attributes: + name (str): + Required. The name of the NotebookRuntimeTemplate resource + to be deleted. Format: + ``projects/{project}/locations/{location}/notebookRuntimeTemplates/{notebook_runtime_template}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdateNotebookRuntimeTemplateRequest(proto.Message): + r"""Request message for + [NotebookService.UpdateNotebookRuntimeTemplate][google.cloud.aiplatform.v1.NotebookService.UpdateNotebookRuntimeTemplate]. + + Attributes: + notebook_runtime_template (google.cloud.aiplatform_v1.types.NotebookRuntimeTemplate): + Required. The NotebookRuntimeTemplate to + update. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask applies to the resource. For the + ``FieldMask`` definition, see + [google.protobuf.FieldMask][google.protobuf.FieldMask]. + Input format: ``{paths: "${updated_filed}"}`` Updatable + fields: + + - ``encryption_spec.kms_key_name`` + """ + + notebook_runtime_template: gca_notebook_runtime.NotebookRuntimeTemplate = ( + proto.Field( + proto.MESSAGE, + number=1, + message=gca_notebook_runtime.NotebookRuntimeTemplate, + ) + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class AssignNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]. + + Attributes: + parent (str): + Required. The resource name of the Location to get the + NotebookRuntime assignment. Format: + ``projects/{project}/locations/{location}`` + notebook_runtime_template (str): + Required. The resource name of the + NotebookRuntimeTemplate based on which a + NotebookRuntime will be assigned (reuse or + create a new one). + notebook_runtime (google.cloud.aiplatform_v1.types.NotebookRuntime): + Required. Provide runtime specific + information (e.g. runtime owner, notebook id) + used for NotebookRuntime assignment. + notebook_runtime_id (str): + Optional. User specified ID for the notebook + runtime. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + notebook_runtime_template: str = proto.Field( + proto.STRING, + number=2, + ) + notebook_runtime: gca_notebook_runtime.NotebookRuntime = proto.Field( + proto.MESSAGE, + number=3, + message=gca_notebook_runtime.NotebookRuntime, + ) + notebook_runtime_id: str = proto.Field( + proto.STRING, + number=4, + ) + + +class AssignNotebookRuntimeOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.AssignNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.AssignNotebookRuntime]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + progress_message (str): + A human-readable message that shows the + intermediate progress details of + NotebookRuntime. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class GetNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.GetNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.GetNotebookRuntime] + + Attributes: + name (str): + Required. The name of the NotebookRuntime + resource. Instead of checking whether the name + is in valid NotebookRuntime resource name + format, directly throw NotFound exception if + there is no such NotebookRuntime in spanner. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListNotebookRuntimesRequest(proto.Message): + r"""Request message for + [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]. + + Attributes: + parent (str): + Required. The resource name of the Location from which to + list the NotebookRuntimes. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Optional. An expression for filtering the results of the + request. For field names both snake_case and camelCase are + supported. + + - ``notebookRuntime`` supports = and !=. ``notebookRuntime`` + represents the NotebookRuntime ID, i.e. the last segment + of the NotebookRuntime's [resource name] + [google.cloud.aiplatform.v1.NotebookRuntime.name]. + - ``displayName`` supports = and != and regex. + - ``notebookRuntimeTemplate`` supports = and !=. + ``notebookRuntimeTemplate`` represents the + NotebookRuntimeTemplate ID, i.e. the last segment of the + NotebookRuntimeTemplate's [resource name] + [google.cloud.aiplatform.v1.NotebookRuntimeTemplate.name]. + - ``healthState`` supports = and !=. healthState enum: + [HEALTHY, UNHEALTHY, HEALTH_STATE_UNSPECIFIED]. + - ``runtimeState`` supports = and !=. runtimeState enum: + [RUNTIME_STATE_UNSPECIFIED, RUNNING, BEING_STARTED, + BEING_STOPPED, STOPPED, BEING_UPGRADED, ERROR, INVALID]. + - ``runtimeUser`` supports = and !=. + - API version is UI only: ``uiState`` supports = and !=. + uiState enum: [UI_RESOURCE_STATE_UNSPECIFIED, + UI_RESOURCE_STATE_BEING_CREATED, UI_RESOURCE_STATE_ACTIVE, + UI_RESOURCE_STATE_BEING_DELETED, + UI_RESOURCE_STATE_CREATION_FAILED]. + - ``notebookRuntimeType`` supports = and !=. + notebookRuntimeType enum: [USER_DEFINED, ONE_CLICK]. + - ``machineType`` supports = and !=. + - ``acceleratorType`` supports = and !=. + + Some examples: + + - ``notebookRuntime="notebookRuntime123"`` + - ``displayName="myDisplayName"`` and + ``displayName=~"myDisplayNameRegex"`` + - ``notebookRuntimeTemplate="notebookRuntimeTemplate321"`` + - ``healthState=HEALTHY`` + - ``runtimeState=RUNNING`` + - ``runtimeUser="test@google.com"`` + - ``uiState=UI_RESOURCE_STATE_BEING_DELETED`` + - ``notebookRuntimeType=USER_DEFINED`` + - ``machineType=e2-standard-4`` + - ``acceleratorType=NVIDIA_TESLA_T4`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListNotebookRuntimesResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesResponse.next_page_token] + of the previous + [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. Mask specifying which fields to + read. + order_by (str): + Optional. A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a field name for + descending. Supported fields: + + - ``display_name`` + - ``create_time`` + - ``update_time`` + + Example: ``display_name, create_time desc``. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + + +class ListNotebookRuntimesResponse(proto.Message): + r"""Response message for + [NotebookService.ListNotebookRuntimes][google.cloud.aiplatform.v1.NotebookService.ListNotebookRuntimes]. + + Attributes: + notebook_runtimes (MutableSequence[google.cloud.aiplatform_v1.types.NotebookRuntime]): + List of NotebookRuntimes in the requested + page. + next_page_token (str): + A token to retrieve next page of results. Pass to + [ListNotebookRuntimesRequest.page_token][google.cloud.aiplatform.v1.ListNotebookRuntimesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + notebook_runtimes: MutableSequence[gca_notebook_runtime.NotebookRuntime] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_notebook_runtime.NotebookRuntime, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.DeleteNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.DeleteNotebookRuntime]. + + Attributes: + name (str): + Required. The name of the NotebookRuntime + resource to be deleted. Instead of checking + whether the name is in valid NotebookRuntime + resource name format, directly throw NotFound + exception if there is no such NotebookRuntime in + spanner. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpgradeNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. + + Attributes: + name (str): + Required. The name of the NotebookRuntime + resource to be upgrade. Instead of checking + whether the name is in valid NotebookRuntime + resource name format, directly throw NotFound + exception if there is no such NotebookRuntime in + spanner. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpgradeNotebookRuntimeOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + progress_message (str): + A human-readable message that shows the + intermediate progress details of + NotebookRuntime. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpgradeNotebookRuntimeResponse(proto.Message): + r"""Response message for + [NotebookService.UpgradeNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.UpgradeNotebookRuntime]. + + """ + + +class StartNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. + + Attributes: + name (str): + Required. The name of the NotebookRuntime + resource to be started. Instead of checking + whether the name is in valid NotebookRuntime + resource name format, directly throw NotFound + exception if there is no such NotebookRuntime in + spanner. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class StartNotebookRuntimeOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + progress_message (str): + A human-readable message that shows the + intermediate progress details of + NotebookRuntime. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class StartNotebookRuntimeResponse(proto.Message): + r"""Response message for + [NotebookService.StartNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StartNotebookRuntime]. + + """ + + +class StopNotebookRuntimeRequest(proto.Message): + r"""Request message for + [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]. + + Attributes: + name (str): + Required. The name of the NotebookRuntime + resource to be stopped. Instead of checking + whether the name is in valid NotebookRuntime + resource name format, directly throw NotFound + exception if there is no such NotebookRuntime in + spanner. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class StopNotebookRuntimeOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class StopNotebookRuntimeResponse(proto.Message): + r"""Response message for + [NotebookService.StopNotebookRuntime][google.cloud.aiplatform.v1.NotebookService.StopNotebookRuntime]. + + """ + + +class CreateNotebookExecutionJobRequest(proto.Message): + r"""Request message for [NotebookService.CreateNotebookExecutionJob] + + Attributes: + parent (str): + Required. The resource name of the Location to create the + NotebookExecutionJob. Format: + ``projects/{project}/locations/{location}`` + notebook_execution_job (google.cloud.aiplatform_v1.types.NotebookExecutionJob): + Required. The NotebookExecutionJob to create. + notebook_execution_job_id (str): + Optional. User specified ID for the + NotebookExecutionJob. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + notebook_execution_job: gca_notebook_execution_job.NotebookExecutionJob = ( + proto.Field( + proto.MESSAGE, + number=2, + message=gca_notebook_execution_job.NotebookExecutionJob, + ) + ) + notebook_execution_job_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CreateNotebookExecutionJobOperationMetadata(proto.Message): + r"""Metadata information for + [NotebookService.CreateNotebookExecutionJob][google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + progress_message (str): + A human-readable message that shows the + intermediate progress details of + NotebookRuntime. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class GetNotebookExecutionJobRequest(proto.Message): + r"""Request message for [NotebookService.GetNotebookExecutionJob] + + Attributes: + name (str): + Required. The name of the + NotebookExecutionJob resource. + view (google.cloud.aiplatform_v1.types.NotebookExecutionJobView): + Optional. The NotebookExecutionJob view. + Defaults to BASIC. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + view: "NotebookExecutionJobView" = proto.Field( + proto.ENUM, + number=6, + enum="NotebookExecutionJobView", + ) + + +class ListNotebookExecutionJobsRequest(proto.Message): + r"""Request message for [NotebookService.ListNotebookExecutionJobs] + + Attributes: + parent (str): + Required. The resource name of the Location from which to + list the NotebookExecutionJobs. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Optional. An expression for filtering the results of the + request. For field names both snake_case and camelCase are + supported. + + - ``notebookExecutionJob`` supports = and !=. + ``notebookExecutionJob`` represents the + NotebookExecutionJob ID. + - ``displayName`` supports = and != and regex. + - ``schedule`` supports = and != and regex. + + Some examples: + + - ``notebookExecutionJob="123"`` + - ``notebookExecutionJob="my-execution-job"`` + - ``displayName="myDisplayName"`` and + ``displayName=~"myDisplayNameRegex"`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListNotebookExecutionJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListNotebookExecutionJobsResponse.next_page_token] + of the previous + [NotebookService.ListNotebookExecutionJobs][google.cloud.aiplatform.v1.NotebookService.ListNotebookExecutionJobs] + call. + order_by (str): + Optional. A comma-separated list of fields to order by, + sorted in ascending order. Use "desc" after a field name for + descending. Supported fields: + + - ``display_name`` + - ``create_time`` + - ``update_time`` + + Example: ``display_name, create_time desc``. + view (google.cloud.aiplatform_v1.types.NotebookExecutionJobView): + Optional. The NotebookExecutionJob view. + Defaults to BASIC. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + view: "NotebookExecutionJobView" = proto.Field( + proto.ENUM, + number=6, + enum="NotebookExecutionJobView", + ) + + +class ListNotebookExecutionJobsResponse(proto.Message): + r"""Response message for [NotebookService.CreateNotebookExecutionJob] + + Attributes: + notebook_execution_jobs (MutableSequence[google.cloud.aiplatform_v1.types.NotebookExecutionJob]): + List of NotebookExecutionJobs in the + requested page. + next_page_token (str): + A token to retrieve next page of results. Pass to + [ListNotebookExecutionJobsRequest.page_token][google.cloud.aiplatform.v1.ListNotebookExecutionJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + notebook_execution_jobs: MutableSequence[ + gca_notebook_execution_job.NotebookExecutionJob + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_notebook_execution_job.NotebookExecutionJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteNotebookExecutionJobRequest(proto.Message): + r"""Request message for [NotebookService.DeleteNotebookExecutionJob] + + Attributes: + name (str): + Required. The name of the + NotebookExecutionJob resource to be deleted. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/openapi.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/openapi.py new file mode 100644 index 0000000000000000000000000000000000000000..c184c6fb028d7ec2047cb9f9663892e1c5675ce9 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/openapi.py @@ -0,0 +1,277 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Type", + "Schema", + }, +) + + +class Type(proto.Enum): + r"""Type contains the list of OpenAPI data types as defined by + https://swagger.io/docs/specification/data-models/data-types/ + + Values: + TYPE_UNSPECIFIED (0): + Not specified, should not be used. + STRING (1): + OpenAPI string type + NUMBER (2): + OpenAPI number type + INTEGER (3): + OpenAPI integer type + BOOLEAN (4): + OpenAPI boolean type + ARRAY (5): + OpenAPI array type + OBJECT (6): + OpenAPI object type + """ + + TYPE_UNSPECIFIED = 0 + STRING = 1 + NUMBER = 2 + INTEGER = 3 + BOOLEAN = 4 + ARRAY = 5 + OBJECT = 6 + + +class Schema(proto.Message): + r"""Schema is used to define the format of input/output data. Represents + a select subset of an `OpenAPI 3.0 schema + object `__. More + fields may be added in the future as needed. + + Attributes: + type_ (google.cloud.aiplatform_v1.types.Type): + Optional. The type of the data. + format_ (str): + Optional. The format of the data. + Supported formats: + + for NUMBER type: "float", "double" + for INTEGER type: "int32", "int64" + for STRING type: "email", "byte", etc + title (str): + Optional. The title of the Schema. + description (str): + Optional. The description of the data. + nullable (bool): + Optional. Indicates if the value may be null. + default (google.protobuf.struct_pb2.Value): + Optional. Default value of the data. + items (google.cloud.aiplatform_v1.types.Schema): + Optional. SCHEMA FIELDS FOR TYPE ARRAY + Schema of the elements of Type.ARRAY. + min_items (int): + Optional. Minimum number of the elements for + Type.ARRAY. + max_items (int): + Optional. Maximum number of the elements for + Type.ARRAY. + enum (MutableSequence[str]): + Optional. Possible values of the element of primitive type + with enum format. Examples: + + 1. We can define direction as : {type:STRING, format:enum, + enum:["EAST", NORTH", "SOUTH", "WEST"]} + 2. We can define apartment number as : {type:INTEGER, + format:enum, enum:["101", "201", "301"]} + properties (MutableMapping[str, google.cloud.aiplatform_v1.types.Schema]): + Optional. SCHEMA FIELDS FOR TYPE OBJECT + Properties of Type.OBJECT. + property_ordering (MutableSequence[str]): + Optional. The order of the properties. + Not a standard field in open api spec. Only used + to support the order of the properties. + required (MutableSequence[str]): + Optional. Required properties of Type.OBJECT. + min_properties (int): + Optional. Minimum number of the properties + for Type.OBJECT. + max_properties (int): + Optional. Maximum number of the properties + for Type.OBJECT. + minimum (float): + Optional. SCHEMA FIELDS FOR TYPE INTEGER and + NUMBER Minimum value of the Type.INTEGER and + Type.NUMBER + maximum (float): + Optional. Maximum value of the Type.INTEGER + and Type.NUMBER + min_length (int): + Optional. SCHEMA FIELDS FOR TYPE STRING + Minimum length of the Type.STRING + max_length (int): + Optional. Maximum length of the Type.STRING + pattern (str): + Optional. Pattern of the Type.STRING to + restrict a string to a regular expression. + example (google.protobuf.struct_pb2.Value): + Optional. Example of the object. Will only + populated when the object is the root. + any_of (MutableSequence[google.cloud.aiplatform_v1.types.Schema]): + Optional. The value should be validated + against any (one or more) of the subschemas in + the list. + additional_properties (google.protobuf.struct_pb2.Value): + Optional. Can either be a boolean or an + object; controls the presence of additional + properties. + ref (str): + Optional. Allows indirect references between schema nodes. + The value should be a valid reference to a child of the root + ``defs``. + + For example, the following schema defines a reference to a + schema node named "Pet": + + type: object properties: pet: ref: #/defs/Pet defs: Pet: + type: object properties: name: type: string + + The value of the "pet" property is a reference to the schema + node named "Pet". See details in + https://json-schema.org/understanding-json-schema/structuring + defs (MutableMapping[str, google.cloud.aiplatform_v1.types.Schema]): + Optional. A map of definitions for use by ``ref`` Only + allowed at the root of the schema. + """ + + type_: "Type" = proto.Field( + proto.ENUM, + number=1, + enum="Type", + ) + format_: str = proto.Field( + proto.STRING, + number=7, + ) + title: str = proto.Field( + proto.STRING, + number=24, + ) + description: str = proto.Field( + proto.STRING, + number=8, + ) + nullable: bool = proto.Field( + proto.BOOL, + number=6, + ) + default: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=23, + message=struct_pb2.Value, + ) + items: "Schema" = proto.Field( + proto.MESSAGE, + number=2, + message="Schema", + ) + min_items: int = proto.Field( + proto.INT64, + number=21, + ) + max_items: int = proto.Field( + proto.INT64, + number=22, + ) + enum: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=9, + ) + properties: MutableMapping[str, "Schema"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=3, + message="Schema", + ) + property_ordering: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=25, + ) + required: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + min_properties: int = proto.Field( + proto.INT64, + number=14, + ) + max_properties: int = proto.Field( + proto.INT64, + number=15, + ) + minimum: float = proto.Field( + proto.DOUBLE, + number=16, + ) + maximum: float = proto.Field( + proto.DOUBLE, + number=17, + ) + min_length: int = proto.Field( + proto.INT64, + number=18, + ) + max_length: int = proto.Field( + proto.INT64, + number=19, + ) + pattern: str = proto.Field( + proto.STRING, + number=20, + ) + example: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=4, + message=struct_pb2.Value, + ) + any_of: MutableSequence["Schema"] = proto.RepeatedField( + proto.MESSAGE, + number=11, + message="Schema", + ) + additional_properties: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=26, + message=struct_pb2.Value, + ) + ref: str = proto.Field( + proto.STRING, + number=27, + ) + defs: MutableMapping[str, "Schema"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=28, + message="Schema", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/operation.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/operation.py new file mode 100644 index 0000000000000000000000000000000000000000..f0c0cd9fb94c3fc0e7f78e3cdf821c9f00243cc1 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/operation.py @@ -0,0 +1,87 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "GenericOperationMetadata", + "DeleteOperationMetadata", + }, +) + + +class GenericOperationMetadata(proto.Message): + r"""Generic Metadata shared by all operations. + + Attributes: + partial_failures (MutableSequence[google.rpc.status_pb2.Status]): + Output only. Partial failures encountered. + E.g. single files that couldn't be read. + This field should never exceed 20 entries. + Status details field will contain standard + Google Cloud error details. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the operation was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the operation was + updated for the last time. If the operation has + finished (successfully or not), this is the + finish time. + """ + + partial_failures: MutableSequence[status_pb2.Status] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=status_pb2.Status, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + + +class DeleteOperationMetadata(proto.Message): + r"""Details of operations that perform deletes of any entities. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: "GenericOperationMetadata" = proto.Field( + proto.MESSAGE, + number=1, + message="GenericOperationMetadata", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/persistent_resource_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/persistent_resource_service.py new file mode 100644 index 0000000000000000000000000000000000000000..56a48a2b77056e8b4d005f144e61c355c5f3748a --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/persistent_resource_service.py @@ -0,0 +1,286 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import ( + persistent_resource as gca_persistent_resource, +) +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreatePersistentResourceRequest", + "CreatePersistentResourceOperationMetadata", + "UpdatePersistentResourceOperationMetadata", + "RebootPersistentResourceOperationMetadata", + "GetPersistentResourceRequest", + "ListPersistentResourcesRequest", + "ListPersistentResourcesResponse", + "DeletePersistentResourceRequest", + "UpdatePersistentResourceRequest", + "RebootPersistentResourceRequest", + }, +) + + +class CreatePersistentResourceRequest(proto.Message): + r"""Request message for + [PersistentResourceService.CreatePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.CreatePersistentResource]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + PersistentResource in. Format: + ``projects/{project}/locations/{location}`` + persistent_resource (google.cloud.aiplatform_v1.types.PersistentResource): + Required. The PersistentResource to create. + persistent_resource_id (str): + Required. The ID to use for the PersistentResource, which + become the final component of the PersistentResource's + resource name. + + The maximum length is 63 characters, and valid characters + are ``/^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$/``. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + persistent_resource: gca_persistent_resource.PersistentResource = proto.Field( + proto.MESSAGE, + number=2, + message=gca_persistent_resource.PersistentResource, + ) + persistent_resource_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class CreatePersistentResourceOperationMetadata(proto.Message): + r"""Details of operations that perform create PersistentResource. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for PersistentResource. + progress_message (str): + Progress Message for Create LRO + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class UpdatePersistentResourceOperationMetadata(proto.Message): + r"""Details of operations that perform update PersistentResource. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for PersistentResource. + progress_message (str): + Progress Message for Update LRO + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class RebootPersistentResourceOperationMetadata(proto.Message): + r"""Details of operations that perform reboot PersistentResource. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for PersistentResource. + progress_message (str): + Progress Message for Reboot LRO + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + progress_message: str = proto.Field( + proto.STRING, + number=2, + ) + + +class GetPersistentResourceRequest(proto.Message): + r"""Request message for + [PersistentResourceService.GetPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.GetPersistentResource]. + + Attributes: + name (str): + Required. The name of the PersistentResource resource. + Format: + ``projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListPersistentResourcesRequest(proto.Message): + r"""Request message for + [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + PersistentResources from. Format: + ``projects/{project}/locations/{location}`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListPersistentResourcesResponse.next_page_token][google.cloud.aiplatform.v1.ListPersistentResourcesResponse.next_page_token] + of the previous + [PersistentResourceService.ListPersistentResource][] call. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + + +class ListPersistentResourcesResponse(proto.Message): + r"""Response message for + [PersistentResourceService.ListPersistentResources][google.cloud.aiplatform.v1.PersistentResourceService.ListPersistentResources] + + Attributes: + persistent_resources (MutableSequence[google.cloud.aiplatform_v1.types.PersistentResource]): + + next_page_token (str): + A token to retrieve next page of results. Pass to + [ListPersistentResourcesRequest.page_token][google.cloud.aiplatform.v1.ListPersistentResourcesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + persistent_resources: MutableSequence[ + gca_persistent_resource.PersistentResource + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_persistent_resource.PersistentResource, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeletePersistentResourceRequest(proto.Message): + r"""Request message for + [PersistentResourceService.DeletePersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.DeletePersistentResource]. + + Attributes: + name (str): + Required. The name of the PersistentResource to be deleted. + Format: + ``projects/{project}/locations/{location}/persistentResources/{persistent_resource}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdatePersistentResourceRequest(proto.Message): + r"""Request message for UpdatePersistentResource method. + + Attributes: + persistent_resource (google.cloud.aiplatform_v1.types.PersistentResource): + Required. The PersistentResource to update. + + The PersistentResource's ``name`` field is used to identify + the PersistentResource to update. Format: + ``projects/{project}/locations/{location}/persistentResources/{persistent_resource}`` + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. Specify the fields to be + overwritten in the PersistentResource by the + update method. + """ + + persistent_resource: gca_persistent_resource.PersistentResource = proto.Field( + proto.MESSAGE, + number=1, + message=gca_persistent_resource.PersistentResource, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class RebootPersistentResourceRequest(proto.Message): + r"""Request message for + [PersistentResourceService.RebootPersistentResource][google.cloud.aiplatform.v1.PersistentResourceService.RebootPersistentResource]. + + Attributes: + name (str): + Required. The name of the PersistentResource resource. + Format: + ``projects/{project_id_or_number}/locations/{location_id}/persistentResources/{persistent_resource_id}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_failure_policy.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_failure_policy.py new file mode 100644 index 0000000000000000000000000000000000000000..f87c4b0e2774f08849cbc6598ccbe8bdc618b4bc --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_failure_policy.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PipelineFailurePolicy", + }, +) + + +class PipelineFailurePolicy(proto.Enum): + r"""Represents the failure policy of a pipeline. Currently, the default + of a pipeline is that the pipeline will continue to run until no + more tasks can be executed, also known as + PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is set to + PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop scheduling any new + tasks when a task has failed. Any scheduled tasks will continue to + completion. + + Values: + PIPELINE_FAILURE_POLICY_UNSPECIFIED (0): + Default value, and follows fail slow + behavior. + PIPELINE_FAILURE_POLICY_FAIL_SLOW (1): + Indicates that the pipeline should continue + to run until all possible tasks have been + scheduled and completed. + PIPELINE_FAILURE_POLICY_FAIL_FAST (2): + Indicates that the pipeline should stop + scheduling new tasks after a task has failed. + """ + + PIPELINE_FAILURE_POLICY_UNSPECIFIED = 0 + PIPELINE_FAILURE_POLICY_FAIL_SLOW = 1 + PIPELINE_FAILURE_POLICY_FAIL_FAST = 2 + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_job.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_job.py new file mode 100644 index 0000000000000000000000000000000000000000..57101cb2af623bfe5da807ad8ac11a424f7fd397 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_job.py @@ -0,0 +1,731 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import artifact +from google.cloud.aiplatform_v1.types import context +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import execution as gca_execution +from google.cloud.aiplatform_v1.types import pipeline_failure_policy +from google.cloud.aiplatform_v1.types import pipeline_state +from google.cloud.aiplatform_v1.types import service_networking +from google.cloud.aiplatform_v1.types import value as gca_value +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PipelineJob", + "PipelineTemplateMetadata", + "PipelineJobDetail", + "PipelineTaskDetail", + "PipelineTaskExecutorDetail", + }, +) + + +class PipelineJob(proto.Message): + r"""An instance of a machine learning PipelineJob. + + Attributes: + name (str): + Output only. The resource name of the + PipelineJob. + display_name (str): + The display name of the Pipeline. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Pipeline creation time. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Pipeline start time. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Pipeline end time. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this PipelineJob + was most recently updated. + pipeline_spec (google.protobuf.struct_pb2.Struct): + The spec of the pipeline. + state (google.cloud.aiplatform_v1.types.PipelineState): + Output only. The detailed state of the job. + job_detail (google.cloud.aiplatform_v1.types.PipelineJobDetail): + Output only. The details of pipeline run. Not + available in the list view. + error (google.rpc.status_pb2.Status): + Output only. The error that occurred during + pipeline execution. Only populated when the + pipeline's state is FAILED or CANCELLED. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to organize + PipelineJob. + + Label keys and values can be no longer than 64 characters + (Unicode codepoints), can only contain lowercase letters, + numeric characters, underscores and dashes. International + characters are allowed. + + See https://goo.gl/xmQnxf for more information and examples + of labels. + + Note there is some reserved label key for Vertex AI + Pipelines. + + - ``vertex-ai-pipelines-run-billing-id``, user set value + will get overrided. + runtime_config (google.cloud.aiplatform_v1.types.PipelineJob.RuntimeConfig): + Runtime config of the pipeline. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for a + pipelineJob. If set, this PipelineJob and all of + its sub-resources will be secured by this key. + service_account (str): + The service account that the pipeline workload runs as. If + not specified, the Compute Engine default service account in + the project will be used. See + https://cloud.google.com/compute/docs/access/service-accounts#default_service_account + + Users starting the pipeline must have the + ``iam.serviceAccounts.actAs`` permission on this service + account. + network (str): + The full name of the Compute Engine + `network `__ + to which the Pipeline Job's workload should be peered. For + example, ``projects/12345/global/networks/myVPC``. + `Format `__ + is of the form + ``projects/{project}/global/networks/{network}``. Where + {project} is a project number, as in ``12345``, and + {network} is a network name. + + Private services access must already be configured for the + network. Pipeline job will apply the network configuration + to the Google Cloud resources being launched, if applied, + such as Vertex AI Training or Dataflow job. If left + unspecified, the workload is not peered with any network. + reserved_ip_ranges (MutableSequence[str]): + A list of names for the reserved ip ranges under the VPC + network that can be used for this Pipeline Job's workload. + + If set, we will deploy the Pipeline Job's workload within + the provided ip ranges. Otherwise, the job will be deployed + to any ip ranges under the provided VPC network. + + Example: ['vertex-ai-ip-range']. + psc_interface_config (google.cloud.aiplatform_v1.types.PscInterfaceConfig): + Optional. Configuration for PSC-I for + PipelineJob. + template_uri (str): + A template uri from where the + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec], + if empty, will be downloaded. Currently, only uri from + Vertex Template Registry & Gallery is supported. Reference + to + https://cloud.google.com/vertex-ai/docs/pipelines/create-pipeline-template. + template_metadata (google.cloud.aiplatform_v1.types.PipelineTemplateMetadata): + Output only. Pipeline template metadata. Will fill up fields + if + [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri] + is from supported template registry. + schedule_name (str): + Output only. The schedule resource name. + Only returned if the Pipeline is created by + Schedule API. + preflight_validations (bool): + Optional. Whether to do component level + validations before job creation. + """ + + class RuntimeConfig(proto.Message): + r"""The runtime config of a PipelineJob. + + Attributes: + parameters (MutableMapping[str, google.cloud.aiplatform_v1.types.Value]): + Deprecated. Use + [RuntimeConfig.parameter_values][google.cloud.aiplatform.v1.PipelineJob.RuntimeConfig.parameter_values] + instead. The runtime parameters of the PipelineJob. The + parameters will be passed into + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec] + to replace the placeholders at runtime. This field is used + by pipelines built using + ``PipelineJob.pipeline_spec.schema_version`` 2.0.0 or lower, + such as pipelines built using Kubeflow Pipelines SDK 1.8 or + lower. + gcs_output_directory (str): + Required. A path in a Cloud Storage bucket, which will be + treated as the root output directory of the pipeline. It is + used by the system to generate the paths of output + artifacts. The artifact paths are generated with a sub-path + pattern ``{job_id}/{task_id}/{output_key}`` under the + specified output directory. The service account specified in + this pipeline must have the ``storage.objects.get`` and + ``storage.objects.create`` permissions for this bucket. + parameter_values (MutableMapping[str, google.protobuf.struct_pb2.Value]): + The runtime parameters of the PipelineJob. The parameters + will be passed into + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec] + to replace the placeholders at runtime. This field is used + by pipelines built using + ``PipelineJob.pipeline_spec.schema_version`` 2.1.0, such as + pipelines built using Kubeflow Pipelines SDK 1.9 or higher + and the v2 DSL. + failure_policy (google.cloud.aiplatform_v1.types.PipelineFailurePolicy): + Represents the failure policy of a pipeline. Currently, the + default of a pipeline is that the pipeline will continue to + run until no more tasks can be executed, also known as + PIPELINE_FAILURE_POLICY_FAIL_SLOW. However, if a pipeline is + set to PIPELINE_FAILURE_POLICY_FAIL_FAST, it will stop + scheduling any new tasks when a task has failed. Any + scheduled tasks will continue to completion. + input_artifacts (MutableMapping[str, google.cloud.aiplatform_v1.types.PipelineJob.RuntimeConfig.InputArtifact]): + The runtime artifacts of the PipelineJob. The + key will be the input artifact name and the + value would be one of the InputArtifact. + """ + + class InputArtifact(proto.Message): + r"""The type of an input artifact. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + artifact_id (str): + Artifact resource id from MLMD. Which is the last portion of + an artifact resource name: + ``projects/{project}/locations/{location}/metadataStores/default/artifacts/{artifact_id}``. + The artifact must stay within the same project, location and + default metadatastore as the pipeline. + + This field is a member of `oneof`_ ``kind``. + """ + + artifact_id: str = proto.Field( + proto.STRING, + number=1, + oneof="kind", + ) + + parameters: MutableMapping[str, gca_value.Value] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message=gca_value.Value, + ) + gcs_output_directory: str = proto.Field( + proto.STRING, + number=2, + ) + parameter_values: MutableMapping[str, struct_pb2.Value] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=3, + message=struct_pb2.Value, + ) + failure_policy: pipeline_failure_policy.PipelineFailurePolicy = proto.Field( + proto.ENUM, + number=4, + enum=pipeline_failure_policy.PipelineFailurePolicy, + ) + input_artifacts: MutableMapping[ + str, "PipelineJob.RuntimeConfig.InputArtifact" + ] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=5, + message="PipelineJob.RuntimeConfig.InputArtifact", + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + pipeline_spec: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=7, + message=struct_pb2.Struct, + ) + state: pipeline_state.PipelineState = proto.Field( + proto.ENUM, + number=8, + enum=pipeline_state.PipelineState, + ) + job_detail: "PipelineJobDetail" = proto.Field( + proto.MESSAGE, + number=9, + message="PipelineJobDetail", + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=10, + message=status_pb2.Status, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=11, + ) + runtime_config: RuntimeConfig = proto.Field( + proto.MESSAGE, + number=12, + message=RuntimeConfig, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=16, + message=gca_encryption_spec.EncryptionSpec, + ) + service_account: str = proto.Field( + proto.STRING, + number=17, + ) + network: str = proto.Field( + proto.STRING, + number=18, + ) + reserved_ip_ranges: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=25, + ) + psc_interface_config: service_networking.PscInterfaceConfig = proto.Field( + proto.MESSAGE, + number=31, + message=service_networking.PscInterfaceConfig, + ) + template_uri: str = proto.Field( + proto.STRING, + number=19, + ) + template_metadata: "PipelineTemplateMetadata" = proto.Field( + proto.MESSAGE, + number=20, + message="PipelineTemplateMetadata", + ) + schedule_name: str = proto.Field( + proto.STRING, + number=22, + ) + preflight_validations: bool = proto.Field( + proto.BOOL, + number=26, + ) + + +class PipelineTemplateMetadata(proto.Message): + r"""Pipeline template metadata if + [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri] + is from supported template registry. Currently, the only supported + registry is Artifact Registry. + + Attributes: + version (str): + The version_name in artifact registry. + + Will always be presented in output if the + [PipelineJob.template_uri][google.cloud.aiplatform.v1.PipelineJob.template_uri] + is from supported template registry. + + Format is "sha256:abcdef123456...". + """ + + version: str = proto.Field( + proto.STRING, + number=3, + ) + + +class PipelineJobDetail(proto.Message): + r"""The runtime detail of PipelineJob. + + Attributes: + pipeline_context (google.cloud.aiplatform_v1.types.Context): + Output only. The context of the pipeline. + pipeline_run_context (google.cloud.aiplatform_v1.types.Context): + Output only. The context of the current + pipeline run. + task_details (MutableSequence[google.cloud.aiplatform_v1.types.PipelineTaskDetail]): + Output only. The runtime details of the tasks + under the pipeline. + """ + + pipeline_context: context.Context = proto.Field( + proto.MESSAGE, + number=1, + message=context.Context, + ) + pipeline_run_context: context.Context = proto.Field( + proto.MESSAGE, + number=2, + message=context.Context, + ) + task_details: MutableSequence["PipelineTaskDetail"] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="PipelineTaskDetail", + ) + + +class PipelineTaskDetail(proto.Message): + r"""The runtime detail of a task execution. + + Attributes: + task_id (int): + Output only. The system generated ID of the + task. + parent_task_id (int): + Output only. The id of the parent task if the + task is within a component scope. Empty if the + task is at the root level. + task_name (str): + Output only. The user specified name of the task that is + defined in + [pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Task create time. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Task start time. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Task end time. + executor_detail (google.cloud.aiplatform_v1.types.PipelineTaskExecutorDetail): + Output only. The detailed execution info. + state (google.cloud.aiplatform_v1.types.PipelineTaskDetail.State): + Output only. State of the task. + execution (google.cloud.aiplatform_v1.types.Execution): + Output only. The execution metadata of the + task. + error (google.rpc.status_pb2.Status): + Output only. The error that occurred during + task execution. Only populated when the task's + state is FAILED or CANCELLED. + pipeline_task_status (MutableSequence[google.cloud.aiplatform_v1.types.PipelineTaskDetail.PipelineTaskStatus]): + Output only. A list of task status. This + field keeps a record of task status evolving + over time. + inputs (MutableMapping[str, google.cloud.aiplatform_v1.types.PipelineTaskDetail.ArtifactList]): + Output only. The runtime input artifacts of + the task. + outputs (MutableMapping[str, google.cloud.aiplatform_v1.types.PipelineTaskDetail.ArtifactList]): + Output only. The runtime output artifacts of + the task. + task_unique_name (str): + Output only. The unique name of a task. This field is used + by rerun pipeline job. Console UI and Vertex AI SDK will + support triggering pipeline job reruns. The name is + constructed by concatenating all the parent tasks name with + the task name. For example, if a task named "child_task" has + a parent task named "parent_task_1" and parent task 1 has a + parent task named "parent_task_2", the task unique name will + be "parent_task_2.parent_task_1.child_task". + """ + + class State(proto.Enum): + r"""Specifies state of TaskExecution + + Values: + STATE_UNSPECIFIED (0): + Unspecified. + PENDING (1): + Specifies pending state for the task. + RUNNING (2): + Specifies task is being executed. + SUCCEEDED (3): + Specifies task completed successfully. + CANCEL_PENDING (4): + Specifies Task cancel is in pending state. + CANCELLING (5): + Specifies task is being cancelled. + CANCELLED (6): + Specifies task was cancelled. + FAILED (7): + Specifies task failed. + SKIPPED (8): + Specifies task was skipped due to cache hit. + NOT_TRIGGERED (9): + Specifies that the task was not triggered because the task's + trigger policy is not satisfied. The trigger policy is + specified in the ``condition`` field of + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec]. + """ + + STATE_UNSPECIFIED = 0 + PENDING = 1 + RUNNING = 2 + SUCCEEDED = 3 + CANCEL_PENDING = 4 + CANCELLING = 5 + CANCELLED = 6 + FAILED = 7 + SKIPPED = 8 + NOT_TRIGGERED = 9 + + class PipelineTaskStatus(proto.Message): + r"""A single record of the task status. + + Attributes: + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Update time of this status. + state (google.cloud.aiplatform_v1.types.PipelineTaskDetail.State): + Output only. The state of the task. + error (google.rpc.status_pb2.Status): + Output only. The error that occurred during + the state. May be set when the state is any of + the non-final state (PENDING/RUNNING/CANCELLING) + or FAILED state. If the state is FAILED, the + error here is final and not going to be retried. + If the state is a non-final state, the error + indicates a system-error being retried. + """ + + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + state: "PipelineTaskDetail.State" = proto.Field( + proto.ENUM, + number=2, + enum="PipelineTaskDetail.State", + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=3, + message=status_pb2.Status, + ) + + class ArtifactList(proto.Message): + r"""A list of artifact metadata. + + Attributes: + artifacts (MutableSequence[google.cloud.aiplatform_v1.types.Artifact]): + Output only. A list of artifact metadata. + """ + + artifacts: MutableSequence[artifact.Artifact] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=artifact.Artifact, + ) + + task_id: int = proto.Field( + proto.INT64, + number=1, + ) + parent_task_id: int = proto.Field( + proto.INT64, + number=12, + ) + task_name: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + executor_detail: "PipelineTaskExecutorDetail" = proto.Field( + proto.MESSAGE, + number=6, + message="PipelineTaskExecutorDetail", + ) + state: State = proto.Field( + proto.ENUM, + number=7, + enum=State, + ) + execution: gca_execution.Execution = proto.Field( + proto.MESSAGE, + number=8, + message=gca_execution.Execution, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=9, + message=status_pb2.Status, + ) + pipeline_task_status: MutableSequence[PipelineTaskStatus] = proto.RepeatedField( + proto.MESSAGE, + number=13, + message=PipelineTaskStatus, + ) + inputs: MutableMapping[str, ArtifactList] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=10, + message=ArtifactList, + ) + outputs: MutableMapping[str, ArtifactList] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=11, + message=ArtifactList, + ) + task_unique_name: str = proto.Field( + proto.STRING, + number=14, + ) + + +class PipelineTaskExecutorDetail(proto.Message): + r"""The runtime detail of a pipeline executor. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + container_detail (google.cloud.aiplatform_v1.types.PipelineTaskExecutorDetail.ContainerDetail): + Output only. The detailed info for a + container executor. + + This field is a member of `oneof`_ ``details``. + custom_job_detail (google.cloud.aiplatform_v1.types.PipelineTaskExecutorDetail.CustomJobDetail): + Output only. The detailed info for a custom + job executor. + + This field is a member of `oneof`_ ``details``. + """ + + class ContainerDetail(proto.Message): + r"""The detail of a container execution. It contains the job + names of the lifecycle of a container execution. + + Attributes: + main_job (str): + Output only. The name of the + [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the + main container execution. + pre_caching_check_job (str): + Output only. The name of the + [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the + pre-caching-check container execution. This job will be + available if the + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec] + specifies the ``pre_caching_check`` hook in the lifecycle + events. + failed_main_jobs (MutableSequence[str]): + Output only. The names of the previously failed + [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the + main container executions. The list includes the all + attempts in chronological order. + failed_pre_caching_check_jobs (MutableSequence[str]): + Output only. The names of the previously failed + [CustomJob][google.cloud.aiplatform.v1.CustomJob] for the + pre-caching-check container executions. This job will be + available if the + [PipelineJob.pipeline_spec][google.cloud.aiplatform.v1.PipelineJob.pipeline_spec] + specifies the ``pre_caching_check`` hook in the lifecycle + events. The list includes the all attempts in chronological + order. + """ + + main_job: str = proto.Field( + proto.STRING, + number=1, + ) + pre_caching_check_job: str = proto.Field( + proto.STRING, + number=2, + ) + failed_main_jobs: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + failed_pre_caching_check_jobs: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + + class CustomJobDetail(proto.Message): + r"""The detailed info for a custom job executor. + + Attributes: + job (str): + Output only. The name of the + [CustomJob][google.cloud.aiplatform.v1.CustomJob]. + failed_jobs (MutableSequence[str]): + Output only. The names of the previously failed + [CustomJob][google.cloud.aiplatform.v1.CustomJob]. The list + includes the all attempts in chronological order. + """ + + job: str = proto.Field( + proto.STRING, + number=1, + ) + failed_jobs: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + container_detail: ContainerDetail = proto.Field( + proto.MESSAGE, + number=1, + oneof="details", + message=ContainerDetail, + ) + custom_job_detail: CustomJobDetail = proto.Field( + proto.MESSAGE, + number=2, + oneof="details", + message=CustomJobDetail, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_service.py new file mode 100644 index 0000000000000000000000000000000000000000..697af698bdab38e1052c63daaf9f1f003c252ef1 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/pipeline_service.py @@ -0,0 +1,539 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import pipeline_job as gca_pipeline_job +from google.cloud.aiplatform_v1.types import training_pipeline as gca_training_pipeline +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "BatchCancelPipelineJobsOperationMetadata", + "CreateTrainingPipelineRequest", + "GetTrainingPipelineRequest", + "ListTrainingPipelinesRequest", + "ListTrainingPipelinesResponse", + "DeleteTrainingPipelineRequest", + "CancelTrainingPipelineRequest", + "CreatePipelineJobRequest", + "GetPipelineJobRequest", + "ListPipelineJobsRequest", + "ListPipelineJobsResponse", + "DeletePipelineJobRequest", + "BatchDeletePipelineJobsRequest", + "BatchDeletePipelineJobsResponse", + "CancelPipelineJobRequest", + "BatchCancelPipelineJobsRequest", + "BatchCancelPipelineJobsResponse", + }, +) + + +class BatchCancelPipelineJobsOperationMetadata(proto.Message): + r"""Runtime operation information for + [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class CreateTrainingPipelineRequest(proto.Message): + r"""Request message for + [PipelineService.CreateTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CreateTrainingPipeline]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + TrainingPipeline in. Format: + ``projects/{project}/locations/{location}`` + training_pipeline (google.cloud.aiplatform_v1.types.TrainingPipeline): + Required. The TrainingPipeline to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + training_pipeline: gca_training_pipeline.TrainingPipeline = proto.Field( + proto.MESSAGE, + number=2, + message=gca_training_pipeline.TrainingPipeline, + ) + + +class GetTrainingPipelineRequest(proto.Message): + r"""Request message for + [PipelineService.GetTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.GetTrainingPipeline]. + + Attributes: + name (str): + Required. The name of the TrainingPipeline resource. Format: + ``projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListTrainingPipelinesRequest(proto.Message): + r"""Request message for + [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + TrainingPipelines from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + The standard list filter. + + Supported fields: + + - ``display_name`` supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state`` supports ``=``, ``!=`` comparisons. + - ``training_task_definition`` ``=``, ``!=`` comparisons, + and ``:`` wildcard. + - ``create_time`` supports ``=``, ``!=``,\ ``<``, + ``<=``,\ ``>``, ``>=`` comparisons. ``create_time`` must + be in RFC 3339 format. + - ``labels`` supports general map functions that is: + ``labels.key=value`` - key:value equality \`labels.key:\* + - key existence + + Some examples of using the filter are: + + - ``state="PIPELINE_STATE_SUCCEEDED" AND display_name:"my_pipeline_*"`` + - ``state!="PIPELINE_STATE_FAILED" OR display_name="my_pipeline"`` + - ``NOT display_name="my_pipeline"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``training_task_definition:"*automl_text_classification*"`` + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListTrainingPipelinesResponse.next_page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesResponse.next_page_token] + of the previous + [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] + call. + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=5, + message=field_mask_pb2.FieldMask, + ) + + +class ListTrainingPipelinesResponse(proto.Message): + r"""Response message for + [PipelineService.ListTrainingPipelines][google.cloud.aiplatform.v1.PipelineService.ListTrainingPipelines] + + Attributes: + training_pipelines (MutableSequence[google.cloud.aiplatform_v1.types.TrainingPipeline]): + List of TrainingPipelines in the requested + page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListTrainingPipelinesRequest.page_token][google.cloud.aiplatform.v1.ListTrainingPipelinesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + training_pipelines: MutableSequence[gca_training_pipeline.TrainingPipeline] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_training_pipeline.TrainingPipeline, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteTrainingPipelineRequest(proto.Message): + r"""Request message for + [PipelineService.DeleteTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.DeleteTrainingPipeline]. + + Attributes: + name (str): + Required. The name of the TrainingPipeline resource to be + deleted. Format: + ``projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CancelTrainingPipelineRequest(proto.Message): + r"""Request message for + [PipelineService.CancelTrainingPipeline][google.cloud.aiplatform.v1.PipelineService.CancelTrainingPipeline]. + + Attributes: + name (str): + Required. The name of the TrainingPipeline to cancel. + Format: + ``projects/{project}/locations/{location}/trainingPipelines/{training_pipeline}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreatePipelineJobRequest(proto.Message): + r"""Request message for + [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + PipelineJob in. Format: + ``projects/{project}/locations/{location}`` + pipeline_job (google.cloud.aiplatform_v1.types.PipelineJob): + Required. The PipelineJob to create. + pipeline_job_id (str): + The ID to use for the PipelineJob, which will become the + final component of the PipelineJob name. If not provided, an + ID will be automatically generated. + + This value should be less than 128 characters, and valid + characters are ``/[a-z][0-9]-/``. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + pipeline_job: gca_pipeline_job.PipelineJob = proto.Field( + proto.MESSAGE, + number=2, + message=gca_pipeline_job.PipelineJob, + ) + pipeline_job_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class GetPipelineJobRequest(proto.Message): + r"""Request message for + [PipelineService.GetPipelineJob][google.cloud.aiplatform.v1.PipelineService.GetPipelineJob]. + + Attributes: + name (str): + Required. The name of the PipelineJob resource. Format: + ``projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListPipelineJobsRequest(proto.Message): + r"""Request message for + [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + PipelineJobs from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Lists the PipelineJobs that match the filter expression. The + following fields are supported: + + - ``pipeline_name``: Supports ``=`` and ``!=`` comparisons. + - ``display_name``: Supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``pipeline_job_user_id``: Supports ``=``, ``!=`` + comparisons, and ``:`` wildcard. for example, can check if + pipeline's display_name contains *step* by doing + display_name:"*step*" + - ``state``: Supports ``=`` and ``!=`` comparisons. + - ``create_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``update_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``end_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``labels``: Supports key-value equality and key presence. + - ``template_uri``: Supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``template_metadata.version``: Supports ``=``, ``!=`` + comparisons, and ``:`` wildcard. + + Filter expressions can be combined together using logical + operators (``AND`` & ``OR``). For example: + ``pipeline_name="test" AND create_time>"2020-05-18T13:30:00Z"``. + + The syntax to define filter expression is based on + https://google.aip.dev/160. + + Examples: + + - ``create_time>"2021-05-18T00:00:00Z" OR update_time>"2020-05-18T00:00:00Z"`` + PipelineJobs created or updated after 2020-05-18 00:00:00 + UTC. + - ``labels.env = "prod"`` PipelineJobs with label "env" set + to "prod". + page_size (int): + The standard list page size. + page_token (str): + The standard list page token. Typically obtained via + [ListPipelineJobsResponse.next_page_token][google.cloud.aiplatform.v1.ListPipelineJobsResponse.next_page_token] + of the previous + [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs] + call. + order_by (str): + A comma-separated list of fields to order by. The default + sort order is in ascending order. Use "desc" after a field + name for descending. You can have multiple order_by fields + provided e.g. "create_time desc, end_time", "end_time, + start_time, update_time" For example, using "create_time + desc, end_time" will order results by create time in + descending order, and if there are multiple jobs having the + same create time, order them by the end time in ascending + order. if order_by is not specified, it will order by + default order is create time in descending order. Supported + fields: + + - ``create_time`` + - ``update_time`` + - ``end_time`` + - ``start_time`` + read_mask (google.protobuf.field_mask_pb2.FieldMask): + Mask specifying which fields to read. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=6, + ) + read_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=7, + message=field_mask_pb2.FieldMask, + ) + + +class ListPipelineJobsResponse(proto.Message): + r"""Response message for + [PipelineService.ListPipelineJobs][google.cloud.aiplatform.v1.PipelineService.ListPipelineJobs] + + Attributes: + pipeline_jobs (MutableSequence[google.cloud.aiplatform_v1.types.PipelineJob]): + List of PipelineJobs in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListPipelineJobsRequest.page_token][google.cloud.aiplatform.v1.ListPipelineJobsRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + pipeline_jobs: MutableSequence[gca_pipeline_job.PipelineJob] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_pipeline_job.PipelineJob, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeletePipelineJobRequest(proto.Message): + r"""Request message for + [PipelineService.DeletePipelineJob][google.cloud.aiplatform.v1.PipelineService.DeletePipelineJob]. + + Attributes: + name (str): + Required. The name of the PipelineJob resource to be + deleted. Format: + ``projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class BatchDeletePipelineJobsRequest(proto.Message): + r"""Request message for + [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs]. + + Attributes: + parent (str): + Required. The name of the PipelineJobs' parent resource. + Format: ``projects/{project}/locations/{location}`` + names (MutableSequence[str]): + Required. The names of the PipelineJobs to delete. A maximum + of 32 PipelineJobs can be deleted in a batch. Format: + ``projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`` + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + names: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class BatchDeletePipelineJobsResponse(proto.Message): + r"""Response message for + [PipelineService.BatchDeletePipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchDeletePipelineJobs]. + + Attributes: + pipeline_jobs (MutableSequence[google.cloud.aiplatform_v1.types.PipelineJob]): + PipelineJobs deleted. + """ + + pipeline_jobs: MutableSequence[gca_pipeline_job.PipelineJob] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_pipeline_job.PipelineJob, + ) + + +class CancelPipelineJobRequest(proto.Message): + r"""Request message for + [PipelineService.CancelPipelineJob][google.cloud.aiplatform.v1.PipelineService.CancelPipelineJob]. + + Attributes: + name (str): + Required. The name of the PipelineJob to cancel. Format: + ``projects/{project}/locations/{location}/pipelineJobs/{pipeline_job}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class BatchCancelPipelineJobsRequest(proto.Message): + r"""Request message for + [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]. + + Attributes: + parent (str): + Required. The name of the PipelineJobs' parent resource. + Format: ``projects/{project}/locations/{location}`` + names (MutableSequence[str]): + Required. The names of the PipelineJobs to cancel. A maximum + of 32 PipelineJobs can be cancelled in a batch. Format: + ``projects/{project}/locations/{location}/pipelineJobs/{pipelineJob}`` + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + names: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class BatchCancelPipelineJobsResponse(proto.Message): + r"""Response message for + [PipelineService.BatchCancelPipelineJobs][google.cloud.aiplatform.v1.PipelineService.BatchCancelPipelineJobs]. + + Attributes: + pipeline_jobs (MutableSequence[google.cloud.aiplatform_v1.types.PipelineJob]): + PipelineJobs cancelled. + """ + + pipeline_jobs: MutableSequence[gca_pipeline_job.PipelineJob] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_pipeline_job.PipelineJob, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/prediction_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/prediction_service.py new file mode 100644 index 0000000000000000000000000000000000000000..d93f931435126a44e676af6f5b0c042305c8b190 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/prediction_service.py @@ -0,0 +1,1403 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content as gca_content +from google.cloud.aiplatform_v1.types import explanation +from google.cloud.aiplatform_v1.types import tool +from google.cloud.aiplatform_v1.types import types +from google.cloud.aiplatform_v1.types import usage_metadata as gca_usage_metadata +import google.api.httpbody_pb2 as httpbody_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PredictRequest", + "PredictResponse", + "RawPredictRequest", + "StreamRawPredictRequest", + "DirectPredictRequest", + "DirectPredictResponse", + "DirectRawPredictRequest", + "DirectRawPredictResponse", + "StreamDirectPredictRequest", + "StreamDirectPredictResponse", + "StreamDirectRawPredictRequest", + "StreamDirectRawPredictResponse", + "StreamingPredictRequest", + "StreamingPredictResponse", + "StreamingRawPredictRequest", + "StreamingRawPredictResponse", + "ExplainRequest", + "ExplainResponse", + "CountTokensRequest", + "CountTokensResponse", + "GenerateContentRequest", + "GenerateContentResponse", + "EmbedContentRequest", + "EmbedContentResponse", + }, +) + + +class PredictRequest(proto.Message): + r"""Request message for + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + instances (MutableSequence[google.protobuf.struct_pb2.Value]): + Required. The instances that are the input to the prediction + call. A DeployedModel may have an upper limit on the number + of instances it supports per request, and when it is + exceeded the prediction call errors in case of AutoML + Models, or, in case of customer created Models, the + behaviour is as documented by that Model. The schema of any + single instance may be specified via Endpoint's + DeployedModels' + [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + parameters (google.protobuf.struct_pb2.Value): + The parameters that govern the prediction. The schema of the + parameters may be specified via Endpoint's DeployedModels' + [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + labels (MutableMapping[str, str]): + Optional. The user labels for Imagen billing + usage only. Only Imagen supports labels. For + other use cases, it will be ignored. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + instances: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=struct_pb2.Value, + ) + parameters: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=3, + message=struct_pb2.Value, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + + +class PredictResponse(proto.Message): + r"""Response message for + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. + + Attributes: + predictions (MutableSequence[google.protobuf.struct_pb2.Value]): + The predictions that are the output of the predictions call. + The schema of any single prediction may be specified via + Endpoint's DeployedModels' [Model's + ][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [prediction_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.prediction_schema_uri]. + deployed_model_id (str): + ID of the Endpoint's DeployedModel that + served this prediction. + model (str): + Output only. The resource name of the Model + which is deployed as the DeployedModel that this + prediction hits. + model_version_id (str): + Output only. The version ID of the Model + which is deployed as the DeployedModel that this + prediction hits. + model_display_name (str): + Output only. The [display + name][google.cloud.aiplatform.v1.Model.display_name] of the + Model which is deployed as the DeployedModel that this + prediction hits. + metadata (google.protobuf.struct_pb2.Value): + Output only. Request-level metadata returned + by the model. The metadata type will be + dependent upon the model implementation. + """ + + predictions: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=struct_pb2.Value, + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=2, + ) + model: str = proto.Field( + proto.STRING, + number=3, + ) + model_version_id: str = proto.Field( + proto.STRING, + number=5, + ) + model_display_name: str = proto.Field( + proto.STRING, + number=4, + ) + metadata: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=6, + message=struct_pb2.Value, + ) + + +class RawPredictRequest(proto.Message): + r"""Request message for + [PredictionService.RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + http_body (google.api.httpbody_pb2.HttpBody): + The prediction input. Supports HTTP headers and arbitrary + data payload. + + A [DeployedModel][google.cloud.aiplatform.v1.DeployedModel] + may have an upper limit on the number of instances it + supports per request. When this limit it is exceeded for an + AutoML model, the + [RawPredict][google.cloud.aiplatform.v1.PredictionService.RawPredict] + method returns an error. When this limit is exceeded for a + custom-trained model, the behavior varies depending on the + model. + + You can specify the schema for each instance in the + [predict_schemata.instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri] + field when you create a + [Model][google.cloud.aiplatform.v1.Model]. This schema + applies when you deploy the ``Model`` as a ``DeployedModel`` + to an [Endpoint][google.cloud.aiplatform.v1.Endpoint] and + use the ``RawPredict`` method. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + http_body: httpbody_pb2.HttpBody = proto.Field( + proto.MESSAGE, + number=2, + message=httpbody_pb2.HttpBody, + ) + + +class StreamRawPredictRequest(proto.Message): + r"""Request message for + [PredictionService.StreamRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamRawPredict]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + http_body (google.api.httpbody_pb2.HttpBody): + The prediction input. Supports HTTP headers + and arbitrary data payload. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + http_body: httpbody_pb2.HttpBody = proto.Field( + proto.MESSAGE, + number=2, + message=httpbody_pb2.HttpBody, + ) + + +class DirectPredictRequest(proto.Message): + r"""Request message for + [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + inputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + The prediction input. + parameters (google.cloud.aiplatform_v1.types.Tensor): + The parameters that govern the prediction. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + inputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=3, + message=types.Tensor, + ) + + +class DirectPredictResponse(proto.Message): + r"""Response message for + [PredictionService.DirectPredict][google.cloud.aiplatform.v1.PredictionService.DirectPredict]. + + Attributes: + outputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + The prediction output. + parameters (google.cloud.aiplatform_v1.types.Tensor): + The parameters that govern the prediction. + """ + + outputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + + +class DirectRawPredictRequest(proto.Message): + r"""Request message for + [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + method_name (str): + Fully qualified name of the API method being invoked to + perform predictions. + + Format: ``/namespace.Service/Method/`` Example: + ``/tensorflow.serving.PredictionService/Predict`` + input (bytes): + The prediction input. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + method_name: str = proto.Field( + proto.STRING, + number=2, + ) + input: bytes = proto.Field( + proto.BYTES, + number=3, + ) + + +class DirectRawPredictResponse(proto.Message): + r"""Response message for + [PredictionService.DirectRawPredict][google.cloud.aiplatform.v1.PredictionService.DirectRawPredict]. + + Attributes: + output (bytes): + The prediction output. + """ + + output: bytes = proto.Field( + proto.BYTES, + number=1, + ) + + +class StreamDirectPredictRequest(proto.Message): + r"""Request message for + [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict]. + + The first message must contain + [endpoint][google.cloud.aiplatform.v1.StreamDirectPredictRequest.endpoint] + field and optionally [input][]. The subsequent messages must contain + [input][]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + inputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + Optional. The prediction input. + parameters (google.cloud.aiplatform_v1.types.Tensor): + Optional. The parameters that govern the + prediction. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + inputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=3, + message=types.Tensor, + ) + + +class StreamDirectPredictResponse(proto.Message): + r"""Response message for + [PredictionService.StreamDirectPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectPredict]. + + Attributes: + outputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + The prediction output. + parameters (google.cloud.aiplatform_v1.types.Tensor): + The parameters that govern the prediction. + """ + + outputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + + +class StreamDirectRawPredictRequest(proto.Message): + r"""Request message for + [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]. + + The first message must contain + [endpoint][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.endpoint] + and + [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name] + fields and optionally + [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. + The subsequent messages must contain + [input][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.input]. + [method_name][google.cloud.aiplatform.v1.StreamDirectRawPredictRequest.method_name] + in the subsequent messages have no effect. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + method_name (str): + Optional. Fully qualified name of the API method being + invoked to perform predictions. + + Format: ``/namespace.Service/Method/`` Example: + ``/tensorflow.serving.PredictionService/Predict`` + input (bytes): + Optional. The prediction input. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + method_name: str = proto.Field( + proto.STRING, + number=2, + ) + input: bytes = proto.Field( + proto.BYTES, + number=3, + ) + + +class StreamDirectRawPredictResponse(proto.Message): + r"""Response message for + [PredictionService.StreamDirectRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamDirectRawPredict]. + + Attributes: + output (bytes): + The prediction output. + """ + + output: bytes = proto.Field( + proto.BYTES, + number=1, + ) + + +class StreamingPredictRequest(proto.Message): + r"""Request message for + [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict]. + + The first message must contain + [endpoint][google.cloud.aiplatform.v1.StreamingPredictRequest.endpoint] + field and optionally [input][]. The subsequent messages must contain + [input][]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + inputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + The prediction input. + parameters (google.cloud.aiplatform_v1.types.Tensor): + The parameters that govern the prediction. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + inputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=3, + message=types.Tensor, + ) + + +class StreamingPredictResponse(proto.Message): + r"""Response message for + [PredictionService.StreamingPredict][google.cloud.aiplatform.v1.PredictionService.StreamingPredict]. + + Attributes: + outputs (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + The prediction output. + parameters (google.cloud.aiplatform_v1.types.Tensor): + The parameters that govern the prediction. + """ + + outputs: MutableSequence[types.Tensor] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=types.Tensor, + ) + parameters: types.Tensor = proto.Field( + proto.MESSAGE, + number=2, + message=types.Tensor, + ) + + +class StreamingRawPredictRequest(proto.Message): + r"""Request message for + [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict]. + + The first message must contain + [endpoint][google.cloud.aiplatform.v1.StreamingRawPredictRequest.endpoint] + and + [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name] + fields and optionally + [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. + The subsequent messages must contain + [input][google.cloud.aiplatform.v1.StreamingRawPredictRequest.input]. + [method_name][google.cloud.aiplatform.v1.StreamingRawPredictRequest.method_name] + in the subsequent messages have no effect. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + prediction. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + method_name (str): + Fully qualified name of the API method being invoked to + perform predictions. + + Format: ``/namespace.Service/Method/`` Example: + ``/tensorflow.serving.PredictionService/Predict`` + input (bytes): + The prediction input. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + method_name: str = proto.Field( + proto.STRING, + number=2, + ) + input: bytes = proto.Field( + proto.BYTES, + number=3, + ) + + +class StreamingRawPredictResponse(proto.Message): + r"""Response message for + [PredictionService.StreamingRawPredict][google.cloud.aiplatform.v1.PredictionService.StreamingRawPredict]. + + Attributes: + output (bytes): + The prediction output. + """ + + output: bytes = proto.Field( + proto.BYTES, + number=1, + ) + + +class ExplainRequest(proto.Message): + r"""Request message for + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to serve the + explanation. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + instances (MutableSequence[google.protobuf.struct_pb2.Value]): + Required. The instances that are the input to the + explanation call. A DeployedModel may have an upper limit on + the number of instances it supports per request, and when it + is exceeded the explanation call errors in case of AutoML + Models, or, in case of customer created Models, the + behaviour is as documented by that Model. The schema of any + single instance may be specified via Endpoint's + DeployedModels' + [Model's][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [instance_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.instance_schema_uri]. + parameters (google.protobuf.struct_pb2.Value): + The parameters that govern the prediction. The schema of the + parameters may be specified via Endpoint's DeployedModels' + [Model's ][google.cloud.aiplatform.v1.DeployedModel.model] + [PredictSchemata's][google.cloud.aiplatform.v1.Model.predict_schemata] + [parameters_schema_uri][google.cloud.aiplatform.v1.PredictSchemata.parameters_schema_uri]. + explanation_spec_override (google.cloud.aiplatform_v1.types.ExplanationSpecOverride): + If specified, overrides the + [explanation_spec][google.cloud.aiplatform.v1.DeployedModel.explanation_spec] + of the DeployedModel. Can be used for explaining prediction + results with different configurations, such as: + + - Explaining top-5 predictions results as opposed to top-1; + - Increasing path count or step count of the attribution + methods to reduce approximate errors; + - Using different baselines for explaining the prediction + results. + deployed_model_id (str): + If specified, this ExplainRequest will be served by the + chosen DeployedModel, overriding + [Endpoint.traffic_split][google.cloud.aiplatform.v1.Endpoint.traffic_split]. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + instances: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=struct_pb2.Value, + ) + parameters: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=4, + message=struct_pb2.Value, + ) + explanation_spec_override: explanation.ExplanationSpecOverride = proto.Field( + proto.MESSAGE, + number=5, + message=explanation.ExplanationSpecOverride, + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ExplainResponse(proto.Message): + r"""Response message for + [PredictionService.Explain][google.cloud.aiplatform.v1.PredictionService.Explain]. + + Attributes: + explanations (MutableSequence[google.cloud.aiplatform_v1.types.Explanation]): + The explanations of the Model's + [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]. + + It has the same number of elements as + [instances][google.cloud.aiplatform.v1.ExplainRequest.instances] + to be explained. + deployed_model_id (str): + ID of the Endpoint's DeployedModel that + served this explanation. + predictions (MutableSequence[google.protobuf.struct_pb2.Value]): + The predictions that are the output of the predictions call. + Same as + [PredictResponse.predictions][google.cloud.aiplatform.v1.PredictResponse.predictions]. + """ + + explanations: MutableSequence[explanation.Explanation] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=explanation.Explanation, + ) + deployed_model_id: str = proto.Field( + proto.STRING, + number=2, + ) + predictions: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=struct_pb2.Value, + ) + + +class CountTokensRequest(proto.Message): + r"""Request message for [PredictionService.CountTokens][]. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + endpoint (str): + Required. The name of the Endpoint requested to perform + token counting. Format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + model (str): + Optional. The name of the publisher model requested to serve + the prediction. Format: + ``projects/{project}/locations/{location}/publishers/*/models/*`` + instances (MutableSequence[google.protobuf.struct_pb2.Value]): + Optional. The instances that are the input to + token counting call. Schema is identical to the + prediction schema of the underlying model. + contents (MutableSequence[google.cloud.aiplatform_v1.types.Content]): + Optional. Input content. + system_instruction (google.cloud.aiplatform_v1.types.Content): + Optional. The user provided system + instructions for the model. Note: only text + should be used in parts and content in each part + will be in a separate paragraph. + + This field is a member of `oneof`_ ``_system_instruction``. + tools (MutableSequence[google.cloud.aiplatform_v1.types.Tool]): + Optional. A list of ``Tools`` the model may use to generate + the next response. + + A ``Tool`` is a piece of code that enables the system to + interact with external systems to perform an action, or set + of actions, outside of knowledge and scope of the model. + generation_config (google.cloud.aiplatform_v1.types.GenerationConfig): + Optional. Generation config that the model + will use to generate the response. + + This field is a member of `oneof`_ ``_generation_config``. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + model: str = proto.Field( + proto.STRING, + number=3, + ) + instances: MutableSequence[struct_pb2.Value] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=struct_pb2.Value, + ) + contents: MutableSequence[gca_content.Content] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=gca_content.Content, + ) + system_instruction: gca_content.Content = proto.Field( + proto.MESSAGE, + number=5, + optional=True, + message=gca_content.Content, + ) + tools: MutableSequence[tool.Tool] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message=tool.Tool, + ) + generation_config: gca_content.GenerationConfig = proto.Field( + proto.MESSAGE, + number=7, + optional=True, + message=gca_content.GenerationConfig, + ) + + +class CountTokensResponse(proto.Message): + r"""Response message for [PredictionService.CountTokens][]. + + Attributes: + total_tokens (int): + The total number of tokens counted across all + instances from the request. + total_billable_characters (int): + The total number of billable characters + counted across all instances from the request. + prompt_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. List of modalities that were + processed in the request input. + """ + + total_tokens: int = proto.Field( + proto.INT32, + number=1, + ) + total_billable_characters: int = proto.Field( + proto.INT32, + number=2, + ) + prompt_tokens_details: MutableSequence[gca_content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=3, + message=gca_content.ModalityTokenCount, + ) + ) + + +class GenerateContentRequest(proto.Message): + r"""Request message for [PredictionService.GenerateContent]. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model (str): + Required. The fully qualified name of the publisher model or + tuned model endpoint to use. + + Publisher model format: + ``projects/{project}/locations/{location}/publishers/*/models/*`` + + Tuned model endpoint format: + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + contents (MutableSequence[google.cloud.aiplatform_v1.types.Content]): + Required. The content of the current + conversation with the model. + For single-turn queries, this is a single + instance. For multi-turn queries, this is a + repeated field that contains conversation + history + latest request. + system_instruction (google.cloud.aiplatform_v1.types.Content): + Optional. The user provided system + instructions for the model. Note: only text + should be used in parts and content in each part + will be in a separate paragraph. + + This field is a member of `oneof`_ ``_system_instruction``. + cached_content (str): + Optional. The name of the cached content used as context to + serve the prediction. Note: only used in explicit caching, + where users can have control over caching (e.g. what content + to cache) and enjoy guaranteed cost savings. Format: + ``projects/{project}/locations/{location}/cachedContents/{cachedContent}`` + tools (MutableSequence[google.cloud.aiplatform_v1.types.Tool]): + Optional. A list of ``Tools`` the model may use to generate + the next response. + + A ``Tool`` is a piece of code that enables the system to + interact with external systems to perform an action, or set + of actions, outside of knowledge and scope of the model. + tool_config (google.cloud.aiplatform_v1.types.ToolConfig): + Optional. Tool config. This config is shared + for all tools provided in the request. + labels (MutableMapping[str, str]): + Optional. The labels with user-defined + metadata for the request. It is used for billing + and reporting only. + + Label keys and values can be no longer than 63 + characters (Unicode codepoints) and can only + contain lowercase letters, numeric characters, + underscores, and dashes. International + characters are allowed. Label values are + optional. Label keys must start with a letter. + safety_settings (MutableSequence[google.cloud.aiplatform_v1.types.SafetySetting]): + Optional. Per request settings for blocking + unsafe content. Enforced on + GenerateContentResponse.candidates. + model_armor_config (google.cloud.aiplatform_v1.types.ModelArmorConfig): + Optional. Settings for prompt and response sanitization + using the Model Armor service. If supplied, safety_settings + must not be supplied. + generation_config (google.cloud.aiplatform_v1.types.GenerationConfig): + Optional. Generation config. + """ + + model: str = proto.Field( + proto.STRING, + number=5, + ) + contents: MutableSequence[gca_content.Content] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=gca_content.Content, + ) + system_instruction: gca_content.Content = proto.Field( + proto.MESSAGE, + number=8, + optional=True, + message=gca_content.Content, + ) + cached_content: str = proto.Field( + proto.STRING, + number=9, + ) + tools: MutableSequence[tool.Tool] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message=tool.Tool, + ) + tool_config: tool.ToolConfig = proto.Field( + proto.MESSAGE, + number=7, + message=tool.ToolConfig, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + safety_settings: MutableSequence[gca_content.SafetySetting] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=gca_content.SafetySetting, + ) + model_armor_config: gca_content.ModelArmorConfig = proto.Field( + proto.MESSAGE, + number=11, + message=gca_content.ModelArmorConfig, + ) + generation_config: gca_content.GenerationConfig = proto.Field( + proto.MESSAGE, + number=4, + message=gca_content.GenerationConfig, + ) + + +class GenerateContentResponse(proto.Message): + r"""Response message for [PredictionService.GenerateContent]. + + Attributes: + candidates (MutableSequence[google.cloud.aiplatform_v1.types.Candidate]): + Output only. Generated candidates. + model_version (str): + Output only. The model version used to + generate the response. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when the request is + made to the server. + response_id (str): + Output only. response_id is used to identify each response. + It is the encoding of the event_id. + prompt_feedback (google.cloud.aiplatform_v1.types.GenerateContentResponse.PromptFeedback): + Output only. Content filter results for a + prompt sent in the request. Note: Sent only in + the first stream chunk. Only happens when no + candidates were generated due to content + violations. + usage_metadata (google.cloud.aiplatform_v1.types.GenerateContentResponse.UsageMetadata): + Usage metadata about the response(s). + """ + + class PromptFeedback(proto.Message): + r"""Content filter results for a prompt sent in the request. + + Attributes: + block_reason (google.cloud.aiplatform_v1.types.GenerateContentResponse.PromptFeedback.BlockedReason): + Output only. Blocked reason. + safety_ratings (MutableSequence[google.cloud.aiplatform_v1.types.SafetyRating]): + Output only. Safety ratings. + block_reason_message (str): + Output only. A readable block reason message. + """ + + class BlockedReason(proto.Enum): + r"""Blocked reason enumeration. + + Values: + BLOCKED_REASON_UNSPECIFIED (0): + Unspecified blocked reason. + SAFETY (1): + Candidates blocked due to safety. + OTHER (2): + Candidates blocked due to other reason. + BLOCKLIST (3): + Candidates blocked due to the terms which are + included from the terminology blocklist. + PROHIBITED_CONTENT (4): + Candidates blocked due to prohibited content. + MODEL_ARMOR (5): + The user prompt was blocked by Model Armor. + JAILBREAK (6): + The user prompt was blocked due to jailbreak. + """ + + BLOCKED_REASON_UNSPECIFIED = 0 + SAFETY = 1 + OTHER = 2 + BLOCKLIST = 3 + PROHIBITED_CONTENT = 4 + MODEL_ARMOR = 5 + JAILBREAK = 6 + + block_reason: "GenerateContentResponse.PromptFeedback.BlockedReason" = ( + proto.Field( + proto.ENUM, + number=1, + enum="GenerateContentResponse.PromptFeedback.BlockedReason", + ) + ) + safety_ratings: MutableSequence[gca_content.SafetyRating] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=gca_content.SafetyRating, + ) + block_reason_message: str = proto.Field( + proto.STRING, + number=3, + ) + + class UsageMetadata(proto.Message): + r"""Usage metadata about response(s). + + Attributes: + prompt_token_count (int): + Number of tokens in the request. When ``cached_content`` is + set, this is still the total effective prompt size meaning + this includes the number of tokens in the cached content. + candidates_token_count (int): + Number of tokens in the response(s). + thoughts_token_count (int): + Output only. Number of tokens present in + thoughts output. + total_token_count (int): + Total token count for prompt and response + candidates. + cached_content_token_count (int): + Output only. Number of tokens in the cached + part in the input (the cached content). + prompt_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. List of modalities that were + processed in the request input. + cache_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. List of modalities of the cached + content in the request input. + candidates_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. List of modalities that were + returned in the response. + tool_use_prompt_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. A detailed breakdown by modality + of the token counts from the results of tool + executions, which are provided back to the model + as input. + traffic_type (google.cloud.aiplatform_v1.types.GenerateContentResponse.UsageMetadata.TrafficType): + Output only. The traffic type for this + request. + """ + + class TrafficType(proto.Enum): + r"""The type of traffic that this request was processed with, + indicating which quota is consumed. + + Values: + TRAFFIC_TYPE_UNSPECIFIED (0): + Unspecified request traffic type. + ON_DEMAND (1): + The request was processed using Pay-As-You-Go + quota. + ON_DEMAND_PRIORITY (3): + Type for Priority Pay-As-You-Go traffic. + ON_DEMAND_FLEX (4): + Type for Flex traffic. + PROVISIONED_THROUGHPUT (2): + Type for Provisioned Throughput traffic. + """ + + TRAFFIC_TYPE_UNSPECIFIED = 0 + ON_DEMAND = 1 + ON_DEMAND_PRIORITY = 3 + ON_DEMAND_FLEX = 4 + PROVISIONED_THROUGHPUT = 2 + + prompt_token_count: int = proto.Field( + proto.INT32, + number=1, + ) + candidates_token_count: int = proto.Field( + proto.INT32, + number=2, + ) + thoughts_token_count: int = proto.Field( + proto.INT32, + number=14, + ) + total_token_count: int = proto.Field( + proto.INT32, + number=3, + ) + cached_content_token_count: int = proto.Field( + proto.INT32, + number=5, + ) + prompt_tokens_details: MutableSequence[gca_content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=9, + message=gca_content.ModalityTokenCount, + ) + ) + cache_tokens_details: MutableSequence[gca_content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=10, + message=gca_content.ModalityTokenCount, + ) + ) + candidates_tokens_details: MutableSequence[gca_content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=11, + message=gca_content.ModalityTokenCount, + ) + ) + tool_use_prompt_tokens_details: MutableSequence[ + gca_content.ModalityTokenCount + ] = proto.RepeatedField( + proto.MESSAGE, + number=12, + message=gca_content.ModalityTokenCount, + ) + traffic_type: "GenerateContentResponse.UsageMetadata.TrafficType" = proto.Field( + proto.ENUM, + number=8, + enum="GenerateContentResponse.UsageMetadata.TrafficType", + ) + + candidates: MutableSequence[gca_content.Candidate] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=gca_content.Candidate, + ) + model_version: str = proto.Field( + proto.STRING, + number=11, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + response_id: str = proto.Field( + proto.STRING, + number=13, + ) + prompt_feedback: PromptFeedback = proto.Field( + proto.MESSAGE, + number=3, + message=PromptFeedback, + ) + usage_metadata: UsageMetadata = proto.Field( + proto.MESSAGE, + number=4, + message=UsageMetadata, + ) + + +class EmbedContentRequest(proto.Message): + r"""Request message for + [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model (str): + Required. The name of the publisher model requested to serve + the prediction. Format: + ``projects/{project}/locations/{location}/publishers/*/models/*`` + + This field is a member of `oneof`_ ``_model``. + content (google.cloud.aiplatform_v1.types.Content): + Required. Input content to be embedded. + + This field is a member of `oneof`_ ``_content``. + title (str): + Optional. Deprecated: Please use + EmbedContentConfig.title instead. The title for + the text. + + This field is a member of `oneof`_ ``_title``. + task_type (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbeddingTaskType): + Optional. Deprecated: Please use + EmbedContentConfig.task_type instead. The task type of the + embedding. + + This field is a member of `oneof`_ ``_task_type``. + output_dimensionality (int): + Optional. Deprecated: Please use + EmbedContentConfig.output_dimensionality instead. Reduced + dimension for the output embedding. If set, excessive values + in the output embedding are truncated from the end. + + This field is a member of `oneof`_ ``_output_dimensionality``. + auto_truncate (bool): + Optional. Deprecated: Please use + EmbedContentConfig.auto_truncate instead. Whether to + silently truncate the input content if it's longer than the + maximum sequence length. + + This field is a member of `oneof`_ ``_auto_truncate``. + embed_content_config (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbedContentConfig): + Optional. Configuration for the EmbedContent + request. + + This field is a member of `oneof`_ ``_embed_content_config``. + """ + + class EmbeddingTaskType(proto.Enum): + r"""Represents a downstream task the embeddings will be used for. + + Values: + UNSPECIFIED (0): + Unset value, which will default to one of the + other enum values. + RETRIEVAL_QUERY (2): + Specifies the given text is a query in a + search/retrieval setting. + RETRIEVAL_DOCUMENT (3): + Specifies the given text is a document from + the corpus being searched. + SEMANTIC_SIMILARITY (4): + Specifies the given text will be used for + STS. + CLASSIFICATION (5): + Specifies that the given text will be + classified. + CLUSTERING (6): + Specifies that the embeddings will be used + for clustering. + QUESTION_ANSWERING (7): + Specifies that the embeddings will be used + for question answering. + FACT_VERIFICATION (8): + Specifies that the embeddings will be used + for fact verification. + CODE_RETRIEVAL_QUERY (9): + Specifies that the embeddings will be used + for code retrieval. + """ + + UNSPECIFIED = 0 + RETRIEVAL_QUERY = 2 + RETRIEVAL_DOCUMENT = 3 + SEMANTIC_SIMILARITY = 4 + CLASSIFICATION = 5 + CLUSTERING = 6 + QUESTION_ANSWERING = 7 + FACT_VERIFICATION = 8 + CODE_RETRIEVAL_QUERY = 9 + + class EmbedContentConfig(proto.Message): + r"""Configurations for the EmbedContent API. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + title (str): + Optional. The title for the text. + + Only applicable to text-only embedding models. + + This field is a member of `oneof`_ ``_title``. + task_type (google.cloud.aiplatform_v1.types.EmbedContentRequest.EmbeddingTaskType): + Optional. The task type of the embedding. + + Only applicable to text-only embedding models. + + This field is a member of `oneof`_ ``_task_type``. + auto_truncate (bool): + Optional. Whether to silently truncate the + input content if it's longer than the maximum + sequence length. + + Only applicable to text-only embedding models. + + This field is a member of `oneof`_ ``_auto_truncate``. + output_dimensionality (int): + Optional. Reduced dimension for the output + embedding. If set, excessive values in the + output embedding are truncated from the end. + + This field is a member of `oneof`_ ``_output_dimensionality``. + document_ocr (bool): + Optional. Whether to enable OCR for document + content. + + This field is a member of `oneof`_ ``_document_ocr``. + audio_track_extraction (bool): + Optional. Whether to extract audio from video + content. + + This field is a member of `oneof`_ ``_audio_track_extraction``. + """ + + title: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + task_type: "EmbedContentRequest.EmbeddingTaskType" = proto.Field( + proto.ENUM, + number=2, + optional=True, + enum="EmbedContentRequest.EmbeddingTaskType", + ) + auto_truncate: bool = proto.Field( + proto.BOOL, + number=3, + optional=True, + ) + output_dimensionality: int = proto.Field( + proto.INT32, + number=4, + optional=True, + ) + document_ocr: bool = proto.Field( + proto.BOOL, + number=5, + optional=True, + ) + audio_track_extraction: bool = proto.Field( + proto.BOOL, + number=6, + optional=True, + ) + + model: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + content: gca_content.Content = proto.Field( + proto.MESSAGE, + number=2, + optional=True, + message=gca_content.Content, + ) + title: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + task_type: EmbeddingTaskType = proto.Field( + proto.ENUM, + number=5, + optional=True, + enum=EmbeddingTaskType, + ) + output_dimensionality: int = proto.Field( + proto.INT32, + number=6, + optional=True, + ) + auto_truncate: bool = proto.Field( + proto.BOOL, + number=7, + optional=True, + ) + embed_content_config: EmbedContentConfig = proto.Field( + proto.MESSAGE, + number=8, + optional=True, + message=EmbedContentConfig, + ) + + +class EmbedContentResponse(proto.Message): + r"""Response message for + [PredictionService.EmbedContent][google.cloud.aiplatform.v1.PredictionService.EmbedContent]. + + Attributes: + embedding (google.cloud.aiplatform_v1.types.EmbedContentResponse.Embedding): + The embedding generated from the input + content. + usage_metadata (google.cloud.aiplatform_v1.types.UsageMetadata): + Usage metadata about the response(s). + truncated (bool): + Whether the input content was truncated + before generating the embedding. + """ + + class Embedding(proto.Message): + r"""A list of floats representing an embedding. + + Attributes: + values (MutableSequence[float]): + Embedding vector values. + """ + + values: MutableSequence[float] = proto.RepeatedField( + proto.FLOAT, + number=1, + ) + + embedding: Embedding = proto.Field( + proto.MESSAGE, + number=1, + message=Embedding, + ) + usage_metadata: gca_usage_metadata.UsageMetadata = proto.Field( + proto.MESSAGE, + number=2, + message=gca_usage_metadata.UsageMetadata, + ) + truncated: bool = proto.Field( + proto.BOOL, + number=4, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/publisher_model.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/publisher_model.py new file mode 100644 index 0000000000000000000000000000000000000000..64f6b8622d7801f3ae9d6c6a434f71e258b2066f --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/publisher_model.py @@ -0,0 +1,671 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import machine_resources +from google.cloud.aiplatform_v1.types import model + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "PublisherModel", + }, +) + + +class PublisherModel(proto.Message): + r"""A Model Garden Publisher Model. + + Attributes: + name (str): + Output only. The resource name of the + PublisherModel. + version_id (str): + Output only. Immutable. The version ID of the + PublisherModel. A new version is committed when + a new model version is uploaded under an + existing model id. It is an auto-incrementing + decimal number in string representation. + open_source_category (google.cloud.aiplatform_v1.types.PublisherModel.OpenSourceCategory): + Required. Indicates the open source category + of the publisher model. + supported_actions (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction): + Optional. Supported call-to-action options. + frameworks (MutableSequence[str]): + Optional. Additional information about the + model's Frameworks. + launch_stage (google.cloud.aiplatform_v1.types.PublisherModel.LaunchStage): + Optional. Indicates the launch stage of the + model. + version_state (google.cloud.aiplatform_v1.types.PublisherModel.VersionState): + Optional. Indicates the state of the model + version. + publisher_model_template (str): + Optional. Output only. Immutable. Used to + indicate this model has a publisher model and + provide the template of the publisher model + resource name. + predict_schemata (google.cloud.aiplatform_v1.types.PredictSchemata): + Optional. The schemata that describes formats of the + PublisherModel's predictions and explanations as given and + returned via + [PredictionService.Predict][google.cloud.aiplatform.v1.PredictionService.Predict]. + """ + + class OpenSourceCategory(proto.Enum): + r"""An enum representing the open source category of a + PublisherModel. + + Values: + OPEN_SOURCE_CATEGORY_UNSPECIFIED (0): + The open source category is unspecified, + which should not be used. + PROPRIETARY (1): + Used to indicate the PublisherModel is not + open sourced. + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT (2): + Used to indicate the PublisherModel is a + Google-owned open source model w/ Google + checkpoint. + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT (3): + Used to indicate the PublisherModel is a + 3p-owned open source model w/ Google checkpoint. + GOOGLE_OWNED_OSS (4): + Used to indicate the PublisherModel is a + Google-owned pure open source model. + THIRD_PARTY_OWNED_OSS (5): + Used to indicate the PublisherModel is a + 3p-owned pure open source model. + """ + + OPEN_SOURCE_CATEGORY_UNSPECIFIED = 0 + PROPRIETARY = 1 + GOOGLE_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 2 + THIRD_PARTY_OWNED_OSS_WITH_GOOGLE_CHECKPOINT = 3 + GOOGLE_OWNED_OSS = 4 + THIRD_PARTY_OWNED_OSS = 5 + + class LaunchStage(proto.Enum): + r"""An enum representing the launch stage of a PublisherModel. + + Values: + LAUNCH_STAGE_UNSPECIFIED (0): + The model launch stage is unspecified. + EXPERIMENTAL (1): + Used to indicate the PublisherModel is at + Experimental launch stage, available to a small + set of customers. + PRIVATE_PREVIEW (2): + Used to indicate the PublisherModel is at + Private Preview launch stage, only available to + a small set of customers, although a larger set + of customers than an Experimental launch. + Previews are the first launch stage used to get + feedback from customers. + PUBLIC_PREVIEW (3): + Used to indicate the PublisherModel is at + Public Preview launch stage, available to all + customers, although not supported for production + workloads. + GA (4): + Used to indicate the PublisherModel is at GA + launch stage, available to all customers and + ready for production workload. + """ + + LAUNCH_STAGE_UNSPECIFIED = 0 + EXPERIMENTAL = 1 + PRIVATE_PREVIEW = 2 + PUBLIC_PREVIEW = 3 + GA = 4 + + class VersionState(proto.Enum): + r"""An enum representing the state of the PublicModelVersion. + + Values: + VERSION_STATE_UNSPECIFIED (0): + The version state is unspecified. + VERSION_STATE_STABLE (1): + Used to indicate the version is stable. + VERSION_STATE_UNSTABLE (2): + Used to indicate the version is unstable. + """ + + VERSION_STATE_UNSPECIFIED = 0 + VERSION_STATE_STABLE = 1 + VERSION_STATE_UNSTABLE = 2 + + class ResourceReference(proto.Message): + r"""Reference to a resource. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + uri (str): + The URI of the resource. + + This field is a member of `oneof`_ ``reference``. + resource_name (str): + The resource name of the Google Cloud + resource. + + This field is a member of `oneof`_ ``reference``. + use_case (str): + Use case (CUJ) of the resource. + + This field is a member of `oneof`_ ``reference``. + description (str): + Description of the resource. + + This field is a member of `oneof`_ ``reference``. + """ + + uri: str = proto.Field( + proto.STRING, + number=1, + oneof="reference", + ) + resource_name: str = proto.Field( + proto.STRING, + number=2, + oneof="reference", + ) + use_case: str = proto.Field( + proto.STRING, + number=3, + oneof="reference", + ) + description: str = proto.Field( + proto.STRING, + number=4, + oneof="reference", + ) + + class Documentation(proto.Message): + r"""A named piece of documentation. + + Attributes: + title (str): + Required. E.g., OVERVIEW, USE CASES, + DOCUMENTATION, SDK & SAMPLES, JAVA, NODE.JS, + etc.. + content (str): + Required. Content of this piece of document + (in Markdown format). + """ + + title: str = proto.Field( + proto.STRING, + number=1, + ) + content: str = proto.Field( + proto.STRING, + number=2, + ) + + class CallToAction(proto.Message): + r"""Actions could take on this Publisher Model. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + view_rest_api (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.ViewRestApi): + Optional. To view Rest API docs. + open_notebook (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open notebook of the + PublisherModel. + open_notebooks (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.OpenNotebooks): + Optional. Open notebooks of the + PublisherModel. + + This field is a member of `oneof`_ ``_open_notebooks``. + create_application (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Create application using the + PublisherModel. + open_fine_tuning_pipeline (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open fine-tuning pipeline of the + PublisherModel. + open_fine_tuning_pipelines (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.OpenFineTuningPipelines): + Optional. Open fine-tuning pipelines of the + PublisherModel. + + This field is a member of `oneof`_ ``_open_fine_tuning_pipelines``. + open_prompt_tuning_pipeline (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open prompt-tuning pipeline of the + PublisherModel. + open_genie (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open Genie / Playground. + deploy (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.Deploy): + Optional. Deploy the PublisherModel to Vertex + Endpoint. + deploy_gke (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.DeployGke): + Optional. Deploy PublisherModel to Google + Kubernetes Engine. + open_generation_ai_studio (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open in Generation AI Studio. + request_access (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Request for access. + open_evaluation_pipeline (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences): + Optional. Open evaluation pipeline of the + PublisherModel. + """ + + class RegionalResourceReferences(proto.Message): + r"""The regional resource name or the URI. Key is region, e.g., + us-central1, europe-west2, global, etc.. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + references (MutableMapping[str, google.cloud.aiplatform_v1.types.PublisherModel.ResourceReference]): + Required. + title (str): + Required. + resource_title (str): + Optional. Title of the resource. + + This field is a member of `oneof`_ ``_resource_title``. + resource_use_case (str): + Optional. Use case (CUJ) of the resource. + + This field is a member of `oneof`_ ``_resource_use_case``. + resource_description (str): + Optional. Description of the resource. + + This field is a member of `oneof`_ ``_resource_description``. + """ + + references: MutableMapping[str, "PublisherModel.ResourceReference"] = ( + proto.MapField( + proto.STRING, + proto.MESSAGE, + number=1, + message="PublisherModel.ResourceReference", + ) + ) + title: str = proto.Field( + proto.STRING, + number=2, + ) + resource_title: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + resource_use_case: str = proto.Field( + proto.STRING, + number=4, + optional=True, + ) + resource_description: str = proto.Field( + proto.STRING, + number=5, + optional=True, + ) + + class ViewRestApi(proto.Message): + r"""Rest API docs. + + Attributes: + documentations (MutableSequence[google.cloud.aiplatform_v1.types.PublisherModel.Documentation]): + Required. + title (str): + Required. The title of the view rest API. + """ + + documentations: MutableSequence["PublisherModel.Documentation"] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message="PublisherModel.Documentation", + ) + ) + title: str = proto.Field( + proto.STRING, + number=2, + ) + + class OpenNotebooks(proto.Message): + r"""Open notebooks. + + Attributes: + notebooks (MutableSequence[google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences]): + Required. Regional resource references to + notebooks. + """ + + notebooks: MutableSequence[ + "PublisherModel.CallToAction.RegionalResourceReferences" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + + class OpenFineTuningPipelines(proto.Message): + r"""Open fine tuning pipelines. + + Attributes: + fine_tuning_pipelines (MutableSequence[google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.RegionalResourceReferences]): + Required. Regional resource references to + fine tuning pipelines. + """ + + fine_tuning_pipelines: MutableSequence[ + "PublisherModel.CallToAction.RegionalResourceReferences" + ] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + + class Deploy(proto.Message): + r"""Model metadata that is needed for UploadModel or + DeployModel/CreateEndpoint requests. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + dedicated_resources (google.cloud.aiplatform_v1.types.DedicatedResources): + A description of resources that are dedicated + to the DeployedModel, and that need a higher + degree of manual configuration. + + This field is a member of `oneof`_ ``prediction_resources``. + automatic_resources (google.cloud.aiplatform_v1.types.AutomaticResources): + A description of resources that to large + degree are decided by Vertex AI, and require + only a modest additional configuration. + + This field is a member of `oneof`_ ``prediction_resources``. + shared_resources (str): + The resource name of the shared DeploymentResourcePool to + deploy on. Format: + ``projects/{project}/locations/{location}/deploymentResourcePools/{deployment_resource_pool}`` + + This field is a member of `oneof`_ ``prediction_resources``. + model_display_name (str): + Optional. Default model display name. + large_model_reference (google.cloud.aiplatform_v1.types.LargeModelReference): + Optional. Large model reference. When this is set, + model_artifact_spec is not needed. + container_spec (google.cloud.aiplatform_v1.types.ModelContainerSpec): + Optional. The specification of the container + that is to be used when deploying this Model in + Vertex AI. Not present for Large Models. + artifact_uri (str): + Optional. The path to the directory + containing the Model artifact and any of its + supporting files. + deploy_task_name (str): + Optional. The name of the deploy task (e.g., + "text to image generation"). + + This field is a member of `oneof`_ ``_deploy_task_name``. + deploy_metadata (google.cloud.aiplatform_v1.types.PublisherModel.CallToAction.Deploy.DeployMetadata): + Optional. Metadata information about this + deployment config. + + This field is a member of `oneof`_ ``_deploy_metadata``. + title (str): + Required. The title of the regional resource + reference. + public_artifact_uri (str): + Optional. The signed URI for ephemeral Cloud + Storage access to model artifact. + """ + + class DeployMetadata(proto.Message): + r"""Metadata information about the deployment for managing + deployment config. + + Attributes: + labels (MutableMapping[str, str]): + Optional. Labels for the deployment. For + managing deployment config like verifying, + source of deployment config, etc. + sample_request (str): + Optional. Sample request for deployed + endpoint. + """ + + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + sample_request: str = proto.Field( + proto.STRING, + number=2, + ) + + dedicated_resources: machine_resources.DedicatedResources = proto.Field( + proto.MESSAGE, + number=5, + oneof="prediction_resources", + message=machine_resources.DedicatedResources, + ) + automatic_resources: machine_resources.AutomaticResources = proto.Field( + proto.MESSAGE, + number=6, + oneof="prediction_resources", + message=machine_resources.AutomaticResources, + ) + shared_resources: str = proto.Field( + proto.STRING, + number=7, + oneof="prediction_resources", + ) + model_display_name: str = proto.Field( + proto.STRING, + number=1, + ) + large_model_reference: model.LargeModelReference = proto.Field( + proto.MESSAGE, + number=2, + message=model.LargeModelReference, + ) + container_spec: model.ModelContainerSpec = proto.Field( + proto.MESSAGE, + number=3, + message=model.ModelContainerSpec, + ) + artifact_uri: str = proto.Field( + proto.STRING, + number=4, + ) + deploy_task_name: str = proto.Field( + proto.STRING, + number=10, + optional=True, + ) + deploy_metadata: "PublisherModel.CallToAction.Deploy.DeployMetadata" = ( + proto.Field( + proto.MESSAGE, + number=11, + optional=True, + message="PublisherModel.CallToAction.Deploy.DeployMetadata", + ) + ) + title: str = proto.Field( + proto.STRING, + number=8, + ) + public_artifact_uri: str = proto.Field( + proto.STRING, + number=9, + ) + + class DeployGke(proto.Message): + r"""Configurations for PublisherModel GKE deployment + + Attributes: + gke_yaml_configs (MutableSequence[str]): + Optional. GKE deployment configuration in + yaml format. + """ + + gke_yaml_configs: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + view_rest_api: "PublisherModel.CallToAction.ViewRestApi" = proto.Field( + proto.MESSAGE, + number=1, + message="PublisherModel.CallToAction.ViewRestApi", + ) + open_notebook: "PublisherModel.CallToAction.RegionalResourceReferences" = ( + proto.Field( + proto.MESSAGE, + number=2, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + ) + open_notebooks: "PublisherModel.CallToAction.OpenNotebooks" = proto.Field( + proto.MESSAGE, + number=12, + optional=True, + message="PublisherModel.CallToAction.OpenNotebooks", + ) + create_application: "PublisherModel.CallToAction.RegionalResourceReferences" = ( + proto.Field( + proto.MESSAGE, + number=3, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + ) + open_fine_tuning_pipeline: ( + "PublisherModel.CallToAction.RegionalResourceReferences" + ) = proto.Field( + proto.MESSAGE, + number=4, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + open_fine_tuning_pipelines: ( + "PublisherModel.CallToAction.OpenFineTuningPipelines" + ) = proto.Field( + proto.MESSAGE, + number=13, + optional=True, + message="PublisherModel.CallToAction.OpenFineTuningPipelines", + ) + open_prompt_tuning_pipeline: ( + "PublisherModel.CallToAction.RegionalResourceReferences" + ) = proto.Field( + proto.MESSAGE, + number=5, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + open_genie: "PublisherModel.CallToAction.RegionalResourceReferences" = ( + proto.Field( + proto.MESSAGE, + number=6, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + ) + deploy: "PublisherModel.CallToAction.Deploy" = proto.Field( + proto.MESSAGE, + number=7, + message="PublisherModel.CallToAction.Deploy", + ) + deploy_gke: "PublisherModel.CallToAction.DeployGke" = proto.Field( + proto.MESSAGE, + number=14, + message="PublisherModel.CallToAction.DeployGke", + ) + open_generation_ai_studio: ( + "PublisherModel.CallToAction.RegionalResourceReferences" + ) = proto.Field( + proto.MESSAGE, + number=8, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + request_access: "PublisherModel.CallToAction.RegionalResourceReferences" = ( + proto.Field( + proto.MESSAGE, + number=9, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + ) + open_evaluation_pipeline: ( + "PublisherModel.CallToAction.RegionalResourceReferences" + ) = proto.Field( + proto.MESSAGE, + number=11, + message="PublisherModel.CallToAction.RegionalResourceReferences", + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + version_id: str = proto.Field( + proto.STRING, + number=2, + ) + open_source_category: OpenSourceCategory = proto.Field( + proto.ENUM, + number=7, + enum=OpenSourceCategory, + ) + supported_actions: CallToAction = proto.Field( + proto.MESSAGE, + number=19, + message=CallToAction, + ) + frameworks: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=23, + ) + launch_stage: LaunchStage = proto.Field( + proto.ENUM, + number=29, + enum=LaunchStage, + ) + version_state: VersionState = proto.Field( + proto.ENUM, + number=37, + enum=VersionState, + ) + publisher_model_template: str = proto.Field( + proto.STRING, + number=30, + ) + predict_schemata: model.PredictSchemata = proto.Field( + proto.MESSAGE, + number=31, + message=model.PredictSchemata, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reasoning_engine_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reasoning_engine_service.py new file mode 100644 index 0000000000000000000000000000000000000000..f4741ad41d3e6da6c271c897060d226368dd3298 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reasoning_engine_service.py @@ -0,0 +1,234 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import reasoning_engine as gca_reasoning_engine +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateReasoningEngineRequest", + "CreateReasoningEngineOperationMetadata", + "GetReasoningEngineRequest", + "UpdateReasoningEngineRequest", + "UpdateReasoningEngineOperationMetadata", + "ListReasoningEnginesRequest", + "ListReasoningEnginesResponse", + "DeleteReasoningEngineRequest", + }, +) + + +class CreateReasoningEngineRequest(proto.Message): + r"""Request message for + [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + ReasoningEngine in. Format: + ``projects/{project}/locations/{location}`` + reasoning_engine (google.cloud.aiplatform_v1.types.ReasoningEngine): + Required. The ReasoningEngine to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + reasoning_engine: gca_reasoning_engine.ReasoningEngine = proto.Field( + proto.MESSAGE, + number=2, + message=gca_reasoning_engine.ReasoningEngine, + ) + + +class CreateReasoningEngineOperationMetadata(proto.Message): + r"""Details of + [ReasoningEngineService.CreateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.CreateReasoningEngine] + operation. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetReasoningEngineRequest(proto.Message): + r"""Request message for + [ReasoningEngineService.GetReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.GetReasoningEngine]. + + Attributes: + name (str): + Required. The name of the ReasoningEngine resource. Format: + ``projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdateReasoningEngineRequest(proto.Message): + r"""Request message for + [ReasoningEngineService.UpdateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine]. + + Attributes: + reasoning_engine (google.cloud.aiplatform_v1.types.ReasoningEngine): + Required. The ReasoningEngine which replaces + the resource on the server. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Optional. Mask specifying which fields to + update. + """ + + reasoning_engine: gca_reasoning_engine.ReasoningEngine = proto.Field( + proto.MESSAGE, + number=1, + message=gca_reasoning_engine.ReasoningEngine, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +class UpdateReasoningEngineOperationMetadata(proto.Message): + r"""Details of + [ReasoningEngineService.UpdateReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.UpdateReasoningEngine] + operation. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The common part of the operation metadata. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class ListReasoningEnginesRequest(proto.Message): + r"""Request message for + [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + ReasoningEngines from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Optional. The standard list filter. More detail in + `AIP-160 `__. + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + + +class ListReasoningEnginesResponse(proto.Message): + r"""Response message for + [ReasoningEngineService.ListReasoningEngines][google.cloud.aiplatform.v1.ReasoningEngineService.ListReasoningEngines] + + Attributes: + reasoning_engines (MutableSequence[google.cloud.aiplatform_v1.types.ReasoningEngine]): + List of ReasoningEngines in the requested + page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListReasoningEnginesRequest.page_token][google.cloud.aiplatform.v1.ListReasoningEnginesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + reasoning_engines: MutableSequence[gca_reasoning_engine.ReasoningEngine] = ( + proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_reasoning_engine.ReasoningEngine, + ) + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteReasoningEngineRequest(proto.Message): + r"""Request message for + [ReasoningEngineService.DeleteReasoningEngine][google.cloud.aiplatform.v1.ReasoningEngineService.DeleteReasoningEngine]. + + Attributes: + name (str): + Required. The name of the ReasoningEngine resource to be + deleted. Format: + ``projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}`` + force (bool): + Optional. If set to true, child resources of this reasoning + engine will also be deleted. Otherwise, the request will + fail with FAILED_PRECONDITION error when the reasoning + engine has undeleted child resources. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reservation_affinity.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reservation_affinity.py new file mode 100644 index 0000000000000000000000000000000000000000..cf20d7aa7688092cfbeaab5bb62211286353da64 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/reservation_affinity.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "ReservationAffinity", + }, +) + + +class ReservationAffinity(proto.Message): + r"""A ReservationAffinity can be used to configure a Vertex AI + resource (e.g., a DeployedModel) to draw its Compute Engine + resources from a Shared Reservation, or exclusively from + on-demand capacity. + + Attributes: + reservation_affinity_type (google.cloud.aiplatform_v1.types.ReservationAffinity.Type): + Required. Specifies the reservation affinity + type. + key (str): + Optional. Corresponds to the label key of a reservation + resource. To target a SPECIFIC_RESERVATION by name, use + ``compute.googleapis.com/reservation-name`` as the key and + specify the name of your reservation as its value. + values (MutableSequence[str]): + Optional. Corresponds to the label values of + a reservation resource. This must be the full + resource name of the reservation. + """ + + class Type(proto.Enum): + r"""Identifies a type of reservation affinity. + + Values: + TYPE_UNSPECIFIED (0): + Default value. This should not be used. + NO_RESERVATION (1): + Do not consume from any reserved capacity, + only use on-demand. + ANY_RESERVATION (2): + Consume any reservation available, falling + back to on-demand. + SPECIFIC_RESERVATION (3): + Consume from a specific reservation. When chosen, the + reservation must be identified via the ``key`` and + ``values`` fields. + """ + + TYPE_UNSPECIFIED = 0 + NO_RESERVATION = 1 + ANY_RESERVATION = 2 + SPECIFIC_RESERVATION = 3 + + reservation_affinity_type: Type = proto.Field( + proto.ENUM, + number=1, + enum=Type, + ) + key: str = proto.Field( + proto.STRING, + number=2, + ) + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule.py new file mode 100644 index 0000000000000000000000000000000000000000..6009b3614e06280aa6ded22429184263eda39dee --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule.py @@ -0,0 +1,295 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import notebook_service +from google.cloud.aiplatform_v1.types import pipeline_service +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Schedule", + }, +) + + +class Schedule(proto.Message): + r"""An instance of a Schedule periodically schedules runs to make + API calls based on user specified time specification and API + request type. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + cron (str): + Cron schedule (https://en.wikipedia.org/wiki/Cron) to launch + scheduled runs. To explicitly set a timezone to the cron + tab, apply a prefix in the cron tab: + "CRON_TZ=${IANA_TIME_ZONE}" or "TZ=${IANA_TIME_ZONE}". The + ${IANA_TIME_ZONE} may only be a valid string from IANA time + zone database. For example, "CRON_TZ=America/New_York 1 \* + \* \* \*", or "TZ=America/New_York 1 \* \* \* \*". + + This field is a member of `oneof`_ ``time_specification``. + create_pipeline_job_request (google.cloud.aiplatform_v1.types.CreatePipelineJobRequest): + Request for + [PipelineService.CreatePipelineJob][google.cloud.aiplatform.v1.PipelineService.CreatePipelineJob]. + CreatePipelineJobRequest.parent field is required (format: + projects/{project}/locations/{location}). + + This field is a member of `oneof`_ ``request``. + create_notebook_execution_job_request (google.cloud.aiplatform_v1.types.CreateNotebookExecutionJobRequest): + Request for + [NotebookService.CreateNotebookExecutionJob][google.cloud.aiplatform.v1.NotebookService.CreateNotebookExecutionJob]. + + This field is a member of `oneof`_ ``request``. + name (str): + Immutable. The resource name of the Schedule. + display_name (str): + Required. User provided name of the Schedule. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. Timestamp after which the first run + can be scheduled. Default to Schedule create + time if not specified. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. Timestamp after which no new runs can be + scheduled. If specified, The schedule will be completed when + either end_time is reached or when scheduled_run_count >= + max_run_count. If not specified, new runs will keep getting + scheduled until this Schedule is paused or deleted. Already + scheduled runs will be allowed to complete. Unset if not + specified. + max_run_count (int): + Optional. Maximum run count of the schedule. If specified, + The schedule will be completed when either started_run_count + >= max_run_count or when end_time is reached. If not + specified, new runs will keep getting scheduled until this + Schedule is paused or deleted. Already scheduled runs will + be allowed to complete. Unset if not specified. + started_run_count (int): + Output only. The number of runs started by + this schedule. + state (google.cloud.aiplatform_v1.types.Schedule.State): + Output only. The state of this Schedule. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Schedule was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Schedule was + updated. + next_run_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Schedule should schedule + the next run. Having a next_run_time in the past means the + runs are being started behind schedule. + last_pause_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Schedule was + last paused. Unset if never paused. + last_resume_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Schedule was + last resumed. Unset if never resumed from pause. + max_concurrent_run_count (int): + Required. Maximum number of runs that can be + started concurrently for this Schedule. This is + the limit for starting the scheduled requests + and not the execution of the operations/jobs + created by the requests (if applicable). + max_concurrent_active_run_count (int): + Optional. Specifies the maximum number of + active runs that can be executed concurrently + for this Schedule. This limits the number of + runs that can be in a non-terminal state at the + same time. + Currently, this field is only supported for + requests of type CreatePipelineJobRequest. + allow_queueing (bool): + Optional. Whether new scheduled runs can be queued when + max_concurrent_runs limit is reached. If set to true, new + runs will be queued instead of skipped. Default to false. + catch_up (bool): + Output only. Whether to backfill missed runs + when the schedule is resumed from PAUSED state. + If set to true, all missed runs will be + scheduled. New runs will be scheduled after the + backfill is complete. Default to false. + last_scheduled_run_response (google.cloud.aiplatform_v1.types.Schedule.RunResponse): + Output only. Response of the last scheduled + run. This is the response for starting the + scheduled requests and not the execution of the + operations/jobs created by the requests (if + applicable). Unset if no run has been scheduled + yet. + """ + + class State(proto.Enum): + r"""Possible state of the schedule. + + Values: + STATE_UNSPECIFIED (0): + Unspecified. + ACTIVE (1): + The Schedule is active. Runs are being + scheduled on the user-specified timespec. + PAUSED (2): + The schedule is paused. No new runs will be + created until the schedule is resumed. Already + started runs will be allowed to complete. + COMPLETED (3): + The Schedule is completed. No new runs will + be scheduled. Already started runs will be + allowed to complete. Schedules in completed + state cannot be paused or resumed. + """ + + STATE_UNSPECIFIED = 0 + ACTIVE = 1 + PAUSED = 2 + COMPLETED = 3 + + class RunResponse(proto.Message): + r"""Status of a scheduled run. + + Attributes: + scheduled_run_time (google.protobuf.timestamp_pb2.Timestamp): + The scheduled run time based on the + user-specified schedule. + run_response (str): + The response of the scheduled run. + """ + + scheduled_run_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + run_response: str = proto.Field( + proto.STRING, + number=2, + ) + + cron: str = proto.Field( + proto.STRING, + number=10, + oneof="time_specification", + ) + create_pipeline_job_request: pipeline_service.CreatePipelineJobRequest = ( + proto.Field( + proto.MESSAGE, + number=14, + oneof="request", + message=pipeline_service.CreatePipelineJobRequest, + ) + ) + create_notebook_execution_job_request: ( + notebook_service.CreateNotebookExecutionJobRequest + ) = proto.Field( + proto.MESSAGE, + number=20, + oneof="request", + message=notebook_service.CreateNotebookExecutionJobRequest, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + max_run_count: int = proto.Field( + proto.INT64, + number=16, + ) + started_run_count: int = proto.Field( + proto.INT64, + number=17, + ) + state: State = proto.Field( + proto.ENUM, + number=5, + enum=State, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=19, + message=timestamp_pb2.Timestamp, + ) + next_run_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + last_pause_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + last_resume_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=9, + message=timestamp_pb2.Timestamp, + ) + max_concurrent_run_count: int = proto.Field( + proto.INT64, + number=11, + ) + max_concurrent_active_run_count: int = proto.Field( + proto.INT64, + number=21, + ) + allow_queueing: bool = proto.Field( + proto.BOOL, + number=12, + ) + catch_up: bool = proto.Field( + proto.BOOL, + number=13, + ) + last_scheduled_run_response: RunResponse = proto.Field( + proto.MESSAGE, + number=18, + message=RunResponse, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule_service.py new file mode 100644 index 0000000000000000000000000000000000000000..87888576ebf45f29196bd09a06072f57afe3ca04 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/schedule_service.py @@ -0,0 +1,296 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import schedule as gca_schedule +import google.protobuf.field_mask_pb2 as field_mask_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateScheduleRequest", + "GetScheduleRequest", + "ListSchedulesRequest", + "ListSchedulesResponse", + "DeleteScheduleRequest", + "PauseScheduleRequest", + "ResumeScheduleRequest", + "UpdateScheduleRequest", + }, +) + + +class CreateScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.CreateSchedule][google.cloud.aiplatform.v1.ScheduleService.CreateSchedule]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + Schedule in. Format: + ``projects/{project}/locations/{location}`` + schedule (google.cloud.aiplatform_v1.types.Schedule): + Required. The Schedule to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + schedule: gca_schedule.Schedule = proto.Field( + proto.MESSAGE, + number=2, + message=gca_schedule.Schedule, + ) + + +class GetScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.GetSchedule][google.cloud.aiplatform.v1.ScheduleService.GetSchedule]. + + Attributes: + name (str): + Required. The name of the Schedule resource. Format: + ``projects/{project}/locations/{location}/schedules/{schedule}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListSchedulesRequest(proto.Message): + r"""Request message for + [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + Schedules from. Format: + ``projects/{project}/locations/{location}`` + filter (str): + Lists the Schedules that match the filter expression. The + following fields are supported: + + - ``display_name``: Supports ``=``, ``!=`` comparisons, and + ``:`` wildcard. + - ``state``: Supports ``=`` and ``!=`` comparisons. + - ``request``: Supports existence of the + check. (e.g. ``create_pipeline_job_request:*`` --> + Schedule has create_pipeline_job_request). + - ``create_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``start_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + - ``end_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, ``>=`` comparisons and ``:*`` existence check. + Values must be in RFC 3339 format. + - ``next_run_time``: Supports ``=``, ``!=``, ``<``, ``>``, + ``<=``, and ``>=`` comparisons. Values must be in RFC 3339 + format. + + Filter expressions can be combined together using logical + operators (``NOT``, ``AND`` & ``OR``). The syntax to define + filter expression is based on https://google.aip.dev/160. + + Examples: + + - ``state="ACTIVE" AND display_name:"my_schedule_*"`` + - ``NOT display_name="my_schedule"`` + - ``create_time>"2021-05-18T00:00:00Z"`` + - ``end_time>"2021-05-18T00:00:00Z" OR NOT end_time:*`` + - ``create_pipeline_job_request:*`` + page_size (int): + The standard list page size. + Default to 100 if not specified. + page_token (str): + The standard list page token. Typically obtained via + [ListSchedulesResponse.next_page_token][google.cloud.aiplatform.v1.ListSchedulesResponse.next_page_token] + of the previous + [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules] + call. + order_by (str): + A comma-separated list of fields to order by. The default + sort order is in ascending order. Use "desc" after a field + name for descending. You can have multiple order_by fields + provided. + + For example, using "create_time desc, end_time" will order + results by create time in descending order, and if there are + multiple schedules having the same create time, order them + by the end time in ascending order. + + If order_by is not specified, it will order by default with + create_time in descending order. + + Supported fields: + + - ``create_time`` + - ``start_time`` + - ``end_time`` + - ``next_run_time`` + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + page_token: str = proto.Field( + proto.STRING, + number=4, + ) + order_by: str = proto.Field( + proto.STRING, + number=5, + ) + + +class ListSchedulesResponse(proto.Message): + r"""Response message for + [ScheduleService.ListSchedules][google.cloud.aiplatform.v1.ScheduleService.ListSchedules] + + Attributes: + schedules (MutableSequence[google.cloud.aiplatform_v1.types.Schedule]): + List of Schedules in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListSchedulesRequest.page_token][google.cloud.aiplatform.v1.ListSchedulesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + schedules: MutableSequence[gca_schedule.Schedule] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_schedule.Schedule, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.DeleteSchedule][google.cloud.aiplatform.v1.ScheduleService.DeleteSchedule]. + + Attributes: + name (str): + Required. The name of the Schedule resource to be deleted. + Format: + ``projects/{project}/locations/{location}/schedules/{schedule}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class PauseScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.PauseSchedule][google.cloud.aiplatform.v1.ScheduleService.PauseSchedule]. + + Attributes: + name (str): + Required. The name of the Schedule resource to be paused. + Format: + ``projects/{project}/locations/{location}/schedules/{schedule}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ResumeScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.ResumeSchedule][google.cloud.aiplatform.v1.ScheduleService.ResumeSchedule]. + + Attributes: + name (str): + Required. The name of the Schedule resource to be resumed. + Format: + ``projects/{project}/locations/{location}/schedules/{schedule}`` + catch_up (bool): + Optional. Whether to backfill missed runs when the schedule + is resumed from PAUSED state. If set to true, all missed + runs will be scheduled. New runs will be scheduled after the + backfill is complete. This will also update + [Schedule.catch_up][google.cloud.aiplatform.v1.Schedule.catch_up] + field. Default to false. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + catch_up: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class UpdateScheduleRequest(proto.Message): + r"""Request message for + [ScheduleService.UpdateSchedule][google.cloud.aiplatform.v1.ScheduleService.UpdateSchedule]. + + Attributes: + schedule (google.cloud.aiplatform_v1.types.Schedule): + Required. The Schedule which replaces the resource on the + server. The following restrictions will be applied: + + - The scheduled request type cannot be changed. + - The non-empty fields cannot be unset. + - The output_only fields will be ignored if specified. + update_mask (google.protobuf.field_mask_pb2.FieldMask): + Required. The update mask applies to the resource. See + [google.protobuf.FieldMask][google.protobuf.FieldMask]. + """ + + schedule: gca_schedule.Schedule = proto.Field( + proto.MESSAGE, + number=1, + message=gca_schedule.Schedule, + ) + update_mask: field_mask_pb2.FieldMask = proto.Field( + proto.MESSAGE, + number=2, + message=field_mask_pb2.FieldMask, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/session.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/session.py new file mode 100644 index 0000000000000000000000000000000000000000..5b9655b1a914b763744506a1cdfaafea71419bc0 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/session.py @@ -0,0 +1,384 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content as gca_content +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Session", + "SessionEvent", + "EventMetadata", + "EventActions", + "Transcription", + }, +) + + +class Session(proto.Message): + r"""A session contains a set of actions between users and Vertex + agents. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + expire_time (google.protobuf.timestamp_pb2.Timestamp): + Optional. Timestamp of when this session is considered + expired. This is *always* provided on output, regardless of + what was sent on input. The minimum value is 24 hours from + the time of creation. + + This field is a member of `oneof`_ ``expiration``. + ttl (google.protobuf.duration_pb2.Duration): + Optional. Input only. The TTL for this + session. The minimum value is 24 hours. + + This field is a member of `oneof`_ ``expiration``. + name (str): + Identifier. The resource name of the session. Format: + 'projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}'. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when the session was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when the session was + updated. + display_name (str): + Optional. The display name of the session. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Sessions. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. + + See https://goo.gl/xmQnxf for more information + and examples of labels. + session_state (google.protobuf.struct_pb2.Struct): + Optional. Session specific memory which + stores key conversation points. + user_id (str): + Required. Immutable. String id provided by + the user + """ + + expire_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=13, + oneof="expiration", + message=timestamp_pb2.Timestamp, + ) + ttl: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=14, + oneof="expiration", + message=duration_pb2.Duration, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + display_name: str = proto.Field( + proto.STRING, + number=5, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=8, + ) + session_state: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=10, + message=struct_pb2.Struct, + ) + user_id: str = proto.Field( + proto.STRING, + number=12, + ) + + +class SessionEvent(proto.Message): + r"""An event represents a message from either the user or agent. + + Attributes: + name (str): + Identifier. The resource name of the event. + Format:``projects/{project}/locations/{location}/reasoningEngines/{reasoning_engine}/sessions/{session}/events/{event}``. + author (str): + Required. The name of the agent that sent the + event, or user. + content (google.cloud.aiplatform_v1.types.Content): + Optional. Content of the event provided by + the author. + invocation_id (str): + Required. The invocation id of the event, + multiple events can have the same invocation id. + actions (google.cloud.aiplatform_v1.types.EventActions): + Optional. Actions executed by the agent. + timestamp (google.protobuf.timestamp_pb2.Timestamp): + Required. Timestamp when the event was + created on client side. + error_code (str): + Optional. Error code if the response is an + error. Code varies by model. + error_message (str): + Optional. Error message if the response is an + error. + event_metadata (google.cloud.aiplatform_v1.types.EventMetadata): + Optional. Metadata relating to this event. + raw_event (google.protobuf.struct_pb2.Struct): + Optional. Weakly typed raw event data in + proto struct format. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + author: str = proto.Field( + proto.STRING, + number=3, + ) + content: gca_content.Content = proto.Field( + proto.MESSAGE, + number=4, + message=gca_content.Content, + ) + invocation_id: str = proto.Field( + proto.STRING, + number=5, + ) + actions: "EventActions" = proto.Field( + proto.MESSAGE, + number=6, + message="EventActions", + ) + timestamp: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + error_code: str = proto.Field( + proto.STRING, + number=9, + ) + error_message: str = proto.Field( + proto.STRING, + number=10, + ) + event_metadata: "EventMetadata" = proto.Field( + proto.MESSAGE, + number=11, + message="EventMetadata", + ) + raw_event: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=12, + message=struct_pb2.Struct, + ) + + +class EventMetadata(proto.Message): + r"""Metadata relating to a LLM response event. + + Attributes: + grounding_metadata (google.cloud.aiplatform_v1.types.GroundingMetadata): + Optional. Metadata returned to client when + grounding is enabled. + partial (bool): + Optional. Indicates whether the text content + is part of a unfinished text stream. Only used + for streaming mode and when the content is plain + text. + turn_complete (bool): + Optional. Indicates whether the response from + the model is complete. Only used for streaming + mode. + interrupted (bool): + Optional. Flag indicating that LLM was + interrupted when generating the content. Usually + it's due to user interruption during a bidi + streaming. + long_running_tool_ids (MutableSequence[str]): + Optional. Set of ids of the long running + function calls. Agent client will know from this + field about which function call is long running. + Only valid for function call event. + branch (str): + Optional. The branch of the event. The format is like + agent_1.agent_2.agent_3, where agent_1 is the parent of + agent_2, and agent_2 is the parent of agent_3. Branch is + used when multiple child agents shouldn't see their + siblings' conversation history. + custom_metadata (google.protobuf.struct_pb2.Struct): + The custom metadata of the LlmResponse. + input_transcription (google.cloud.aiplatform_v1.types.Transcription): + Optional. Audio transcription of user input. + output_transcription (google.cloud.aiplatform_v1.types.Transcription): + Optional. Audio transcription of model + output. + """ + + grounding_metadata: gca_content.GroundingMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=gca_content.GroundingMetadata, + ) + partial: bool = proto.Field( + proto.BOOL, + number=2, + ) + turn_complete: bool = proto.Field( + proto.BOOL, + number=3, + ) + interrupted: bool = proto.Field( + proto.BOOL, + number=4, + ) + long_running_tool_ids: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + branch: str = proto.Field( + proto.STRING, + number=6, + ) + custom_metadata: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=7, + message=struct_pb2.Struct, + ) + input_transcription: "Transcription" = proto.Field( + proto.MESSAGE, + number=10, + message="Transcription", + ) + output_transcription: "Transcription" = proto.Field( + proto.MESSAGE, + number=11, + message="Transcription", + ) + + +class EventActions(proto.Message): + r"""Actions are parts of events that are executed by the agent. + + Attributes: + skip_summarization (bool): + Optional. If true, it won't call model to summarize function + response. Only used for function_response event. + state_delta (google.protobuf.struct_pb2.Struct): + Optional. Indicates that the event is + updating the state with the given delta. + artifact_delta (MutableMapping[str, int]): + Optional. Indicates that the event is + updating an artifact. key is the filename, value + is the version. + escalate (bool): + Optional. The agent is escalating to a higher + level agent. + requested_auth_configs (google.protobuf.struct_pb2.Struct): + Optional. Will only be set by a tool response + indicating tool request euc. Struct key is the + function call id since one function call + response (from model) could correspond to + multiple function calls. Struct value is the + required auth config, which can be another + struct. + transfer_agent (str): + Optional. If set, the event transfers to the + specified agent. + """ + + skip_summarization: bool = proto.Field( + proto.BOOL, + number=1, + ) + state_delta: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Struct, + ) + artifact_delta: MutableMapping[str, int] = proto.MapField( + proto.STRING, + proto.INT32, + number=3, + ) + escalate: bool = proto.Field( + proto.BOOL, + number=6, + ) + requested_auth_configs: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=7, + message=struct_pb2.Struct, + ) + transfer_agent: str = proto.Field( + proto.STRING, + number=8, + ) + + +class Transcription(proto.Message): + r"""Audio transcription in Server Content. + + Attributes: + text (str): + Optional. Transcription text. + finished (bool): + Optional. The bool indicates the end of the + transcription. + """ + + text: str = proto.Field( + proto.STRING, + number=1, + ) + finished: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/specialist_pool.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/specialist_pool.py new file mode 100644 index 0000000000000000000000000000000000000000..3bc9697c90ba3cecdfe0c666fe2d756e062a01a8 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/specialist_pool.py @@ -0,0 +1,90 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "SpecialistPool", + }, +) + + +class SpecialistPool(proto.Message): + r"""SpecialistPool represents customers' own workforce to work on + their data labeling jobs. It includes a group of specialist + managers and workers. Managers are responsible for managing the + workers in this pool as well as customers' data labeling jobs + associated with this pool. Customers create specialist pool as + well as start data labeling jobs on Cloud, managers and workers + handle the jobs using CrowdCompute console. + + Attributes: + name (str): + Required. The resource name of the + SpecialistPool. + display_name (str): + Required. The user-defined name of the + SpecialistPool. The name can be up to 128 + characters long and can consist of any UTF-8 + characters. + This field should be unique on project-level. + specialist_managers_count (int): + Output only. The number of managers in this + SpecialistPool. + specialist_manager_emails (MutableSequence[str]): + The email addresses of the managers in the + SpecialistPool. + pending_data_labeling_jobs (MutableSequence[str]): + Output only. The resource name of the pending + data labeling jobs. + specialist_worker_emails (MutableSequence[str]): + The email addresses of workers in the + SpecialistPool. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + specialist_managers_count: int = proto.Field( + proto.INT32, + number=3, + ) + specialist_manager_emails: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + pending_data_labeling_jobs: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + specialist_worker_emails: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=7, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/study.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/study.py new file mode 100644 index 0000000000000000000000000000000000000000..02dca81529ce7d9bfee56466c1f76ebb6724f63f --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/study.py @@ -0,0 +1,1274 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.duration_pb2 as duration_pb2 # type: ignore +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore +import google.protobuf.wrappers_pb2 as wrappers_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Study", + "Trial", + "TrialContext", + "StudyTimeConstraint", + "StudySpec", + "Measurement", + }, +) + + +class Study(proto.Message): + r"""A message representing a Study. + + Attributes: + name (str): + Output only. The name of a study. The study's globally + unique identifier. Format: + ``projects/{project}/locations/{location}/studies/{study}`` + display_name (str): + Required. Describes the Study, default value + is empty string. + study_spec (google.cloud.aiplatform_v1.types.StudySpec): + Required. Configuration of the Study. + state (google.cloud.aiplatform_v1.types.Study.State): + Output only. The detailed state of a Study. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time at which the study was + created. + inactive_reason (str): + Output only. A human readable reason why the + Study is inactive. This should be empty if a + study is ACTIVE or COMPLETED. + """ + + class State(proto.Enum): + r"""Describes the Study state. + + Values: + STATE_UNSPECIFIED (0): + The study state is unspecified. + ACTIVE (1): + The study is active. + INACTIVE (2): + The study is stopped due to an internal + error. + COMPLETED (3): + The study is done when the service exhausts the parameter + search space or max_trial_count is reached. + """ + + STATE_UNSPECIFIED = 0 + ACTIVE = 1 + INACTIVE = 2 + COMPLETED = 3 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + study_spec: "StudySpec" = proto.Field( + proto.MESSAGE, + number=3, + message="StudySpec", + ) + state: State = proto.Field( + proto.ENUM, + number=4, + enum=State, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + inactive_reason: str = proto.Field( + proto.STRING, + number=6, + ) + + +class Trial(proto.Message): + r"""A message representing a Trial. A Trial contains a unique set + of Parameters that has been or will be evaluated, along with the + objective metrics got by running the Trial. + + Attributes: + name (str): + Output only. Resource name of the Trial + assigned by the service. + id (str): + Output only. The identifier of the Trial + assigned by the service. + state (google.cloud.aiplatform_v1.types.Trial.State): + Output only. The detailed state of the Trial. + parameters (MutableSequence[google.cloud.aiplatform_v1.types.Trial.Parameter]): + Output only. The parameters of the Trial. + final_measurement (google.cloud.aiplatform_v1.types.Measurement): + Output only. The final measurement containing + the objective value. + measurements (MutableSequence[google.cloud.aiplatform_v1.types.Measurement]): + Output only. A list of measurements that are strictly + lexicographically ordered by their induced tuples (steps, + elapsed_duration). These are used for early stopping + computations. + start_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the Trial was started. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Time when the Trial's status changed to + ``SUCCEEDED`` or ``INFEASIBLE``. + client_id (str): + Output only. The identifier of the client that originally + requested this Trial. Each client is identified by a unique + client_id. When a client asks for a suggestion, Vertex AI + Vizier will assign it a Trial. The client should evaluate + the Trial, complete it, and report back to Vertex AI Vizier. + If suggestion is asked again by same client_id before the + Trial is completed, the same Trial will be returned. + Multiple clients with different client_ids can ask for + suggestions simultaneously, each of them will get their own + Trial. + infeasible_reason (str): + Output only. A human readable string describing why the + Trial is infeasible. This is set only if Trial state is + ``INFEASIBLE``. + custom_job (str): + Output only. The CustomJob name linked to the + Trial. It's set for a HyperparameterTuningJob's + Trial. + web_access_uris (MutableMapping[str, str]): + Output only. URIs for accessing `interactive + shells `__ + (one URI for each training node). Only available if this + trial is part of a + [HyperparameterTuningJob][google.cloud.aiplatform.v1.HyperparameterTuningJob] + and the job's + [trial_job_spec.enable_web_access][google.cloud.aiplatform.v1.CustomJobSpec.enable_web_access] + field is ``true``. + + The keys are names of each node used for the trial; for + example, ``workerpool0-0`` for the primary node, + ``workerpool1-0`` for the first node in the second worker + pool, and ``workerpool1-1`` for the second node in the + second worker pool. + + The values are the URIs for each node's interactive shell. + """ + + class State(proto.Enum): + r"""Describes a Trial state. + + Values: + STATE_UNSPECIFIED (0): + The Trial state is unspecified. + REQUESTED (1): + Indicates that a specific Trial has been + requested, but it has not yet been suggested by + the service. + ACTIVE (2): + Indicates that the Trial has been suggested. + STOPPING (3): + Indicates that the Trial should stop + according to the service. + SUCCEEDED (4): + Indicates that the Trial is completed + successfully. + INFEASIBLE (5): + Indicates that the Trial should not be attempted again. The + service will set a Trial to INFEASIBLE when it's done but + missing the final_measurement. + """ + + STATE_UNSPECIFIED = 0 + REQUESTED = 1 + ACTIVE = 2 + STOPPING = 3 + SUCCEEDED = 4 + INFEASIBLE = 5 + + class Parameter(proto.Message): + r"""A message representing a parameter to be tuned. + + Attributes: + parameter_id (str): + Output only. The ID of the parameter. The parameter should + be defined in [StudySpec's + Parameters][google.cloud.aiplatform.v1.StudySpec.parameters]. + value (google.protobuf.struct_pb2.Value): + Output only. The value of the parameter. ``number_value`` + will be set if a parameter defined in StudySpec is in type + 'INTEGER', 'DOUBLE' or 'DISCRETE'. ``string_value`` will be + set if a parameter defined in StudySpec is in type + 'CATEGORICAL'. + """ + + parameter_id: str = proto.Field( + proto.STRING, + number=1, + ) + value: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Value, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + id: str = proto.Field( + proto.STRING, + number=2, + ) + state: State = proto.Field( + proto.ENUM, + number=3, + enum=State, + ) + parameters: MutableSequence[Parameter] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=Parameter, + ) + final_measurement: "Measurement" = proto.Field( + proto.MESSAGE, + number=5, + message="Measurement", + ) + measurements: MutableSequence["Measurement"] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message="Measurement", + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=8, + message=timestamp_pb2.Timestamp, + ) + client_id: str = proto.Field( + proto.STRING, + number=9, + ) + infeasible_reason: str = proto.Field( + proto.STRING, + number=10, + ) + custom_job: str = proto.Field( + proto.STRING, + number=11, + ) + web_access_uris: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=12, + ) + + +class TrialContext(proto.Message): + r""" + + Attributes: + description (str): + A human-readable field which can store a + description of this context. This will become + part of the resulting Trial's description field. + parameters (MutableSequence[google.cloud.aiplatform_v1.types.Trial.Parameter]): + If/when a Trial is generated or selected from this Context, + its Parameters will match any parameters specified here. + (I.e. if this context specifies parameter name:'a' + int_value:3, then a resulting Trial will have int_value:3 + for its parameter named 'a'.) Note that we first attempt to + match existing REQUESTED Trials with contexts, and if there + are no matches, we generate suggestions in the subspace + defined by the parameters specified here. NOTE: a Context + without any Parameters matches the entire feasible search + space. + """ + + description: str = proto.Field( + proto.STRING, + number=1, + ) + parameters: MutableSequence["Trial.Parameter"] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message="Trial.Parameter", + ) + + +class StudyTimeConstraint(proto.Message): + r"""Time-based Constraint for Study + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + max_duration (google.protobuf.duration_pb2.Duration): + Counts the wallclock time passed since the + creation of this Study. + + This field is a member of `oneof`_ ``constraint``. + end_time (google.protobuf.timestamp_pb2.Timestamp): + Compares the wallclock time to this time. + Must use UTC timezone. + + This field is a member of `oneof`_ ``constraint``. + """ + + max_duration: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + oneof="constraint", + message=duration_pb2.Duration, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + oneof="constraint", + message=timestamp_pb2.Timestamp, + ) + + +class StudySpec(proto.Message): + r"""Represents specification of a Study. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + decay_curve_stopping_spec (google.cloud.aiplatform_v1.types.StudySpec.DecayCurveAutomatedStoppingSpec): + The automated early stopping spec using decay + curve rule. + + This field is a member of `oneof`_ ``automated_stopping_spec``. + median_automated_stopping_spec (google.cloud.aiplatform_v1.types.StudySpec.MedianAutomatedStoppingSpec): + The automated early stopping spec using + median rule. + + This field is a member of `oneof`_ ``automated_stopping_spec``. + convex_automated_stopping_spec (google.cloud.aiplatform_v1.types.StudySpec.ConvexAutomatedStoppingSpec): + The automated early stopping spec using + convex stopping rule. + + This field is a member of `oneof`_ ``automated_stopping_spec``. + metrics (MutableSequence[google.cloud.aiplatform_v1.types.StudySpec.MetricSpec]): + Required. Metric specs for the Study. + parameters (MutableSequence[google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec]): + Required. The set of parameters to tune. + algorithm (google.cloud.aiplatform_v1.types.StudySpec.Algorithm): + The search algorithm specified for the Study. + observation_noise (google.cloud.aiplatform_v1.types.StudySpec.ObservationNoise): + The observation noise level of the study. + Currently only supported by the Vertex AI Vizier + service. Not supported by + HyperparameterTuningJob or TrainingPipeline. + measurement_selection_type (google.cloud.aiplatform_v1.types.StudySpec.MeasurementSelectionType): + Describe which measurement selection type + will be used + study_stopping_config (google.cloud.aiplatform_v1.types.StudySpec.StudyStoppingConfig): + Conditions for automated stopping of a Study. + Enable automated stopping by configuring at + least one condition. + + This field is a member of `oneof`_ ``_study_stopping_config``. + """ + + class Algorithm(proto.Enum): + r"""The available search algorithms for the Study. + + Values: + ALGORITHM_UNSPECIFIED (0): + The default algorithm used by Vertex AI for `hyperparameter + tuning `__ + and `Vertex AI + Vizier `__. + GRID_SEARCH (2): + Simple grid search within the feasible space. To use grid + search, all parameters must be ``INTEGER``, ``CATEGORICAL``, + or ``DISCRETE``. + RANDOM_SEARCH (3): + Simple random search within the feasible + space. + """ + + ALGORITHM_UNSPECIFIED = 0 + GRID_SEARCH = 2 + RANDOM_SEARCH = 3 + + class ObservationNoise(proto.Enum): + r"""Describes the noise level of the repeated observations. + + "Noisy" means that the repeated observations with the same Trial + parameters may lead to different metric evaluations. + + Values: + OBSERVATION_NOISE_UNSPECIFIED (0): + The default noise level chosen by Vertex AI. + LOW (1): + Vertex AI assumes that the objective function + is (nearly) perfectly reproducible, and will + never repeat the same Trial parameters. + HIGH (2): + Vertex AI will estimate the amount of noise + in metric evaluations, it may repeat the same + Trial parameters more than once. + """ + + OBSERVATION_NOISE_UNSPECIFIED = 0 + LOW = 1 + HIGH = 2 + + class MeasurementSelectionType(proto.Enum): + r"""This indicates which measurement to use if/when the service + automatically selects the final measurement from previously reported + intermediate measurements. Choose this based on two considerations: + A) Do you expect your measurements to monotonically improve? If so, + choose LAST_MEASUREMENT. On the other hand, if you're in a situation + where your system can "over-train" and you expect the performance to + get better for a while but then start declining, choose + BEST_MEASUREMENT. B) Are your measurements significantly noisy + and/or irreproducible? If so, BEST_MEASUREMENT will tend to be + over-optimistic, and it may be better to choose LAST_MEASUREMENT. If + both or neither of (A) and (B) apply, it doesn't matter which + selection type is chosen. + + Values: + MEASUREMENT_SELECTION_TYPE_UNSPECIFIED (0): + Will be treated as LAST_MEASUREMENT. + LAST_MEASUREMENT (1): + Use the last measurement reported. + BEST_MEASUREMENT (2): + Use the best measurement reported. + """ + + MEASUREMENT_SELECTION_TYPE_UNSPECIFIED = 0 + LAST_MEASUREMENT = 1 + BEST_MEASUREMENT = 2 + + class MetricSpec(proto.Message): + r"""Represents a metric to optimize. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + metric_id (str): + Required. The ID of the metric. Must not + contain whitespaces and must be unique amongst + all MetricSpecs. + goal (google.cloud.aiplatform_v1.types.StudySpec.MetricSpec.GoalType): + Required. The optimization goal of the + metric. + safety_config (google.cloud.aiplatform_v1.types.StudySpec.MetricSpec.SafetyMetricConfig): + Used for safe search. In the case, the metric + will be a safety metric. You must provide a + separate metric for objective metric. + + This field is a member of `oneof`_ ``_safety_config``. + """ + + class GoalType(proto.Enum): + r"""The available types of optimization goals. + + Values: + GOAL_TYPE_UNSPECIFIED (0): + Goal Type will default to maximize. + MAXIMIZE (1): + Maximize the goal metric. + MINIMIZE (2): + Minimize the goal metric. + """ + + GOAL_TYPE_UNSPECIFIED = 0 + MAXIMIZE = 1 + MINIMIZE = 2 + + class SafetyMetricConfig(proto.Message): + r"""Used in safe optimization to specify threshold levels and + risk tolerance. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + safety_threshold (float): + Safety threshold (boundary value between safe + and unsafe). NOTE that if you leave + SafetyMetricConfig unset, a default value of 0 + will be used. + desired_min_safe_trials_fraction (float): + Desired minimum fraction of safe trials (over + total number of trials) that should be targeted + by the algorithm at any time during the study + (best effort). This should be between 0.0 and + 1.0 and a value of 0.0 means that there is no + minimum and an algorithm proceeds without + targeting any specific fraction. A value of 1.0 + means that the algorithm attempts to only + Suggest safe Trials. + + This field is a member of `oneof`_ ``_desired_min_safe_trials_fraction``. + """ + + safety_threshold: float = proto.Field( + proto.DOUBLE, + number=1, + ) + desired_min_safe_trials_fraction: float = proto.Field( + proto.DOUBLE, + number=2, + optional=True, + ) + + metric_id: str = proto.Field( + proto.STRING, + number=1, + ) + goal: "StudySpec.MetricSpec.GoalType" = proto.Field( + proto.ENUM, + number=2, + enum="StudySpec.MetricSpec.GoalType", + ) + safety_config: "StudySpec.MetricSpec.SafetyMetricConfig" = proto.Field( + proto.MESSAGE, + number=3, + optional=True, + message="StudySpec.MetricSpec.SafetyMetricConfig", + ) + + class ParameterSpec(proto.Message): + r"""Represents a single parameter to optimize. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + double_value_spec (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.DoubleValueSpec): + The value spec for a 'DOUBLE' parameter. + + This field is a member of `oneof`_ ``parameter_value_spec``. + integer_value_spec (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.IntegerValueSpec): + The value spec for an 'INTEGER' parameter. + + This field is a member of `oneof`_ ``parameter_value_spec``. + categorical_value_spec (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.CategoricalValueSpec): + The value spec for a 'CATEGORICAL' parameter. + + This field is a member of `oneof`_ ``parameter_value_spec``. + discrete_value_spec (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.DiscreteValueSpec): + The value spec for a 'DISCRETE' parameter. + + This field is a member of `oneof`_ ``parameter_value_spec``. + parameter_id (str): + Required. The ID of the parameter. Must not + contain whitespaces and must be unique amongst + all ParameterSpecs. + scale_type (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.ScaleType): + How the parameter should be scaled. Leave unset for + ``CATEGORICAL`` parameters. + conditional_parameter_specs (MutableSequence[google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.ConditionalParameterSpec]): + A conditional parameter node is active if the parameter's + value matches the conditional node's parent_value_condition. + + If two items in conditional_parameter_specs have the same + name, they must have disjoint parent_value_condition. + """ + + class ScaleType(proto.Enum): + r"""The type of scaling that should be applied to this parameter. + + Values: + SCALE_TYPE_UNSPECIFIED (0): + By default, no scaling is applied. + UNIT_LINEAR_SCALE (1): + Scales the feasible space to (0, 1) linearly. + UNIT_LOG_SCALE (2): + Scales the feasible space logarithmically to + (0, 1). The entire feasible space must be + strictly positive. + UNIT_REVERSE_LOG_SCALE (3): + Scales the feasible space "reverse" + logarithmically to (0, 1). The result is that + values close to the top of the feasible space + are spread out more than points near the bottom. + The entire feasible space must be strictly + positive. + """ + + SCALE_TYPE_UNSPECIFIED = 0 + UNIT_LINEAR_SCALE = 1 + UNIT_LOG_SCALE = 2 + UNIT_REVERSE_LOG_SCALE = 3 + + class DoubleValueSpec(proto.Message): + r"""Value specification for a parameter in ``DOUBLE`` type. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + min_value (float): + Required. Inclusive minimum value of the + parameter. + max_value (float): + Required. Inclusive maximum value of the + parameter. + default_value (float): + A default value for a ``DOUBLE`` parameter that is assumed + to be a relatively good starting point. Unset value signals + that there is no offered starting point. + + Currently only supported by the Vertex AI Vizier service. + Not supported by HyperparameterTuningJob or + TrainingPipeline. + + This field is a member of `oneof`_ ``_default_value``. + """ + + min_value: float = proto.Field( + proto.DOUBLE, + number=1, + ) + max_value: float = proto.Field( + proto.DOUBLE, + number=2, + ) + default_value: float = proto.Field( + proto.DOUBLE, + number=4, + optional=True, + ) + + class IntegerValueSpec(proto.Message): + r"""Value specification for a parameter in ``INTEGER`` type. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + min_value (int): + Required. Inclusive minimum value of the + parameter. + max_value (int): + Required. Inclusive maximum value of the + parameter. + default_value (int): + A default value for an ``INTEGER`` parameter that is assumed + to be a relatively good starting point. Unset value signals + that there is no offered starting point. + + Currently only supported by the Vertex AI Vizier service. + Not supported by HyperparameterTuningJob or + TrainingPipeline. + + This field is a member of `oneof`_ ``_default_value``. + """ + + min_value: int = proto.Field( + proto.INT64, + number=1, + ) + max_value: int = proto.Field( + proto.INT64, + number=2, + ) + default_value: int = proto.Field( + proto.INT64, + number=4, + optional=True, + ) + + class CategoricalValueSpec(proto.Message): + r"""Value specification for a parameter in ``CATEGORICAL`` type. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + values (MutableSequence[str]): + Required. The list of possible categories. + default_value (str): + A default value for a ``CATEGORICAL`` parameter that is + assumed to be a relatively good starting point. Unset value + signals that there is no offered starting point. + + Currently only supported by the Vertex AI Vizier service. + Not supported by HyperparameterTuningJob or + TrainingPipeline. + + This field is a member of `oneof`_ ``_default_value``. + """ + + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + default_value: str = proto.Field( + proto.STRING, + number=3, + optional=True, + ) + + class DiscreteValueSpec(proto.Message): + r"""Value specification for a parameter in ``DISCRETE`` type. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + values (MutableSequence[float]): + Required. A list of possible values. + The list should be in increasing order and at + least 1e-10 apart. For instance, this parameter + might have possible settings of 1.5, 2.5, and + 4.0. This list should not contain more than + 1,000 values. + default_value (float): + A default value for a ``DISCRETE`` parameter that is assumed + to be a relatively good starting point. Unset value signals + that there is no offered starting point. It automatically + rounds to the nearest feasible discrete point. + + Currently only supported by the Vertex AI Vizier service. + Not supported by HyperparameterTuningJob or + TrainingPipeline. + + This field is a member of `oneof`_ ``_default_value``. + """ + + values: MutableSequence[float] = proto.RepeatedField( + proto.DOUBLE, + number=1, + ) + default_value: float = proto.Field( + proto.DOUBLE, + number=3, + optional=True, + ) + + class ConditionalParameterSpec(proto.Message): + r"""Represents a parameter spec with condition from its parent + parameter. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + parent_discrete_values (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition): + The spec for matching values from a parent parameter of + ``DISCRETE`` type. + + This field is a member of `oneof`_ ``parent_value_condition``. + parent_int_values (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition): + The spec for matching values from a parent parameter of + ``INTEGER`` type. + + This field is a member of `oneof`_ ``parent_value_condition``. + parent_categorical_values (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition): + The spec for matching values from a parent parameter of + ``CATEGORICAL`` type. + + This field is a member of `oneof`_ ``parent_value_condition``. + parameter_spec (google.cloud.aiplatform_v1.types.StudySpec.ParameterSpec): + Required. The spec for a conditional + parameter. + """ + + class DiscreteValueCondition(proto.Message): + r"""Represents the spec to match discrete values from parent + parameter. + + Attributes: + values (MutableSequence[float]): + Required. Matches values of the parent parameter of + 'DISCRETE' type. All values must exist in + ``discrete_value_spec`` of parent parameter. + + The Epsilon of the value matching is 1e-10. + """ + + values: MutableSequence[float] = proto.RepeatedField( + proto.DOUBLE, + number=1, + ) + + class IntValueCondition(proto.Message): + r"""Represents the spec to match integer values from parent + parameter. + + Attributes: + values (MutableSequence[int]): + Required. Matches values of the parent parameter of + 'INTEGER' type. All values must lie in + ``integer_value_spec`` of parent parameter. + """ + + values: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=1, + ) + + class CategoricalValueCondition(proto.Message): + r"""Represents the spec to match categorical values from parent + parameter. + + Attributes: + values (MutableSequence[str]): + Required. Matches values of the parent parameter of + 'CATEGORICAL' type. All values must exist in + ``categorical_value_spec`` of parent parameter. + """ + + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + parent_discrete_values: "StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition" = proto.Field( + proto.MESSAGE, + number=2, + oneof="parent_value_condition", + message="StudySpec.ParameterSpec.ConditionalParameterSpec.DiscreteValueCondition", + ) + parent_int_values: ( + "StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition" + ) = proto.Field( + proto.MESSAGE, + number=3, + oneof="parent_value_condition", + message="StudySpec.ParameterSpec.ConditionalParameterSpec.IntValueCondition", + ) + parent_categorical_values: "StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition" = proto.Field( + proto.MESSAGE, + number=4, + oneof="parent_value_condition", + message="StudySpec.ParameterSpec.ConditionalParameterSpec.CategoricalValueCondition", + ) + parameter_spec: "StudySpec.ParameterSpec" = proto.Field( + proto.MESSAGE, + number=1, + message="StudySpec.ParameterSpec", + ) + + double_value_spec: "StudySpec.ParameterSpec.DoubleValueSpec" = proto.Field( + proto.MESSAGE, + number=2, + oneof="parameter_value_spec", + message="StudySpec.ParameterSpec.DoubleValueSpec", + ) + integer_value_spec: "StudySpec.ParameterSpec.IntegerValueSpec" = proto.Field( + proto.MESSAGE, + number=3, + oneof="parameter_value_spec", + message="StudySpec.ParameterSpec.IntegerValueSpec", + ) + categorical_value_spec: "StudySpec.ParameterSpec.CategoricalValueSpec" = ( + proto.Field( + proto.MESSAGE, + number=4, + oneof="parameter_value_spec", + message="StudySpec.ParameterSpec.CategoricalValueSpec", + ) + ) + discrete_value_spec: "StudySpec.ParameterSpec.DiscreteValueSpec" = proto.Field( + proto.MESSAGE, + number=5, + oneof="parameter_value_spec", + message="StudySpec.ParameterSpec.DiscreteValueSpec", + ) + parameter_id: str = proto.Field( + proto.STRING, + number=1, + ) + scale_type: "StudySpec.ParameterSpec.ScaleType" = proto.Field( + proto.ENUM, + number=6, + enum="StudySpec.ParameterSpec.ScaleType", + ) + conditional_parameter_specs: MutableSequence[ + "StudySpec.ParameterSpec.ConditionalParameterSpec" + ] = proto.RepeatedField( + proto.MESSAGE, + number=10, + message="StudySpec.ParameterSpec.ConditionalParameterSpec", + ) + + class DecayCurveAutomatedStoppingSpec(proto.Message): + r"""The decay curve automated stopping rule builds a Gaussian + Process Regressor to predict the final objective value of a + Trial based on the already completed Trials and the intermediate + measurements of the current Trial. Early stopping is requested + for the current Trial if there is very low probability to exceed + the optimal value found so far. + + Attributes: + use_elapsed_duration (bool): + True if + [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration] + is used as the x-axis of each Trials Decay Curve. Otherwise, + [Measurement.step_count][google.cloud.aiplatform.v1.Measurement.step_count] + will be used as the x-axis. + """ + + use_elapsed_duration: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class MedianAutomatedStoppingSpec(proto.Message): + r"""The median automated stopping rule stops a pending Trial if the + Trial's best objective_value is strictly below the median + 'performance' of all completed Trials reported up to the Trial's + last measurement. Currently, 'performance' refers to the running + average of the objective values reported by the Trial in each + measurement. + + Attributes: + use_elapsed_duration (bool): + True if median automated stopping rule applies on + [Measurement.elapsed_duration][google.cloud.aiplatform.v1.Measurement.elapsed_duration]. + It means that elapsed_duration field of latest measurement + of current Trial is used to compute median objective value + for each completed Trials. + """ + + use_elapsed_duration: bool = proto.Field( + proto.BOOL, + number=1, + ) + + class ConvexAutomatedStoppingSpec(proto.Message): + r"""Configuration for ConvexAutomatedStoppingSpec. When there are enough + completed trials (configured by min_measurement_count), for pending + trials with enough measurements and steps, the policy first computes + an overestimate of the objective value at max_num_steps according to + the slope of the incomplete objective value curve. No prediction can + be made if the curve is completely flat. If the overestimation is + worse than the best objective value of the completed trials, this + pending trial will be early-stopped, but a last measurement will be + added to the pending trial with max_num_steps and predicted + objective value from the autoregression model. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + max_step_count (int): + Steps used in predicting the final objective for early + stopped trials. In general, it's set to be the same as the + defined steps in training / tuning. If not defined, it will + learn it from the completed trials. When use_steps is false, + this field is set to the maximum elapsed seconds. + min_step_count (int): + Minimum number of steps for a trial to complete. Trials + which do not have a measurement with step_count > + min_step_count won't be considered for early stopping. It's + ok to set it to 0, and a trial can be early stopped at any + stage. By default, min_step_count is set to be one-tenth of + the max_step_count. When use_elapsed_duration is true, this + field is set to the minimum elapsed seconds. + min_measurement_count (int): + The minimal number of measurements in a Trial. + Early-stopping checks will not trigger if less than + min_measurement_count+1 completed trials or pending trials + with less than min_measurement_count measurements. If not + defined, the default value is 5. + learning_rate_parameter_name (str): + The hyper-parameter name used in the tuning job that stands + for learning rate. Leave it blank if learning rate is not in + a parameter in tuning. The learning_rate is used to estimate + the objective value of the ongoing trial. + use_elapsed_duration (bool): + This bool determines whether or not the rule is applied + based on elapsed_secs or steps. If + use_elapsed_duration==false, the early stopping decision is + made according to the predicted objective values according + to the target steps. If use_elapsed_duration==true, + elapsed_secs is used instead of steps. Also, in this case, + the parameters max_num_steps and min_num_steps are + overloaded to contain max_elapsed_seconds and + min_elapsed_seconds. + update_all_stopped_trials (bool): + ConvexAutomatedStoppingSpec by default only updates the + trials that needs to be early stopped using a newly trained + auto-regressive model. When this flag is set to True, all + stopped trials from the beginning are potentially updated in + terms of their ``final_measurement``. Also, note that the + training logic of autoregressive models is different in this + case. Enabling this option has shown better results and this + may be the default option in the future. + + This field is a member of `oneof`_ ``_update_all_stopped_trials``. + """ + + max_step_count: int = proto.Field( + proto.INT64, + number=1, + ) + min_step_count: int = proto.Field( + proto.INT64, + number=2, + ) + min_measurement_count: int = proto.Field( + proto.INT64, + number=3, + ) + learning_rate_parameter_name: str = proto.Field( + proto.STRING, + number=4, + ) + use_elapsed_duration: bool = proto.Field( + proto.BOOL, + number=5, + ) + update_all_stopped_trials: bool = proto.Field( + proto.BOOL, + number=6, + optional=True, + ) + + class StudyStoppingConfig(proto.Message): + r"""The configuration (stopping conditions) for automated + stopping of a Study. Conditions include trial budgets, time + budgets, and convergence detection. + + Attributes: + should_stop_asap (google.protobuf.wrappers_pb2.BoolValue): + If true, a Study enters STOPPING_ASAP whenever it would + normally enters STOPPING state. + + The bottom line is: set to true if you want to interrupt + on-going evaluations of Trials as soon as the study stopping + condition is met. (Please see Study.State documentation for + the source of truth). + minimum_runtime_constraint (google.cloud.aiplatform_v1.types.StudyTimeConstraint): + Each "stopping rule" in this proto specifies an "if" + condition. Before Vizier would generate a new suggestion, it + first checks each specified stopping rule, from top to + bottom in this list. Note that the first few rules (e.g. + minimum_runtime_constraint, min_num_trials) will prevent + other stopping rules from being evaluated until they are + met. For example, setting ``min_num_trials=5`` and + ``always_stop_after= 1 hour`` means that the Study will ONLY + stop after it has 5 COMPLETED trials, even if more than an + hour has passed since its creation. It follows the first + applicable rule (whose "if" condition is satisfied) to make + a stopping decision. If none of the specified rules are + applicable, then Vizier decides that the study should not + stop. If Vizier decides that the study should stop, the + study enters STOPPING state (or STOPPING_ASAP if + should_stop_asap = true). IMPORTANT: The automatic study + state transition happens precisely as described above; that + is, deleting trials or updating StudyConfig NEVER + automatically moves the study state back to ACTIVE. If you + want to *resume* a Study that was stopped, 1) change the + stopping conditions if necessary, 2) activate the study, and + then 3) ask for suggestions. If the specified time or + duration has not passed, do not stop the study. + maximum_runtime_constraint (google.cloud.aiplatform_v1.types.StudyTimeConstraint): + If the specified time or duration has passed, + stop the study. + min_num_trials (google.protobuf.wrappers_pb2.Int32Value): + If there are fewer than this many COMPLETED + trials, do not stop the study. + max_num_trials (google.protobuf.wrappers_pb2.Int32Value): + If there are more than this many trials, stop + the study. + max_num_trials_no_progress (google.protobuf.wrappers_pb2.Int32Value): + If the objective value has not improved for + this many consecutive trials, stop the study. + + WARNING: Effective only for single-objective + studies. + max_duration_no_progress (google.protobuf.duration_pb2.Duration): + If the objective value has not improved for + this much time, stop the study. + + WARNING: Effective only for single-objective + studies. + """ + + should_stop_asap: wrappers_pb2.BoolValue = proto.Field( + proto.MESSAGE, + number=1, + message=wrappers_pb2.BoolValue, + ) + minimum_runtime_constraint: "StudyTimeConstraint" = proto.Field( + proto.MESSAGE, + number=2, + message="StudyTimeConstraint", + ) + maximum_runtime_constraint: "StudyTimeConstraint" = proto.Field( + proto.MESSAGE, + number=3, + message="StudyTimeConstraint", + ) + min_num_trials: wrappers_pb2.Int32Value = proto.Field( + proto.MESSAGE, + number=4, + message=wrappers_pb2.Int32Value, + ) + max_num_trials: wrappers_pb2.Int32Value = proto.Field( + proto.MESSAGE, + number=5, + message=wrappers_pb2.Int32Value, + ) + max_num_trials_no_progress: wrappers_pb2.Int32Value = proto.Field( + proto.MESSAGE, + number=6, + message=wrappers_pb2.Int32Value, + ) + max_duration_no_progress: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=7, + message=duration_pb2.Duration, + ) + + decay_curve_stopping_spec: DecayCurveAutomatedStoppingSpec = proto.Field( + proto.MESSAGE, + number=4, + oneof="automated_stopping_spec", + message=DecayCurveAutomatedStoppingSpec, + ) + median_automated_stopping_spec: MedianAutomatedStoppingSpec = proto.Field( + proto.MESSAGE, + number=5, + oneof="automated_stopping_spec", + message=MedianAutomatedStoppingSpec, + ) + convex_automated_stopping_spec: ConvexAutomatedStoppingSpec = proto.Field( + proto.MESSAGE, + number=9, + oneof="automated_stopping_spec", + message=ConvexAutomatedStoppingSpec, + ) + metrics: MutableSequence[MetricSpec] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=MetricSpec, + ) + parameters: MutableSequence[ParameterSpec] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=ParameterSpec, + ) + algorithm: Algorithm = proto.Field( + proto.ENUM, + number=3, + enum=Algorithm, + ) + observation_noise: ObservationNoise = proto.Field( + proto.ENUM, + number=6, + enum=ObservationNoise, + ) + measurement_selection_type: MeasurementSelectionType = proto.Field( + proto.ENUM, + number=7, + enum=MeasurementSelectionType, + ) + study_stopping_config: StudyStoppingConfig = proto.Field( + proto.MESSAGE, + number=11, + optional=True, + message=StudyStoppingConfig, + ) + + +class Measurement(proto.Message): + r"""A message representing a Measurement of a Trial. A + Measurement contains the Metrics got by executing a Trial using + suggested hyperparameter values. + + Attributes: + elapsed_duration (google.protobuf.duration_pb2.Duration): + Output only. Time that the Trial has been + running at the point of this Measurement. + step_count (int): + Output only. The number of steps the machine + learning model has been trained for. Must be + non-negative. + metrics (MutableSequence[google.cloud.aiplatform_v1.types.Measurement.Metric]): + Output only. A list of metrics got by + evaluating the objective functions using + suggested Parameter values. + """ + + class Metric(proto.Message): + r"""A message representing a metric in the measurement. + + Attributes: + metric_id (str): + Output only. The ID of the Metric. The Metric should be + defined in [StudySpec's + Metrics][google.cloud.aiplatform.v1.StudySpec.metrics]. + value (float): + Output only. The value for this metric. + """ + + metric_id: str = proto.Field( + proto.STRING, + number=1, + ) + value: float = proto.Field( + proto.DOUBLE, + number=2, + ) + + elapsed_duration: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + step_count: int = proto.Field( + proto.INT64, + number=2, + ) + metrics: MutableSequence[Metric] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=Metric, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard.py new file mode 100644 index 0000000000000000000000000000000000000000..8507cd9de9772530a64c2d24a6632d9513ae43e9 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard.py @@ -0,0 +1,159 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Tensorboard", + }, +) + + +class Tensorboard(proto.Message): + r"""Tensorboard is a physical database that stores users' + training metrics. A default Tensorboard is provided in each + region of a Google Cloud project. If needed users can also + create extra Tensorboards in their projects. + + Attributes: + name (str): + Output only. Name of the Tensorboard. Format: + ``projects/{project}/locations/{location}/tensorboards/{tensorboard}`` + display_name (str): + Required. User provided name of this + Tensorboard. + description (str): + Description of this Tensorboard. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Customer-managed encryption key spec for a + Tensorboard. If set, this Tensorboard and all + sub-resources of this Tensorboard will be + secured by this key. + blob_storage_path_prefix (str): + Output only. Consumer project Cloud Storage + path prefix used to store blob data, which can + either be a bucket or directory. Does not end + with a '/'. + run_count (int): + Output only. The number of Runs stored in + this Tensorboard. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Tensorboard + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this Tensorboard + was last updated. + labels (MutableMapping[str, str]): + The labels with user-defined metadata to + organize your Tensorboards. + Label keys and values can be no longer than 64 + characters (Unicode codepoints), can only + contain lowercase letters, numeric characters, + underscores and dashes. International characters + are allowed. No more than 64 user labels can be + associated with one Tensorboard (System labels + are excluded). + + See https://goo.gl/xmQnxf for more information + and examples of labels. System reserved label + keys are prefixed with + "aiplatform.googleapis.com/" and are immutable. + etag (str): + Used to perform a consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + is_default (bool): + Used to indicate if the TensorBoard instance + is the default one. Each project & region can + have at most one default TensorBoard instance. + Creation of a default TensorBoard instance and + updating an existing TensorBoard instance to be + default will mark all other TensorBoard + instances (if any) as non default. + satisfies_pzs (bool): + Output only. Reserved for future use. + satisfies_pzi (bool): + Output only. Reserved for future use. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=11, + message=gca_encryption_spec.EncryptionSpec, + ) + blob_storage_path_prefix: str = proto.Field( + proto.STRING, + number=10, + ) + run_count: int = proto.Field( + proto.INT32, + number=5, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=8, + ) + etag: str = proto.Field( + proto.STRING, + number=9, + ) + is_default: bool = proto.Field( + proto.BOOL, + number=12, + ) + satisfies_pzs: bool = proto.Field( + proto.BOOL, + number=13, + ) + satisfies_pzi: bool = proto.Field( + proto.BOOL, + number=14, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_data.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_data.py new file mode 100644 index 0000000000000000000000000000000000000000..23dff191b0ac2fa13876541797044d8f9e3578ac --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_data.py @@ -0,0 +1,209 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import tensorboard_time_series +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "TimeSeriesData", + "TimeSeriesDataPoint", + "Scalar", + "TensorboardTensor", + "TensorboardBlobSequence", + "TensorboardBlob", + }, +) + + +class TimeSeriesData(proto.Message): + r"""All the data stored in a TensorboardTimeSeries. + + Attributes: + tensorboard_time_series_id (str): + Required. The ID of the + TensorboardTimeSeries, which will become the + final component of the TensorboardTimeSeries' + resource name + value_type (google.cloud.aiplatform_v1.types.TensorboardTimeSeries.ValueType): + Required. Immutable. The value type of this + time series. All the values in this time series + data must match this value type. + values (MutableSequence[google.cloud.aiplatform_v1.types.TimeSeriesDataPoint]): + Required. Data points in this time series. + """ + + tensorboard_time_series_id: str = proto.Field( + proto.STRING, + number=1, + ) + value_type: tensorboard_time_series.TensorboardTimeSeries.ValueType = proto.Field( + proto.ENUM, + number=2, + enum=tensorboard_time_series.TensorboardTimeSeries.ValueType, + ) + values: MutableSequence["TimeSeriesDataPoint"] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message="TimeSeriesDataPoint", + ) + + +class TimeSeriesDataPoint(proto.Message): + r"""A TensorboardTimeSeries data point. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + scalar (google.cloud.aiplatform_v1.types.Scalar): + A scalar value. + + This field is a member of `oneof`_ ``value``. + tensor (google.cloud.aiplatform_v1.types.TensorboardTensor): + A tensor value. + + This field is a member of `oneof`_ ``value``. + blobs (google.cloud.aiplatform_v1.types.TensorboardBlobSequence): + A blob sequence value. + + This field is a member of `oneof`_ ``value``. + wall_time (google.protobuf.timestamp_pb2.Timestamp): + Wall clock timestamp when this data point is + generated by the end user. + step (int): + Step index of this data point within the run. + """ + + scalar: "Scalar" = proto.Field( + proto.MESSAGE, + number=3, + oneof="value", + message="Scalar", + ) + tensor: "TensorboardTensor" = proto.Field( + proto.MESSAGE, + number=4, + oneof="value", + message="TensorboardTensor", + ) + blobs: "TensorboardBlobSequence" = proto.Field( + proto.MESSAGE, + number=5, + oneof="value", + message="TensorboardBlobSequence", + ) + wall_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=1, + message=timestamp_pb2.Timestamp, + ) + step: int = proto.Field( + proto.INT64, + number=2, + ) + + +class Scalar(proto.Message): + r"""One point viewable on a scalar metric plot. + + Attributes: + value (float): + Value of the point at this step / timestamp. + """ + + value: float = proto.Field( + proto.DOUBLE, + number=1, + ) + + +class TensorboardTensor(proto.Message): + r"""One point viewable on a tensor metric plot. + + Attributes: + value (bytes): + Required. Serialized form of + https://github.com/tensorflow/tensorflow/blob/master/tensorflow/core/framework/tensor.proto + version_number (int): + Optional. Version number of TensorProto used to serialize + [value][google.cloud.aiplatform.v1.TensorboardTensor.value]. + """ + + value: bytes = proto.Field( + proto.BYTES, + number=1, + ) + version_number: int = proto.Field( + proto.INT32, + number=2, + ) + + +class TensorboardBlobSequence(proto.Message): + r"""One point viewable on a blob metric plot, but mostly just a wrapper + message to work around repeated fields can't be used directly within + ``oneof`` fields. + + Attributes: + values (MutableSequence[google.cloud.aiplatform_v1.types.TensorboardBlob]): + List of blobs contained within the sequence. + """ + + values: MutableSequence["TensorboardBlob"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="TensorboardBlob", + ) + + +class TensorboardBlob(proto.Message): + r"""One blob (e.g, image, graph) viewable on a blob metric plot. + + Attributes: + id (str): + Output only. A URI safe key uniquely + identifying a blob. Can be used to locate the + blob stored in the Cloud Storage bucket of the + consumer project. + data (bytes): + Optional. The bytes of the blob is not + present unless it's returned by the + ReadTensorboardBlobData endpoint. + """ + + id: str = proto.Field( + proto.STRING, + number=1, + ) + data: bytes = proto.Field( + proto.BYTES, + number=2, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_time_series.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_time_series.py new file mode 100644 index 0000000000000000000000000000000000000000..9ebd98aacc608f7be0ab4e4d2b070a3d031fb7cb --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tensorboard_time_series.py @@ -0,0 +1,175 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "TensorboardTimeSeries", + }, +) + + +class TensorboardTimeSeries(proto.Message): + r"""TensorboardTimeSeries maps to times series produced in + training runs + + Attributes: + name (str): + Output only. Name of the + TensorboardTimeSeries. + display_name (str): + Required. User provided name of this + TensorboardTimeSeries. This value should be + unique among all TensorboardTimeSeries resources + belonging to the same TensorboardRun resource + (parent resource). + description (str): + Description of this TensorboardTimeSeries. + value_type (google.cloud.aiplatform_v1.types.TensorboardTimeSeries.ValueType): + Required. Immutable. Type of + TensorboardTimeSeries value. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + TensorboardTimeSeries was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this + TensorboardTimeSeries was last updated. + etag (str): + Used to perform a consistent + read-modify-write updates. If not set, a blind + "overwrite" update happens. + plugin_name (str): + Immutable. Name of the plugin this time + series pertain to. Such as Scalar, Tensor, Blob + plugin_data (bytes): + Data of the current plugin, with the size + limited to 65KB. + metadata (google.cloud.aiplatform_v1.types.TensorboardTimeSeries.Metadata): + Output only. Scalar, Tensor, or Blob metadata + for this TensorboardTimeSeries. + """ + + class ValueType(proto.Enum): + r"""An enum representing the value type of a + TensorboardTimeSeries. + + Values: + VALUE_TYPE_UNSPECIFIED (0): + The value type is unspecified. + SCALAR (1): + Used for TensorboardTimeSeries that is a list + of scalars. E.g. accuracy of a model over + epochs/time. + TENSOR (2): + Used for TensorboardTimeSeries that is a list + of tensors. E.g. histograms of weights of layer + in a model over epoch/time. + BLOB_SEQUENCE (3): + Used for TensorboardTimeSeries that is a list + of blob sequences. E.g. set of sample images + with labels over epochs/time. + """ + + VALUE_TYPE_UNSPECIFIED = 0 + SCALAR = 1 + TENSOR = 2 + BLOB_SEQUENCE = 3 + + class Metadata(proto.Message): + r"""Describes metadata for a TensorboardTimeSeries. + + Attributes: + max_step (int): + Output only. Max step index of all data + points within a TensorboardTimeSeries. + max_wall_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Max wall clock timestamp of all + data points within a TensorboardTimeSeries. + max_blob_sequence_length (int): + Output only. The largest blob sequence length (number of + blobs) of all data points in this time series, if its + ValueType is BLOB_SEQUENCE. + """ + + max_step: int = proto.Field( + proto.INT64, + number=1, + ) + max_wall_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + max_blob_sequence_length: int = proto.Field( + proto.INT64, + number=3, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + value_type: ValueType = proto.Field( + proto.ENUM, + number=4, + enum=ValueType, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + etag: str = proto.Field( + proto.STRING, + number=7, + ) + plugin_name: str = proto.Field( + proto.STRING, + number=8, + ) + plugin_data: bytes = proto.Field( + proto.BYTES, + number=9, + ) + metadata: Metadata = proto.Field( + proto.MESSAGE, + number=10, + message=Metadata, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tool.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tool.py new file mode 100644 index 0000000000000000000000000000000000000000..dc2dc99760faa10675eab79ca4ab6bcd953cdd36 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/tool.py @@ -0,0 +1,1310 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import openapi +import google.protobuf.struct_pb2 as struct_pb2 # type: ignore +import google.type.latlng_pb2 as latlng_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "Tool", + "UrlContext", + "FunctionDeclaration", + "FunctionCall", + "PartialArg", + "FunctionResponsePart", + "FunctionResponseBlob", + "FunctionResponseFileData", + "FunctionResponse", + "ExecutableCode", + "CodeExecutionResult", + "Retrieval", + "VertexRagStore", + "VertexAISearch", + "GoogleSearchRetrieval", + "GoogleMaps", + "EnterpriseWebSearch", + "DynamicRetrievalConfig", + "ToolConfig", + "FunctionCallingConfig", + "RetrievalConfig", + "RagRetrievalConfig", + }, +) + + +class Tool(proto.Message): + r"""Tool details that the model may use to generate response. + + A ``Tool`` is a piece of code that enables the system to interact + with external systems to perform an action, or set of actions, + outside of knowledge and scope of the model. A Tool object should + contain exactly one type of Tool (e.g FunctionDeclaration, Retrieval + or GoogleSearchRetrieval). + + Attributes: + function_declarations (MutableSequence[google.cloud.aiplatform_v1.types.FunctionDeclaration]): + Optional. Function tool type. One or more function + declarations to be passed to the model along with the + current user query. Model may decide to call a subset of + these functions by populating + [FunctionCall][google.cloud.aiplatform.v1.Part.function_call] + in the response. User should provide a + [FunctionResponse][google.cloud.aiplatform.v1.Part.function_response] + for each function call in the next turn. Based on the + function responses, Model will generate the final response + back to the user. Maximum 128 function declarations can be + provided. + retrieval (google.cloud.aiplatform_v1.types.Retrieval): + Optional. Retrieval tool type. + System will always execute the provided + retrieval tool(s) to get external knowledge to + answer the prompt. Retrieval results are + presented to the model for generation. + google_search (google.cloud.aiplatform_v1.types.Tool.GoogleSearch): + Optional. GoogleSearch tool type. + Tool to support Google Search in Model. Powered + by Google. + google_search_retrieval (google.cloud.aiplatform_v1.types.GoogleSearchRetrieval): + Optional. GoogleSearchRetrieval tool type. + Specialized retrieval tool that is powered by + Google search. + google_maps (google.cloud.aiplatform_v1.types.GoogleMaps): + Optional. GoogleMaps tool type. + Tool to support Google Maps in Model. + enterprise_web_search (google.cloud.aiplatform_v1.types.EnterpriseWebSearch): + Optional. Tool to support searching public + web data, powered by Vertex AI Search and Sec4 + compliance. + code_execution (google.cloud.aiplatform_v1.types.Tool.CodeExecution): + Optional. CodeExecution tool type. + Enables the model to execute code as part of + generation. + url_context (google.cloud.aiplatform_v1.types.UrlContext): + Optional. Tool to support URL context + retrieval. + computer_use (google.cloud.aiplatform_v1.types.Tool.ComputerUse): + Optional. Tool to support the model + interacting directly with the computer. If + enabled, it automatically populates computer-use + specific Function Declarations. + """ + + class PhishBlockThreshold(proto.Enum): + r"""These are available confidence level user can set to block + malicious urls with chosen confidence and above. For + understanding different confidence of webrisk, please refer to + https://cloud.google.com/web-risk/docs/reference/rpc/google.cloud.webrisk.v1eap1#confidencelevel + + Values: + PHISH_BLOCK_THRESHOLD_UNSPECIFIED (0): + Defaults to unspecified. + BLOCK_LOW_AND_ABOVE (30): + Blocks Low and above confidence URL that is + risky. + BLOCK_MEDIUM_AND_ABOVE (40): + Blocks Medium and above confidence URL that + is risky. + BLOCK_HIGH_AND_ABOVE (50): + Blocks High and above confidence URL that is + risky. + BLOCK_HIGHER_AND_ABOVE (55): + Blocks Higher and above confidence URL that + is risky. + BLOCK_VERY_HIGH_AND_ABOVE (60): + Blocks Very high and above confidence URL + that is risky. + BLOCK_ONLY_EXTREMELY_HIGH (100): + Blocks Extremely high confidence URL that is + risky. + """ + + PHISH_BLOCK_THRESHOLD_UNSPECIFIED = 0 + BLOCK_LOW_AND_ABOVE = 30 + BLOCK_MEDIUM_AND_ABOVE = 40 + BLOCK_HIGH_AND_ABOVE = 50 + BLOCK_HIGHER_AND_ABOVE = 55 + BLOCK_VERY_HIGH_AND_ABOVE = 60 + BLOCK_ONLY_EXTREMELY_HIGH = 100 + + class GoogleSearch(proto.Message): + r"""GoogleSearch tool type. + Tool to support Google Search in Model. Powered by Google. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exclude_domains (MutableSequence[str]): + Optional. List of domains to be excluded from the search + results. The default limit is 2000 domains. Example: + ["amazon.com", "facebook.com"]. + blocking_confidence (google.cloud.aiplatform_v1.types.Tool.PhishBlockThreshold): + Optional. Sites with confidence level chosen + & above this value will be blocked from the + search results. + + This field is a member of `oneof`_ ``_blocking_confidence``. + """ + + exclude_domains: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + blocking_confidence: "Tool.PhishBlockThreshold" = proto.Field( + proto.ENUM, + number=4, + optional=True, + enum="Tool.PhishBlockThreshold", + ) + + class CodeExecution(proto.Message): + r"""Tool that executes code generated by the model, and automatically + returns the result to the model. + + See also [ExecutableCode]and [CodeExecutionResult] which are input + and output to this tool. + + """ + + class ComputerUse(proto.Message): + r"""Tool to support computer use. + + Attributes: + environment (google.cloud.aiplatform_v1.types.Tool.ComputerUse.Environment): + Required. The environment being operated. + excluded_predefined_functions (MutableSequence[str]): + Optional. By default, `predefined + functions `__ + are included in the final model call. Some of them can be + explicitly excluded from being automatically included. This + can serve two purposes: + + 1. Using a more restricted / different action space. + 2. Improving the definitions / instructions of predefined + functions. + """ + + class Environment(proto.Enum): + r"""Represents the environment being operated, such as a web + browser. + + Values: + ENVIRONMENT_UNSPECIFIED (0): + Defaults to browser. + ENVIRONMENT_BROWSER (1): + Operates in a web browser. + """ + + ENVIRONMENT_UNSPECIFIED = 0 + ENVIRONMENT_BROWSER = 1 + + environment: "Tool.ComputerUse.Environment" = proto.Field( + proto.ENUM, + number=1, + enum="Tool.ComputerUse.Environment", + ) + excluded_predefined_functions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + function_declarations: MutableSequence["FunctionDeclaration"] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message="FunctionDeclaration", + ) + retrieval: "Retrieval" = proto.Field( + proto.MESSAGE, + number=2, + message="Retrieval", + ) + google_search: GoogleSearch = proto.Field( + proto.MESSAGE, + number=7, + message=GoogleSearch, + ) + google_search_retrieval: "GoogleSearchRetrieval" = proto.Field( + proto.MESSAGE, + number=3, + message="GoogleSearchRetrieval", + ) + google_maps: "GoogleMaps" = proto.Field( + proto.MESSAGE, + number=5, + message="GoogleMaps", + ) + enterprise_web_search: "EnterpriseWebSearch" = proto.Field( + proto.MESSAGE, + number=6, + message="EnterpriseWebSearch", + ) + code_execution: CodeExecution = proto.Field( + proto.MESSAGE, + number=4, + message=CodeExecution, + ) + url_context: "UrlContext" = proto.Field( + proto.MESSAGE, + number=10, + message="UrlContext", + ) + computer_use: ComputerUse = proto.Field( + proto.MESSAGE, + number=11, + message=ComputerUse, + ) + + +class UrlContext(proto.Message): + r"""Tool to support URL context.""" + + +class FunctionDeclaration(proto.Message): + r"""Structured representation of a function declaration as defined by + the `OpenAPI 3.0 + specification `__. Included in + this declaration are the function name, description, parameters and + response type. This FunctionDeclaration is a representation of a + block of code that can be used as a ``Tool`` by the model and + executed by the client. + + Attributes: + name (str): + Required. The name of the function to call. + Must start with a letter or an underscore. + Must be a-z, A-Z, 0-9, or contain underscores, + dots and dashes, with a maximum length of 64. + description (str): + Optional. Description and purpose of the + function. Model uses it to decide how and + whether to call the function. + parameters (google.cloud.aiplatform_v1.types.Schema): + Optional. Describes the parameters to this + function in JSON Schema Object format. Reflects + the Open API 3.03 Parameter Object. string Key: + the name of the parameter. Parameter names are + case sensitive. Schema Value: the Schema + defining the type used for the parameter. For + function with no parameters, this can be left + unset. Parameter names must start with a letter + or an underscore and must only contain chars + a-z, A-Z, 0-9, or underscores with a maximum + length of 64. Example with 1 required and 1 + optional parameter: type: OBJECT properties: + + param1: + + type: STRING + param2: + + type: INTEGER + required: + + - param1 + parameters_json_schema (google.protobuf.struct_pb2.Value): + Optional. Describes the parameters to the function in JSON + Schema format. The schema must describe an object where the + properties are the parameters to the function. For example: + + :: + + { + "type": "object", + "properties": { + "name": { "type": "string" }, + "age": { "type": "integer" } + }, + "additionalProperties": false, + "required": ["name", "age"], + "propertyOrdering": ["name", "age"] + } + + This field is mutually exclusive with ``parameters``. + response (google.cloud.aiplatform_v1.types.Schema): + Optional. Describes the output from this + function in JSON Schema format. Reflects the + Open API 3.03 Response Object. The Schema + defines the type used for the response value of + the function. + response_json_schema (google.protobuf.struct_pb2.Value): + Optional. Describes the output from this function in JSON + Schema format. The value specified by the schema is the + response value of the function. + + This field is mutually exclusive with ``response``. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + parameters: openapi.Schema = proto.Field( + proto.MESSAGE, + number=3, + message=openapi.Schema, + ) + parameters_json_schema: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=5, + message=struct_pb2.Value, + ) + response: openapi.Schema = proto.Field( + proto.MESSAGE, + number=4, + message=openapi.Schema, + ) + response_json_schema: struct_pb2.Value = proto.Field( + proto.MESSAGE, + number=6, + message=struct_pb2.Value, + ) + + +class FunctionCall(proto.Message): + r"""A predicted [FunctionCall] returned from the model that contains a + string representing the [FunctionDeclaration.name] and a structured + JSON object containing the parameters and their values. + + Attributes: + name (str): + Optional. The name of the function to call. Matches + [FunctionDeclaration.name]. + args (google.protobuf.struct_pb2.Struct): + Optional. The function parameters and values in JSON object + format. See [FunctionDeclaration.parameters] for parameter + details. + partial_args (MutableSequence[google.cloud.aiplatform_v1.types.PartialArg]): + Optional. The partial argument value of the + function call. If provided, represents the + arguments/fields that are streamed + incrementally. + will_continue (bool): + Optional. Whether this is the last part of + the FunctionCall. If true, another partial + message for the current FunctionCall is expected + to follow. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + args: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Struct, + ) + partial_args: MutableSequence["PartialArg"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="PartialArg", + ) + will_continue: bool = proto.Field( + proto.BOOL, + number=5, + ) + + +class PartialArg(proto.Message): + r"""Partial argument value of the function call. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + null_value (google.protobuf.struct_pb2.NullValue): + Optional. Represents a null value. + + This field is a member of `oneof`_ ``delta``. + number_value (float): + Optional. Represents a double value. + + This field is a member of `oneof`_ ``delta``. + string_value (str): + Optional. Represents a string value. + + This field is a member of `oneof`_ ``delta``. + bool_value (bool): + Optional. Represents a boolean value. + + This field is a member of `oneof`_ ``delta``. + json_path (str): + Required. A JSON Path (RFC 9535) to the argument being + streamed. https://datatracker.ietf.org/doc/html/rfc9535. + e.g. "$.foo.bar[0].data". + will_continue (bool): + Optional. Whether this is not the last part of the same + json_path. If true, another PartialArg message for the + current json_path is expected to follow. + """ + + null_value: struct_pb2.NullValue = proto.Field( + proto.ENUM, + number=2, + oneof="delta", + enum=struct_pb2.NullValue, + ) + number_value: float = proto.Field( + proto.DOUBLE, + number=3, + oneof="delta", + ) + string_value: str = proto.Field( + proto.STRING, + number=4, + oneof="delta", + ) + bool_value: bool = proto.Field( + proto.BOOL, + number=5, + oneof="delta", + ) + json_path: str = proto.Field( + proto.STRING, + number=1, + ) + will_continue: bool = proto.Field( + proto.BOOL, + number=6, + ) + + +class FunctionResponsePart(proto.Message): + r"""A datatype containing media that is part of a ``FunctionResponse`` + message. + + A ``FunctionResponsePart`` consists of data which has an associated + datatype. A ``FunctionResponsePart`` can only contain one of the + accepted types in ``FunctionResponsePart.data``. + + A ``FunctionResponsePart`` must have a fixed IANA MIME type + identifying the type and subtype of the media if the ``inline_data`` + field is filled with raw bytes. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + inline_data (google.cloud.aiplatform_v1.types.FunctionResponseBlob): + Inline media bytes. + + This field is a member of `oneof`_ ``data``. + file_data (google.cloud.aiplatform_v1.types.FunctionResponseFileData): + URI based data. + + This field is a member of `oneof`_ ``data``. + """ + + inline_data: "FunctionResponseBlob" = proto.Field( + proto.MESSAGE, + number=1, + oneof="data", + message="FunctionResponseBlob", + ) + file_data: "FunctionResponseFileData" = proto.Field( + proto.MESSAGE, + number=2, + oneof="data", + message="FunctionResponseFileData", + ) + + +class FunctionResponseBlob(proto.Message): + r"""Raw media bytes for function response. + + Text should not be sent as raw bytes, use the 'text' field. + + Attributes: + mime_type (str): + Required. The IANA standard MIME type of the + source data. + data (bytes): + Required. Raw bytes. + display_name (str): + Optional. Display name of the blob. + + Used to provide a label or filename to distinguish blobs. + + This field is only returned in PromptMessage for prompt + management. It is currently used in the Gemini + GenerateContent calls only when server side tools + (code_execution, google_search, and url_context) are + enabled. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + ) + data: bytes = proto.Field( + proto.BYTES, + number=2, + ) + display_name: str = proto.Field( + proto.STRING, + number=4, + ) + + +class FunctionResponseFileData(proto.Message): + r"""URI based data for function response. + + Attributes: + mime_type (str): + Required. The IANA standard MIME type of the + source data. + file_uri (str): + Required. URI. + display_name (str): + Optional. Display name of the file data. + + Used to provide a label or filename to distinguish file + datas. + + This field is only returned in PromptMessage for prompt + management. It is currently used in the Gemini + GenerateContent calls only when server side tools + (code_execution, google_search, and url_context) are + enabled. + """ + + mime_type: str = proto.Field( + proto.STRING, + number=1, + ) + file_uri: str = proto.Field( + proto.STRING, + number=2, + ) + display_name: str = proto.Field( + proto.STRING, + number=3, + ) + + +class FunctionResponse(proto.Message): + r"""The result output from a [FunctionCall] that contains a string + representing the [FunctionDeclaration.name] and a structured JSON + object containing any output from the function is used as context to + the model. This should contain the result of a [FunctionCall] made + based on model prediction. + + Attributes: + name (str): + Required. The name of the function to call. Matches + [FunctionDeclaration.name] and [FunctionCall.name]. + response (google.protobuf.struct_pb2.Struct): + Required. The function response in JSON + object format. Use "output" key to specify + function output and "error" key to specify error + details (if any). If "output" and "error" keys + are not specified, then whole "response" is + treated as function output. + parts (MutableSequence[google.cloud.aiplatform_v1.types.FunctionResponsePart]): + Optional. Ordered ``Parts`` that constitute a function + response. Parts may have different IANA MIME types. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + response: struct_pb2.Struct = proto.Field( + proto.MESSAGE, + number=2, + message=struct_pb2.Struct, + ) + parts: MutableSequence["FunctionResponsePart"] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message="FunctionResponsePart", + ) + + +class ExecutableCode(proto.Message): + r"""Code generated by the model that is meant to be executed, and the + result returned to the model. + + Generated when using the [FunctionDeclaration] tool and + [FunctionCallingConfig] mode is set to [Mode.CODE]. + + Attributes: + language (google.cloud.aiplatform_v1.types.ExecutableCode.Language): + Required. Programming language of the ``code``. + code (str): + Required. The code to be executed. + """ + + class Language(proto.Enum): + r"""Supported programming languages for the generated code. + + Values: + LANGUAGE_UNSPECIFIED (0): + Unspecified language. This value should not + be used. + PYTHON (1): + Python >= 3.10, with numpy and simpy + available. + """ + + LANGUAGE_UNSPECIFIED = 0 + PYTHON = 1 + + language: Language = proto.Field( + proto.ENUM, + number=1, + enum=Language, + ) + code: str = proto.Field( + proto.STRING, + number=2, + ) + + +class CodeExecutionResult(proto.Message): + r"""Result of executing the [ExecutableCode]. + + Always follows a ``part`` containing the [ExecutableCode]. + + Attributes: + outcome (google.cloud.aiplatform_v1.types.CodeExecutionResult.Outcome): + Required. Outcome of the code execution. + output (str): + Optional. Contains stdout when code execution + is successful, stderr or other description + otherwise. + """ + + class Outcome(proto.Enum): + r"""Enumeration of possible outcomes of the code execution. + + Values: + OUTCOME_UNSPECIFIED (0): + Unspecified status. This value should not be + used. + OUTCOME_OK (1): + Code execution completed successfully. + OUTCOME_FAILED (2): + Code execution finished but with a failure. ``stderr`` + should contain the reason. + OUTCOME_DEADLINE_EXCEEDED (3): + Code execution ran for too long, and was + cancelled. There may or may not be a partial + output present. + """ + + OUTCOME_UNSPECIFIED = 0 + OUTCOME_OK = 1 + OUTCOME_FAILED = 2 + OUTCOME_DEADLINE_EXCEEDED = 3 + + outcome: Outcome = proto.Field( + proto.ENUM, + number=1, + enum=Outcome, + ) + output: str = proto.Field( + proto.STRING, + number=2, + ) + + +class Retrieval(proto.Message): + r"""Defines a retrieval tool that model can call to access + external knowledge. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vertex_ai_search (google.cloud.aiplatform_v1.types.VertexAISearch): + Set to use data source powered by Vertex AI + Search. + + This field is a member of `oneof`_ ``source``. + vertex_rag_store (google.cloud.aiplatform_v1.types.VertexRagStore): + Set to use data source powered by Vertex RAG + store. User data is uploaded via the + VertexRagDataService. + + This field is a member of `oneof`_ ``source``. + disable_attribution (bool): + Optional. Deprecated. This option is no + longer supported. + """ + + vertex_ai_search: "VertexAISearch" = proto.Field( + proto.MESSAGE, + number=2, + oneof="source", + message="VertexAISearch", + ) + vertex_rag_store: "VertexRagStore" = proto.Field( + proto.MESSAGE, + number=4, + oneof="source", + message="VertexRagStore", + ) + disable_attribution: bool = proto.Field( + proto.BOOL, + number=3, + ) + + +class VertexRagStore(proto.Message): + r"""Retrieve from Vertex RAG Store for grounding. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rag_resources (MutableSequence[google.cloud.aiplatform_v1.types.VertexRagStore.RagResource]): + Optional. The representation of the rag + source. It can be used to specify corpus only or + ragfiles. Currently only support one corpus or + multiple files from one corpus. In the future we + may open up multiple corpora support. + similarity_top_k (int): + Optional. Number of top k results to return + from the selected corpora. + + This field is a member of `oneof`_ ``_similarity_top_k``. + vector_distance_threshold (float): + Optional. Only return results with vector + distance smaller than the threshold. + + This field is a member of `oneof`_ ``_vector_distance_threshold``. + rag_retrieval_config (google.cloud.aiplatform_v1.types.RagRetrievalConfig): + Optional. The retrieval config for the Rag + query. + """ + + class RagResource(proto.Message): + r"""The definition of the Rag resource. + + Attributes: + rag_corpus (str): + Optional. RagCorpora resource name. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + rag_file_ids (MutableSequence[str]): + Optional. rag_file_id. The files should be in the same + rag_corpus set in rag_corpus field. + """ + + rag_corpus: str = proto.Field( + proto.STRING, + number=1, + ) + rag_file_ids: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + rag_resources: MutableSequence[RagResource] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=RagResource, + ) + similarity_top_k: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + vector_distance_threshold: float = proto.Field( + proto.DOUBLE, + number=3, + optional=True, + ) + rag_retrieval_config: "RagRetrievalConfig" = proto.Field( + proto.MESSAGE, + number=6, + message="RagRetrievalConfig", + ) + + +class VertexAISearch(proto.Message): + r"""Retrieve from Vertex AI Search datastore or engine for + grounding. datastore and engine are mutually exclusive. See + https://cloud.google.com/products/agent-builder + + Attributes: + datastore (str): + Optional. Fully-qualified Vertex AI Search data store + resource ID. Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`` + engine (str): + Optional. Fully-qualified Vertex AI Search engine resource + ID. Format: + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}`` + max_results (int): + Optional. Number of search results to return + per query. The default value is 10. + The maximumm allowed value is 10. + filter (str): + Optional. Filter strings to be passed to the + search API. + data_store_specs (MutableSequence[google.cloud.aiplatform_v1.types.VertexAISearch.DataStoreSpec]): + Specifications that define the specific + DataStores to be searched, along with + configurations for those data stores. This is + only considered for Engines with multiple data + stores. + It should only be set if engine is used. + """ + + class DataStoreSpec(proto.Message): + r"""Define data stores within engine to filter on in a search + call and configurations for those data stores. For more + information, see + https://cloud.google.com/generative-ai-app-builder/docs/reference/rpc/google.cloud.discoveryengine.v1#datastorespec + + Attributes: + data_store (str): + Full resource name of DataStore, such as Format: + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{dataStore}`` + filter (str): + Optional. Filter specification to filter documents in the + data store specified by data_store field. For more + information on filtering, see + `Filtering `__ + """ + + data_store: str = proto.Field( + proto.STRING, + number=1, + ) + filter: str = proto.Field( + proto.STRING, + number=2, + ) + + datastore: str = proto.Field( + proto.STRING, + number=1, + ) + engine: str = proto.Field( + proto.STRING, + number=2, + ) + max_results: int = proto.Field( + proto.INT32, + number=3, + ) + filter: str = proto.Field( + proto.STRING, + number=4, + ) + data_store_specs: MutableSequence[DataStoreSpec] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=DataStoreSpec, + ) + + +class GoogleSearchRetrieval(proto.Message): + r"""Tool to retrieve public web data for grounding, powered by + Google. + + Attributes: + dynamic_retrieval_config (google.cloud.aiplatform_v1.types.DynamicRetrievalConfig): + Specifies the dynamic retrieval configuration + for the given source. + """ + + dynamic_retrieval_config: "DynamicRetrievalConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="DynamicRetrievalConfig", + ) + + +class GoogleMaps(proto.Message): + r"""Tool to retrieve public maps data for grounding, powered by + Google. + + Attributes: + enable_widget (bool): + If true, include the widget context token in + the response. + """ + + enable_widget: bool = proto.Field( + proto.BOOL, + number=1, + ) + + +class EnterpriseWebSearch(proto.Message): + r"""Tool to search public web data, powered by Vertex AI Search + and Sec4 compliance. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exclude_domains (MutableSequence[str]): + Optional. List of domains to be excluded from + the search results. The default limit is 2000 + domains. + blocking_confidence (google.cloud.aiplatform_v1.types.Tool.PhishBlockThreshold): + Optional. Sites with confidence level chosen + & above this value will be blocked from the + search results. + + This field is a member of `oneof`_ ``_blocking_confidence``. + """ + + exclude_domains: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + blocking_confidence: "Tool.PhishBlockThreshold" = proto.Field( + proto.ENUM, + number=2, + optional=True, + enum="Tool.PhishBlockThreshold", + ) + + +class DynamicRetrievalConfig(proto.Message): + r"""Describes the options to customize dynamic retrieval. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + mode (google.cloud.aiplatform_v1.types.DynamicRetrievalConfig.Mode): + The mode of the predictor to be used in + dynamic retrieval. + dynamic_threshold (float): + Optional. The threshold to be used in dynamic + retrieval. If not set, a system default value is + used. + + This field is a member of `oneof`_ ``_dynamic_threshold``. + """ + + class Mode(proto.Enum): + r"""The mode of the predictor to be used in dynamic retrieval. + + Values: + MODE_UNSPECIFIED (0): + Always trigger retrieval. + MODE_DYNAMIC (1): + Run retrieval only when system decides it is + necessary. + """ + + MODE_UNSPECIFIED = 0 + MODE_DYNAMIC = 1 + + mode: Mode = proto.Field( + proto.ENUM, + number=1, + enum=Mode, + ) + dynamic_threshold: float = proto.Field( + proto.FLOAT, + number=2, + optional=True, + ) + + +class ToolConfig(proto.Message): + r"""Tool config. This config is shared for all tools provided in + the request. + + Attributes: + function_calling_config (google.cloud.aiplatform_v1.types.FunctionCallingConfig): + Optional. Function calling config. + retrieval_config (google.cloud.aiplatform_v1.types.RetrievalConfig): + Optional. Retrieval config. + """ + + function_calling_config: "FunctionCallingConfig" = proto.Field( + proto.MESSAGE, + number=1, + message="FunctionCallingConfig", + ) + retrieval_config: "RetrievalConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="RetrievalConfig", + ) + + +class FunctionCallingConfig(proto.Message): + r"""Function calling config. + + Attributes: + mode (google.cloud.aiplatform_v1.types.FunctionCallingConfig.Mode): + Optional. Function calling mode. + allowed_function_names (MutableSequence[str]): + Optional. Function names to call. Only set when the Mode is + ANY. Function names should match [FunctionDeclaration.name]. + With mode set to ANY, model will predict a function call + from the set of function names provided. + stream_function_call_arguments (bool): + Optional. When set to true, arguments of a single function + call will be streamed out in multiple + parts/contents/responses. Partial parameter results will be + returned in the [FunctionCall.partial_args] field. + """ + + class Mode(proto.Enum): + r"""Function calling mode. + + Values: + MODE_UNSPECIFIED (0): + Unspecified function calling mode. This value + should not be used. + AUTO (1): + Default model behavior, model decides to + predict either function calls or natural + language response. + ANY (2): + Model is constrained to always predicting function calls + only. If "allowed_function_names" are set, the predicted + function calls will be limited to any one of + "allowed_function_names", else the predicted function calls + will be any one of the provided "function_declarations". + NONE (3): + Model will not predict any function calls. + Model behavior is same as when not passing any + function declarations. + VALIDATED (5): + Model is constrained to predict either function calls or + natural language response. If + [allowed_function_names][FunctionCallingConfig.allowed_function_names] + are set, the predicted function calls will be limited to any + one of ``allowed_function_names``, else the predicted + function calls will be any one of the provided + [FunctionDeclaration]. + """ + + MODE_UNSPECIFIED = 0 + AUTO = 1 + ANY = 2 + NONE = 3 + VALIDATED = 5 + + mode: Mode = proto.Field( + proto.ENUM, + number=1, + enum=Mode, + ) + allowed_function_names: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + stream_function_call_arguments: bool = proto.Field( + proto.BOOL, + number=4, + ) + + +class RetrievalConfig(proto.Message): + r"""Retrieval config. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + lat_lng (google.type.latlng_pb2.LatLng): + The location of the user. + + This field is a member of `oneof`_ ``_lat_lng``. + language_code (str): + The language code of the user. + + This field is a member of `oneof`_ ``_language_code``. + """ + + lat_lng: latlng_pb2.LatLng = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message=latlng_pb2.LatLng, + ) + language_code: str = proto.Field( + proto.STRING, + number=2, + optional=True, + ) + + +class RagRetrievalConfig(proto.Message): + r"""Specifies the context retrieval config. + + Attributes: + top_k (int): + Optional. The number of contexts to retrieve. + filter (google.cloud.aiplatform_v1.types.RagRetrievalConfig.Filter): + Optional. Config for filters. + ranking (google.cloud.aiplatform_v1.types.RagRetrievalConfig.Ranking): + Optional. Config for ranking and reranking. + """ + + class Filter(proto.Message): + r"""Config for filters. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vector_distance_threshold (float): + Optional. Only returns contexts with vector + distance smaller than the threshold. + + This field is a member of `oneof`_ ``vector_db_threshold``. + vector_similarity_threshold (float): + Optional. Only returns contexts with vector + similarity larger than the threshold. + + This field is a member of `oneof`_ ``vector_db_threshold``. + metadata_filter (str): + Optional. String for metadata filtering. + """ + + vector_distance_threshold: float = proto.Field( + proto.DOUBLE, + number=3, + oneof="vector_db_threshold", + ) + vector_similarity_threshold: float = proto.Field( + proto.DOUBLE, + number=4, + oneof="vector_db_threshold", + ) + metadata_filter: str = proto.Field( + proto.STRING, + number=2, + ) + + class Ranking(proto.Message): + r"""Config for ranking and reranking. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rank_service (google.cloud.aiplatform_v1.types.RagRetrievalConfig.Ranking.RankService): + Optional. Config for Rank Service. + + This field is a member of `oneof`_ ``ranking_config``. + llm_ranker (google.cloud.aiplatform_v1.types.RagRetrievalConfig.Ranking.LlmRanker): + Optional. Config for LlmRanker. + + This field is a member of `oneof`_ ``ranking_config``. + """ + + class RankService(proto.Message): + r"""Config for Rank Service. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model_name (str): + Optional. The model name of the rank service. Format: + ``semantic-ranker-512@latest`` + + This field is a member of `oneof`_ ``_model_name``. + """ + + model_name: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + class LlmRanker(proto.Message): + r"""Config for LlmRanker. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + model_name (str): + Optional. The model name used for ranking. Format: + ``gemini-1.5-pro`` + + This field is a member of `oneof`_ ``_model_name``. + """ + + model_name: str = proto.Field( + proto.STRING, + number=1, + optional=True, + ) + + rank_service: "RagRetrievalConfig.Ranking.RankService" = proto.Field( + proto.MESSAGE, + number=1, + oneof="ranking_config", + message="RagRetrievalConfig.Ranking.RankService", + ) + llm_ranker: "RagRetrievalConfig.Ranking.LlmRanker" = proto.Field( + proto.MESSAGE, + number=3, + oneof="ranking_config", + message="RagRetrievalConfig.Ranking.LlmRanker", + ) + + top_k: int = proto.Field( + proto.INT32, + number=1, + ) + filter: Filter = proto.Field( + proto.MESSAGE, + number=3, + message=Filter, + ) + ranking: Ranking = proto.Field( + proto.MESSAGE, + number=4, + message=Ranking, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/types.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/types.py new file mode 100644 index 0000000000000000000000000000000000000000..b40005875f859785e9b6ec5390b3291b47f5936e --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/types.py @@ -0,0 +1,244 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "BoolArray", + "DoubleArray", + "Int64Array", + "StringArray", + "Tensor", + }, +) + + +class BoolArray(proto.Message): + r"""A list of boolean values. + + Attributes: + values (MutableSequence[bool]): + A list of bool values. + """ + + values: MutableSequence[bool] = proto.RepeatedField( + proto.BOOL, + number=1, + ) + + +class DoubleArray(proto.Message): + r"""A list of double values. + + Attributes: + values (MutableSequence[float]): + A list of double values. + """ + + values: MutableSequence[float] = proto.RepeatedField( + proto.DOUBLE, + number=1, + ) + + +class Int64Array(proto.Message): + r"""A list of int64 values. + + Attributes: + values (MutableSequence[int]): + A list of int64 values. + """ + + values: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=1, + ) + + +class StringArray(proto.Message): + r"""A list of string values. + + Attributes: + values (MutableSequence[str]): + A list of string values. + """ + + values: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class Tensor(proto.Message): + r"""A tensor value type. + + Attributes: + dtype (google.cloud.aiplatform_v1.types.Tensor.DataType): + The data type of tensor. + shape (MutableSequence[int]): + Shape of the tensor. + bool_val (MutableSequence[bool]): + Type specific representations that make it easy to create + tensor protos in all languages. Only the representation + corresponding to "dtype" can be set. The values hold the + flattened representation of the tensor in row major order. + + [BOOL][google.cloud.aiplatform.v1.Tensor.DataType.BOOL] + string_val (MutableSequence[str]): + [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING] + bytes_val (MutableSequence[bytes]): + [STRING][google.cloud.aiplatform.v1.Tensor.DataType.STRING] + float_val (MutableSequence[float]): + [FLOAT][google.cloud.aiplatform.v1.Tensor.DataType.FLOAT] + double_val (MutableSequence[float]): + [DOUBLE][google.cloud.aiplatform.v1.Tensor.DataType.DOUBLE] + int_val (MutableSequence[int]): + [INT_8][google.cloud.aiplatform.v1.Tensor.DataType.INT8] + [INT_16][google.cloud.aiplatform.v1.Tensor.DataType.INT16] + [INT_32][google.cloud.aiplatform.v1.Tensor.DataType.INT32] + int64_val (MutableSequence[int]): + [INT64][google.cloud.aiplatform.v1.Tensor.DataType.INT64] + uint_val (MutableSequence[int]): + [UINT8][google.cloud.aiplatform.v1.Tensor.DataType.UINT8] + [UINT16][google.cloud.aiplatform.v1.Tensor.DataType.UINT16] + [UINT32][google.cloud.aiplatform.v1.Tensor.DataType.UINT32] + uint64_val (MutableSequence[int]): + [UINT64][google.cloud.aiplatform.v1.Tensor.DataType.UINT64] + list_val (MutableSequence[google.cloud.aiplatform_v1.types.Tensor]): + A list of tensor values. + struct_val (MutableMapping[str, google.cloud.aiplatform_v1.types.Tensor]): + A map of string to tensor. + tensor_val (bytes): + Serialized raw tensor content. + """ + + class DataType(proto.Enum): + r"""Data type of the tensor. + + Values: + DATA_TYPE_UNSPECIFIED (0): + Not a legal value for DataType. Used to + indicate a DataType field has not been set. + BOOL (1): + Data types that all computation devices are + expected to be capable to support. + STRING (2): + No description available. + FLOAT (3): + No description available. + DOUBLE (4): + No description available. + INT8 (5): + No description available. + INT16 (6): + No description available. + INT32 (7): + No description available. + INT64 (8): + No description available. + UINT8 (9): + No description available. + UINT16 (10): + No description available. + UINT32 (11): + No description available. + UINT64 (12): + No description available. + """ + + DATA_TYPE_UNSPECIFIED = 0 + BOOL = 1 + STRING = 2 + FLOAT = 3 + DOUBLE = 4 + INT8 = 5 + INT16 = 6 + INT32 = 7 + INT64 = 8 + UINT8 = 9 + UINT16 = 10 + UINT32 = 11 + UINT64 = 12 + + dtype: DataType = proto.Field( + proto.ENUM, + number=1, + enum=DataType, + ) + shape: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=2, + ) + bool_val: MutableSequence[bool] = proto.RepeatedField( + proto.BOOL, + number=3, + ) + string_val: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=14, + ) + bytes_val: MutableSequence[bytes] = proto.RepeatedField( + proto.BYTES, + number=15, + ) + float_val: MutableSequence[float] = proto.RepeatedField( + proto.FLOAT, + number=5, + ) + double_val: MutableSequence[float] = proto.RepeatedField( + proto.DOUBLE, + number=6, + ) + int_val: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=7, + ) + int64_val: MutableSequence[int] = proto.RepeatedField( + proto.INT64, + number=8, + ) + uint_val: MutableSequence[int] = proto.RepeatedField( + proto.UINT32, + number=9, + ) + uint64_val: MutableSequence[int] = proto.RepeatedField( + proto.UINT64, + number=10, + ) + list_val: MutableSequence["Tensor"] = proto.RepeatedField( + proto.MESSAGE, + number=11, + message="Tensor", + ) + struct_val: MutableMapping[str, "Tensor"] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=12, + message="Tensor", + ) + tensor_val: bytes = proto.Field( + proto.BYTES, + number=13, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/unmanaged_container_model.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/unmanaged_container_model.py new file mode 100644 index 0000000000000000000000000000000000000000..dbd2fff88830efa330cd38a0cdeefdc72893e9a4 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/unmanaged_container_model.py @@ -0,0 +1,66 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import model + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "UnmanagedContainerModel", + }, +) + + +class UnmanagedContainerModel(proto.Message): + r"""Contains model information necessary to perform batch + prediction without requiring a full model import. + + Attributes: + artifact_uri (str): + The path to the directory containing the + Model artifact and any of its supporting files. + predict_schemata (google.cloud.aiplatform_v1.types.PredictSchemata): + Contains the schemata used in Model's + predictions and explanations + container_spec (google.cloud.aiplatform_v1.types.ModelContainerSpec): + Input only. The specification of the + container that is to be used when deploying this + Model. + """ + + artifact_uri: str = proto.Field( + proto.STRING, + number=1, + ) + predict_schemata: model.PredictSchemata = proto.Field( + proto.MESSAGE, + number=2, + message=model.PredictSchemata, + ) + container_spec: model.ModelContainerSpec = proto.Field( + proto.MESSAGE, + number=3, + message=model.ModelContainerSpec, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/usage_metadata.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/usage_metadata.py new file mode 100644 index 0000000000000000000000000000000000000000..7e9fe542d891deab9af6154bfdf9972c4016cdcf --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/usage_metadata.py @@ -0,0 +1,160 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import content + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "UsageMetadata", + }, +) + + +class UsageMetadata(proto.Message): + r"""Usage metadata about the content generation request and + response. This message provides a detailed breakdown of token + usage and other relevant metrics. + + Attributes: + prompt_token_count (int): + The total number of tokens in the prompt. This includes any + text, images, or other media provided in the request. When + ``cached_content`` is set, this also includes the number of + tokens in the cached content. + candidates_token_count (int): + The total number of tokens in the generated + candidates. + total_token_count (int): + The total number of tokens for the entire request. This is + the sum of ``prompt_token_count``, + ``candidates_token_count``, ``tool_use_prompt_token_count``, + and ``thoughts_token_count``. + tool_use_prompt_token_count (int): + Output only. The number of tokens in the + results from tool executions, which are provided + back to the model as input, if applicable. + thoughts_token_count (int): + Output only. The number of tokens that were + part of the model's generated "thoughts" output, + if applicable. + cached_content_token_count (int): + Output only. The number of tokens in the + cached content that was used for this request. + prompt_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. A detailed breakdown of the + token count for each modality in the prompt. + cache_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. A detailed breakdown of the + token count for each modality in the cached + content. + candidates_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. A detailed breakdown of the + token count for each modality in the generated + candidates. + tool_use_prompt_tokens_details (MutableSequence[google.cloud.aiplatform_v1.types.ModalityTokenCount]): + Output only. A detailed breakdown by modality + of the token counts from the results of tool + executions, which are provided back to the model + as input. + traffic_type (google.cloud.aiplatform_v1.types.UsageMetadata.TrafficType): + Output only. The traffic type for this + request. + """ + + class TrafficType(proto.Enum): + r"""The type of traffic that this request was processed with, + indicating which quota gets consumed. + + Values: + TRAFFIC_TYPE_UNSPECIFIED (0): + Unspecified request traffic type. + ON_DEMAND (1): + Type for Pay-As-You-Go traffic. + PROVISIONED_THROUGHPUT (2): + Type for Provisioned Throughput traffic. + """ + + TRAFFIC_TYPE_UNSPECIFIED = 0 + ON_DEMAND = 1 + PROVISIONED_THROUGHPUT = 2 + + prompt_token_count: int = proto.Field( + proto.INT32, + number=1, + ) + candidates_token_count: int = proto.Field( + proto.INT32, + number=2, + ) + total_token_count: int = proto.Field( + proto.INT32, + number=3, + ) + tool_use_prompt_token_count: int = proto.Field( + proto.INT32, + number=13, + ) + thoughts_token_count: int = proto.Field( + proto.INT32, + number=14, + ) + cached_content_token_count: int = proto.Field( + proto.INT32, + number=5, + ) + prompt_tokens_details: MutableSequence[content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=9, + message=content.ModalityTokenCount, + ) + ) + cache_tokens_details: MutableSequence[content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=10, + message=content.ModalityTokenCount, + ) + ) + candidates_tokens_details: MutableSequence[content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=11, + message=content.ModalityTokenCount, + ) + ) + tool_use_prompt_tokens_details: MutableSequence[content.ModalityTokenCount] = ( + proto.RepeatedField( + proto.MESSAGE, + number=12, + message=content.ModalityTokenCount, + ) + ) + traffic_type: TrafficType = proto.Field( + proto.ENUM, + number=8, + enum=TrafficType, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data.py new file mode 100644 index 0000000000000000000000000000000000000000..d739d44a1bee9498d2f4be7fc0ddc424921fc007 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data.py @@ -0,0 +1,1095 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import api_auth as gca_api_auth +from google.cloud.aiplatform_v1.types import encryption_spec as gca_encryption_spec +from google.cloud.aiplatform_v1.types import io +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "RagEmbeddingModelConfig", + "RagVectorDbConfig", + "FileStatus", + "VertexAiSearchConfig", + "CorpusStatus", + "RagCorpus", + "RagFile", + "RagChunk", + "RagFileChunkingConfig", + "RagFileTransformationConfig", + "RagFileParsingConfig", + "UploadRagFileConfig", + "ImportRagFilesConfig", + "RagManagedDbConfig", + "RagEngineConfig", + }, +) + + +class RagEmbeddingModelConfig(proto.Message): + r"""Config for the embedding model to use for RAG. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vertex_prediction_endpoint (google.cloud.aiplatform_v1.types.RagEmbeddingModelConfig.VertexPredictionEndpoint): + The Vertex AI Prediction Endpoint that either + refers to a publisher model or an endpoint that + is hosting a 1P fine-tuned text embedding model. + Endpoints hosting non-1P fine-tuned text + embedding models are currently not supported. + This is used for dense vector search. + + This field is a member of `oneof`_ ``model_config``. + """ + + class VertexPredictionEndpoint(proto.Message): + r"""Config representing a model hosted on Vertex Prediction + Endpoint. + + Attributes: + endpoint (str): + Required. The endpoint resource name. Format: + ``projects/{project}/locations/{location}/publishers/{publisher}/models/{model}`` + or + ``projects/{project}/locations/{location}/endpoints/{endpoint}`` + model (str): + Output only. The resource name of the model that is deployed + on the endpoint. Present only when the endpoint is not a + publisher model. Pattern: + ``projects/{project}/locations/{location}/models/{model}`` + model_version_id (str): + Output only. Version ID of the model that is + deployed on the endpoint. Present only when the + endpoint is not a publisher model. + """ + + endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + model: str = proto.Field( + proto.STRING, + number=2, + ) + model_version_id: str = proto.Field( + proto.STRING, + number=3, + ) + + vertex_prediction_endpoint: VertexPredictionEndpoint = proto.Field( + proto.MESSAGE, + number=1, + oneof="model_config", + message=VertexPredictionEndpoint, + ) + + +class RagVectorDbConfig(proto.Message): + r"""Config for the Vector DB to use for RAG. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rag_managed_db (google.cloud.aiplatform_v1.types.RagVectorDbConfig.RagManagedDb): + The config for the RAG-managed Vector DB. + + This field is a member of `oneof`_ ``vector_db``. + pinecone (google.cloud.aiplatform_v1.types.RagVectorDbConfig.Pinecone): + The config for the Pinecone. + + This field is a member of `oneof`_ ``vector_db``. + vertex_vector_search (google.cloud.aiplatform_v1.types.RagVectorDbConfig.VertexVectorSearch): + The config for the Vertex Vector Search. + + This field is a member of `oneof`_ ``vector_db``. + api_auth (google.cloud.aiplatform_v1.types.ApiAuth): + Authentication config for the chosen Vector + DB. + rag_embedding_model_config (google.cloud.aiplatform_v1.types.RagEmbeddingModelConfig): + Optional. Immutable. The embedding model + config of the Vector DB. + """ + + class RagManagedDb(proto.Message): + r"""The config for the default RAG-managed Vector DB. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + knn (google.cloud.aiplatform_v1.types.RagVectorDbConfig.RagManagedDb.KNN): + Performs a KNN search on RagCorpus. + Default choice if not specified. + + This field is a member of `oneof`_ ``retrieval_strategy``. + ann (google.cloud.aiplatform_v1.types.RagVectorDbConfig.RagManagedDb.ANN): + Performs an ANN search on RagCorpus. Use this + if you have a lot of files (> 10K) in your + RagCorpus and want to reduce the search latency. + + This field is a member of `oneof`_ ``retrieval_strategy``. + """ + + class KNN(proto.Message): + r"""Config for KNN search.""" + + class ANN(proto.Message): + r"""Config for ANN search. + + RagManagedDb uses a tree-based structure to partition data and + facilitate faster searches. As a tradeoff, it requires longer + indexing time and manual triggering of index rebuild via the + ImportRagFiles and UpdateRagCorpus API. + + Attributes: + tree_depth (int): + The depth of the tree-based structure. Only + depth values of 2 and 3 are supported. + + Recommended value is 2 if you have if you have + O(10K) files in the RagCorpus and set this to 3 + if more than that. + + Default value is 2. + leaf_count (int): + Number of leaf nodes in the tree-based structure. Each leaf + node contains groups of closely related vectors along with + their corresponding centroid. + + Recommended value is 10 \* sqrt(num of RagFiles in your + RagCorpus). + + Default value is 500. + """ + + tree_depth: int = proto.Field( + proto.INT32, + number=1, + ) + leaf_count: int = proto.Field( + proto.INT32, + number=2, + ) + + knn: "RagVectorDbConfig.RagManagedDb.KNN" = proto.Field( + proto.MESSAGE, + number=1, + oneof="retrieval_strategy", + message="RagVectorDbConfig.RagManagedDb.KNN", + ) + ann: "RagVectorDbConfig.RagManagedDb.ANN" = proto.Field( + proto.MESSAGE, + number=2, + oneof="retrieval_strategy", + message="RagVectorDbConfig.RagManagedDb.ANN", + ) + + class Pinecone(proto.Message): + r"""The config for the Pinecone. + + Attributes: + index_name (str): + Pinecone index name. + This value cannot be changed after it's set. + """ + + index_name: str = proto.Field( + proto.STRING, + number=1, + ) + + class VertexVectorSearch(proto.Message): + r"""The config for the Vertex Vector Search. + + Attributes: + index_endpoint (str): + The resource name of the Index Endpoint. Format: + ``projects/{project}/locations/{location}/indexEndpoints/{index_endpoint}`` + index (str): + The resource name of the Index. Format: + ``projects/{project}/locations/{location}/indexes/{index}`` + """ + + index_endpoint: str = proto.Field( + proto.STRING, + number=1, + ) + index: str = proto.Field( + proto.STRING, + number=2, + ) + + rag_managed_db: RagManagedDb = proto.Field( + proto.MESSAGE, + number=1, + oneof="vector_db", + message=RagManagedDb, + ) + pinecone: Pinecone = proto.Field( + proto.MESSAGE, + number=3, + oneof="vector_db", + message=Pinecone, + ) + vertex_vector_search: VertexVectorSearch = proto.Field( + proto.MESSAGE, + number=6, + oneof="vector_db", + message=VertexVectorSearch, + ) + api_auth: gca_api_auth.ApiAuth = proto.Field( + proto.MESSAGE, + number=5, + message=gca_api_auth.ApiAuth, + ) + rag_embedding_model_config: "RagEmbeddingModelConfig" = proto.Field( + proto.MESSAGE, + number=7, + message="RagEmbeddingModelConfig", + ) + + +class FileStatus(proto.Message): + r"""RagFile status. + + Attributes: + state (google.cloud.aiplatform_v1.types.FileStatus.State): + Output only. RagFile state. + error_status (str): + Output only. Only when the ``state`` field is ERROR. + """ + + class State(proto.Enum): + r"""RagFile state. + + Values: + STATE_UNSPECIFIED (0): + RagFile state is unspecified. + ACTIVE (1): + RagFile resource has been created and indexed + successfully. + ERROR (2): + RagFile resource is in a problematic state. See + ``error_message`` field for details. + """ + + STATE_UNSPECIFIED = 0 + ACTIVE = 1 + ERROR = 2 + + state: State = proto.Field( + proto.ENUM, + number=1, + enum=State, + ) + error_status: str = proto.Field( + proto.STRING, + number=2, + ) + + +class VertexAiSearchConfig(proto.Message): + r"""Config for the Vertex AI Search. + + Attributes: + serving_config (str): + Vertex AI Search Serving Config resource full name. For + example, + ``projects/{project}/locations/{location}/collections/{collection}/engines/{engine}/servingConfigs/{serving_config}`` + or + ``projects/{project}/locations/{location}/collections/{collection}/dataStores/{data_store}/servingConfigs/{serving_config}``. + """ + + serving_config: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CorpusStatus(proto.Message): + r"""RagCorpus status. + + Attributes: + state (google.cloud.aiplatform_v1.types.CorpusStatus.State): + Output only. RagCorpus life state. + error_status (str): + Output only. Only when the ``state`` field is ERROR. + """ + + class State(proto.Enum): + r"""RagCorpus life state. + + Values: + UNKNOWN (0): + This state is not supposed to happen. + INITIALIZED (1): + RagCorpus resource entry is initialized, but + hasn't done validation. + ACTIVE (2): + RagCorpus is provisioned successfully and is + ready to serve. + ERROR (3): + RagCorpus is in a problematic situation. See + ``error_message`` field for details. + """ + + UNKNOWN = 0 + INITIALIZED = 1 + ACTIVE = 2 + ERROR = 3 + + state: State = proto.Field( + proto.ENUM, + number=1, + enum=State, + ) + error_status: str = proto.Field( + proto.STRING, + number=2, + ) + + +class RagCorpus(proto.Message): + r"""A RagCorpus is a RagFile container and a project can have + multiple RagCorpora. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + vector_db_config (google.cloud.aiplatform_v1.types.RagVectorDbConfig): + Optional. Immutable. The config for the + Vector DBs. + + This field is a member of `oneof`_ ``backend_config``. + vertex_ai_search_config (google.cloud.aiplatform_v1.types.VertexAiSearchConfig): + Optional. Immutable. The config for the + Vertex AI Search. + + This field is a member of `oneof`_ ``backend_config``. + name (str): + Output only. The resource name of the + RagCorpus. + display_name (str): + Required. The display name of the RagCorpus. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + description (str): + Optional. The description of the RagCorpus. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this RagCorpus + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this RagCorpus + was last updated. + corpus_status (google.cloud.aiplatform_v1.types.CorpusStatus): + Output only. RagCorpus state. + encryption_spec (google.cloud.aiplatform_v1.types.EncryptionSpec): + Optional. Immutable. The CMEK key name used + to encrypt at-rest data related to this Corpus. + Only applicable to RagManagedDb option for + Vector DB. This field can only be set at corpus + creation time, and cannot be updated or deleted. + """ + + vector_db_config: "RagVectorDbConfig" = proto.Field( + proto.MESSAGE, + number=9, + oneof="backend_config", + message="RagVectorDbConfig", + ) + vertex_ai_search_config: "VertexAiSearchConfig" = proto.Field( + proto.MESSAGE, + number=10, + oneof="backend_config", + message="VertexAiSearchConfig", + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=5, + message=timestamp_pb2.Timestamp, + ) + corpus_status: "CorpusStatus" = proto.Field( + proto.MESSAGE, + number=8, + message="CorpusStatus", + ) + encryption_spec: gca_encryption_spec.EncryptionSpec = proto.Field( + proto.MESSAGE, + number=12, + message=gca_encryption_spec.EncryptionSpec, + ) + + +class RagFile(proto.Message): + r"""A RagFile contains user data for chunking, embedding and + indexing. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + Output only. Google Cloud Storage location of + the RagFile. It does not support wildcards in + the Cloud Storage uri for now. + + This field is a member of `oneof`_ ``rag_file_source``. + google_drive_source (google.cloud.aiplatform_v1.types.GoogleDriveSource): + Output only. Google Drive location. Supports + importing individual files as well as Google + Drive folders. + + This field is a member of `oneof`_ ``rag_file_source``. + direct_upload_source (google.cloud.aiplatform_v1.types.DirectUploadSource): + Output only. The RagFile is encapsulated and + uploaded in the UploadRagFile request. + + This field is a member of `oneof`_ ``rag_file_source``. + slack_source (google.cloud.aiplatform_v1.types.SlackSource): + The RagFile is imported from a Slack channel. + + This field is a member of `oneof`_ ``rag_file_source``. + jira_source (google.cloud.aiplatform_v1.types.JiraSource): + The RagFile is imported from a Jira query. + + This field is a member of `oneof`_ ``rag_file_source``. + share_point_sources (google.cloud.aiplatform_v1.types.SharePointSources): + The RagFile is imported from a SharePoint + source. + + This field is a member of `oneof`_ ``rag_file_source``. + name (str): + Output only. The resource name of the + RagFile. + display_name (str): + Required. The display name of the RagFile. + The name can be up to 128 characters long and + can consist of any UTF-8 characters. + description (str): + Optional. The description of the RagFile. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this RagFile was + created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. Timestamp when this RagFile was + last updated. + file_status (google.cloud.aiplatform_v1.types.FileStatus): + Output only. State of the RagFile. + """ + + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=8, + oneof="rag_file_source", + message=io.GcsSource, + ) + google_drive_source: io.GoogleDriveSource = proto.Field( + proto.MESSAGE, + number=9, + oneof="rag_file_source", + message=io.GoogleDriveSource, + ) + direct_upload_source: io.DirectUploadSource = proto.Field( + proto.MESSAGE, + number=10, + oneof="rag_file_source", + message=io.DirectUploadSource, + ) + slack_source: io.SlackSource = proto.Field( + proto.MESSAGE, + number=11, + oneof="rag_file_source", + message=io.SlackSource, + ) + jira_source: io.JiraSource = proto.Field( + proto.MESSAGE, + number=12, + oneof="rag_file_source", + message=io.JiraSource, + ) + share_point_sources: io.SharePointSources = proto.Field( + proto.MESSAGE, + number=14, + oneof="rag_file_source", + message=io.SharePointSources, + ) + name: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + description: str = proto.Field( + proto.STRING, + number=3, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=6, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=7, + message=timestamp_pb2.Timestamp, + ) + file_status: "FileStatus" = proto.Field( + proto.MESSAGE, + number=13, + message="FileStatus", + ) + + +class RagChunk(proto.Message): + r"""A RagChunk includes the content of a chunk of a RagFile, and + associated metadata. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + text (str): + The content of the chunk. + page_span (google.cloud.aiplatform_v1.types.RagChunk.PageSpan): + If populated, represents where the chunk + starts and ends in the document. + + This field is a member of `oneof`_ ``_page_span``. + """ + + class PageSpan(proto.Message): + r"""Represents where the chunk starts and ends in the document. + + Attributes: + first_page (int): + Page where chunk starts in the document. + Inclusive. 1-indexed. + last_page (int): + Page where chunk ends in the document. + Inclusive. 1-indexed. + """ + + first_page: int = proto.Field( + proto.INT32, + number=1, + ) + last_page: int = proto.Field( + proto.INT32, + number=2, + ) + + text: str = proto.Field( + proto.STRING, + number=1, + ) + page_span: PageSpan = proto.Field( + proto.MESSAGE, + number=2, + optional=True, + message=PageSpan, + ) + + +class RagFileChunkingConfig(proto.Message): + r"""Specifies the size and overlap of chunks for RagFiles. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + fixed_length_chunking (google.cloud.aiplatform_v1.types.RagFileChunkingConfig.FixedLengthChunking): + Specifies the fixed length chunking config. + + This field is a member of `oneof`_ ``chunking_config``. + """ + + class FixedLengthChunking(proto.Message): + r"""Specifies the fixed length chunking config. + + Attributes: + chunk_size (int): + The size of the chunks. + chunk_overlap (int): + The overlap between chunks. + """ + + chunk_size: int = proto.Field( + proto.INT32, + number=1, + ) + chunk_overlap: int = proto.Field( + proto.INT32, + number=2, + ) + + fixed_length_chunking: FixedLengthChunking = proto.Field( + proto.MESSAGE, + number=3, + oneof="chunking_config", + message=FixedLengthChunking, + ) + + +class RagFileTransformationConfig(proto.Message): + r"""Specifies the transformation config for RagFiles. + + Attributes: + rag_file_chunking_config (google.cloud.aiplatform_v1.types.RagFileChunkingConfig): + Specifies the chunking config for RagFiles. + """ + + rag_file_chunking_config: "RagFileChunkingConfig" = proto.Field( + proto.MESSAGE, + number=1, + message="RagFileChunkingConfig", + ) + + +class RagFileParsingConfig(proto.Message): + r"""Specifies the parsing config for RagFiles. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + layout_parser (google.cloud.aiplatform_v1.types.RagFileParsingConfig.LayoutParser): + The Layout Parser to use for RagFiles. + + This field is a member of `oneof`_ ``parser``. + llm_parser (google.cloud.aiplatform_v1.types.RagFileParsingConfig.LlmParser): + The LLM Parser to use for RagFiles. + + This field is a member of `oneof`_ ``parser``. + """ + + class LayoutParser(proto.Message): + r"""Document AI Layout Parser config. + + Attributes: + processor_name (str): + The full resource name of a Document AI processor or + processor version. The processor must have type + ``LAYOUT_PARSER_PROCESSOR``. If specified, the + ``additional_config.parse_as_scanned_pdf`` field must be + false. Format: + + - ``projects/{project_id}/locations/{location}/processors/{processor_id}`` + - ``projects/{project_id}/locations/{location}/processors/{processor_id}/processorVersions/{processor_version_id}`` + max_parsing_requests_per_min (int): + The maximum number of requests the job is + allowed to make to the Document AI processor per + minute. Consult + https://cloud.google.com/document-ai/quotas and + the Quota page for your project to set an + appropriate value here. If unspecified, a + default value of 120 QPM would be used. + """ + + processor_name: str = proto.Field( + proto.STRING, + number=1, + ) + max_parsing_requests_per_min: int = proto.Field( + proto.INT32, + number=2, + ) + + class LlmParser(proto.Message): + r"""Specifies the advanced parsing for RagFiles. + + Attributes: + model_name (str): + The name of a LLM model used for parsing. Format: + + - ``projects/{project_id}/locations/{location}/publishers/{publisher}/models/{model}`` + max_parsing_requests_per_min (int): + The maximum number of requests the job is + allowed to make to the LLM model per minute. + Consult + https://cloud.google.com/vertex-ai/generative-ai/docs/quotas + and your document size to set an appropriate + value here. If unspecified, a default value of + 5000 QPM would be used. + custom_parsing_prompt (str): + The prompt to use for parsing. If not + specified, a default prompt will be used. + """ + + model_name: str = proto.Field( + proto.STRING, + number=1, + ) + max_parsing_requests_per_min: int = proto.Field( + proto.INT32, + number=2, + ) + custom_parsing_prompt: str = proto.Field( + proto.STRING, + number=3, + ) + + layout_parser: LayoutParser = proto.Field( + proto.MESSAGE, + number=4, + oneof="parser", + message=LayoutParser, + ) + llm_parser: LlmParser = proto.Field( + proto.MESSAGE, + number=5, + oneof="parser", + message=LlmParser, + ) + + +class UploadRagFileConfig(proto.Message): + r"""Config for uploading RagFile. + + Attributes: + rag_file_transformation_config (google.cloud.aiplatform_v1.types.RagFileTransformationConfig): + Specifies the transformation config for + RagFiles. + """ + + rag_file_transformation_config: "RagFileTransformationConfig" = proto.Field( + proto.MESSAGE, + number=3, + message="RagFileTransformationConfig", + ) + + +class ImportRagFilesConfig(proto.Message): + r"""Config for importing RagFiles. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + gcs_source (google.cloud.aiplatform_v1.types.GcsSource): + Google Cloud Storage location. Supports importing individual + files as well as entire Google Cloud Storage directories. + Sample formats: + + - ``gs://bucket_name/my_directory/object_name/my_file.txt`` + - ``gs://bucket_name/my_directory`` + + This field is a member of `oneof`_ ``import_source``. + google_drive_source (google.cloud.aiplatform_v1.types.GoogleDriveSource): + Google Drive location. Supports importing + individual files as well as Google Drive + folders. + + This field is a member of `oneof`_ ``import_source``. + slack_source (google.cloud.aiplatform_v1.types.SlackSource): + Slack channels with their corresponding + access tokens. + + This field is a member of `oneof`_ ``import_source``. + jira_source (google.cloud.aiplatform_v1.types.JiraSource): + Jira queries with their corresponding + authentication. + + This field is a member of `oneof`_ ``import_source``. + share_point_sources (google.cloud.aiplatform_v1.types.SharePointSources): + SharePoint sources. + + This field is a member of `oneof`_ ``import_source``. + partial_failure_gcs_sink (google.cloud.aiplatform_v1.types.GcsDestination): + The Cloud Storage path to write partial failures to. + Deprecated. Prefer to use ``import_result_gcs_sink``. + + This field is a member of `oneof`_ ``partial_failure_sink``. + partial_failure_bigquery_sink (google.cloud.aiplatform_v1.types.BigQueryDestination): + The BigQuery destination to write partial failures to. It + should be a bigquery table resource name (e.g. + "bq://projectId.bqDatasetId.bqTableId"). The dataset must + exist. If the table does not exist, it will be created with + the expected schema. If the table exists, the schema will be + validated and data will be added to this existing table. + Deprecated. Prefer to use ``import_result_bq_sink``. + + This field is a member of `oneof`_ ``partial_failure_sink``. + import_result_gcs_sink (google.cloud.aiplatform_v1.types.GcsDestination): + The Cloud Storage path to write import result + to. + + This field is a member of `oneof`_ ``import_result_sink``. + import_result_bigquery_sink (google.cloud.aiplatform_v1.types.BigQueryDestination): + The BigQuery destination to write import + result to. It should be a bigquery table + resource name (e.g. + "bq://projectId.bqDatasetId.bqTableId"). The + dataset must exist. If the table does not exist, + it will be created with the expected schema. If + the table exists, the schema will be validated + and data will be added to this existing table. + + This field is a member of `oneof`_ ``import_result_sink``. + rag_file_transformation_config (google.cloud.aiplatform_v1.types.RagFileTransformationConfig): + Specifies the transformation config for + RagFiles. + rag_file_parsing_config (google.cloud.aiplatform_v1.types.RagFileParsingConfig): + Optional. Specifies the parsing config for + RagFiles. RAG will use the default parser if + this field is not set. + max_embedding_requests_per_min (int): + Optional. The max number of queries per + minute that this job is allowed to make to the + embedding model specified on the corpus. This + value is specific to this job and not shared + across other import jobs. Consult the Quotas + page on the project to set an appropriate value + here. If unspecified, a default value of 1,000 + QPM would be used. + rebuild_ann_index (bool): + Rebuilds the ANN index to optimize for recall on the + imported data. Only applicable for RagCorpora running on + RagManagedDb with ``retrieval_strategy`` set to ``ANN``. The + rebuild will be performed using the existing ANN config set + on the RagCorpus. To change the ANN config, please use the + UpdateRagCorpus API. + + Default is false, i.e., index is not rebuilt. + """ + + gcs_source: io.GcsSource = proto.Field( + proto.MESSAGE, + number=2, + oneof="import_source", + message=io.GcsSource, + ) + google_drive_source: io.GoogleDriveSource = proto.Field( + proto.MESSAGE, + number=3, + oneof="import_source", + message=io.GoogleDriveSource, + ) + slack_source: io.SlackSource = proto.Field( + proto.MESSAGE, + number=6, + oneof="import_source", + message=io.SlackSource, + ) + jira_source: io.JiraSource = proto.Field( + proto.MESSAGE, + number=7, + oneof="import_source", + message=io.JiraSource, + ) + share_point_sources: io.SharePointSources = proto.Field( + proto.MESSAGE, + number=13, + oneof="import_source", + message=io.SharePointSources, + ) + partial_failure_gcs_sink: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=11, + oneof="partial_failure_sink", + message=io.GcsDestination, + ) + partial_failure_bigquery_sink: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=12, + oneof="partial_failure_sink", + message=io.BigQueryDestination, + ) + import_result_gcs_sink: io.GcsDestination = proto.Field( + proto.MESSAGE, + number=14, + oneof="import_result_sink", + message=io.GcsDestination, + ) + import_result_bigquery_sink: io.BigQueryDestination = proto.Field( + proto.MESSAGE, + number=15, + oneof="import_result_sink", + message=io.BigQueryDestination, + ) + rag_file_transformation_config: "RagFileTransformationConfig" = proto.Field( + proto.MESSAGE, + number=16, + message="RagFileTransformationConfig", + ) + rag_file_parsing_config: "RagFileParsingConfig" = proto.Field( + proto.MESSAGE, + number=8, + message="RagFileParsingConfig", + ) + max_embedding_requests_per_min: int = proto.Field( + proto.INT32, + number=5, + ) + rebuild_ann_index: bool = proto.Field( + proto.BOOL, + number=19, + ) + + +class RagManagedDbConfig(proto.Message): + r"""Configuration message for RagManagedDb used by RagEngine. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + scaled (google.cloud.aiplatform_v1.types.RagManagedDbConfig.Scaled): + Sets the RagManagedDb to the Scaled tier. + + This field is a member of `oneof`_ ``tier``. + basic (google.cloud.aiplatform_v1.types.RagManagedDbConfig.Basic): + Sets the RagManagedDb to the Basic tier. + + This field is a member of `oneof`_ ``tier``. + unprovisioned (google.cloud.aiplatform_v1.types.RagManagedDbConfig.Unprovisioned): + Sets the RagManagedDb to the Unprovisioned + tier. + + This field is a member of `oneof`_ ``tier``. + """ + + class Scaled(proto.Message): + r"""Scaled tier offers production grade performance along with + autoscaling functionality. It is suitable for customers with + large amounts of data or performance sensitive workloads. + + """ + + class Basic(proto.Message): + r"""Basic tier is a cost-effective and low compute tier suitable for the + following cases: + + - Experimenting with RagManagedDb. + - Small data size. + - Latency insensitive workload. + - Only using RAG Engine with external vector DBs. + + NOTE: This is the default tier if not explicitly chosen. + + """ + + class Unprovisioned(proto.Message): + r"""Disables the RAG Engine service and deletes all your data + held within this service. This will halt the billing of the + service. + + NOTE: Once deleted the data cannot be recovered. To start using + RAG Engine again, you will need to update the tier by calling + the UpdateRagEngineConfig API. + + """ + + scaled: Scaled = proto.Field( + proto.MESSAGE, + number=4, + oneof="tier", + message=Scaled, + ) + basic: Basic = proto.Field( + proto.MESSAGE, + number=2, + oneof="tier", + message=Basic, + ) + unprovisioned: Unprovisioned = proto.Field( + proto.MESSAGE, + number=3, + oneof="tier", + message=Unprovisioned, + ) + + +class RagEngineConfig(proto.Message): + r"""Config for RagEngine. + + Attributes: + name (str): + Identifier. The name of the RagEngineConfig. Format: + ``projects/{project}/locations/{location}/ragEngineConfig`` + rag_managed_db_config (google.cloud.aiplatform_v1.types.RagManagedDbConfig): + The config of the RagManagedDb used by + RagEngine. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + rag_managed_db_config: "RagManagedDbConfig" = proto.Field( + proto.MESSAGE, + number=2, + message="RagManagedDbConfig", + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data_service.py new file mode 100644 index 0000000000000000000000000000000000000000..003164b00cfe42b811d1883d1b585b9b9e665369 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vertex_rag_data_service.py @@ -0,0 +1,572 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import vertex_rag_data +import google.rpc.status_pb2 as status_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "CreateRagCorpusRequest", + "GetRagCorpusRequest", + "ListRagCorporaRequest", + "ListRagCorporaResponse", + "DeleteRagCorpusRequest", + "UploadRagFileRequest", + "UploadRagFileResponse", + "ImportRagFilesRequest", + "ImportRagFilesResponse", + "GetRagFileRequest", + "ListRagFilesRequest", + "ListRagFilesResponse", + "DeleteRagFileRequest", + "CreateRagCorpusOperationMetadata", + "GetRagEngineConfigRequest", + "UpdateRagCorpusRequest", + "UpdateRagCorpusOperationMetadata", + "ImportRagFilesOperationMetadata", + "UpdateRagEngineConfigRequest", + "UpdateRagEngineConfigOperationMetadata", + }, +) + + +class CreateRagCorpusRequest(proto.Message): + r"""Request message for + [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + RagCorpus in. Format: + ``projects/{project}/locations/{location}`` + rag_corpus (google.cloud.aiplatform_v1.types.RagCorpus): + Required. The RagCorpus to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + rag_corpus: vertex_rag_data.RagCorpus = proto.Field( + proto.MESSAGE, + number=2, + message=vertex_rag_data.RagCorpus, + ) + + +class GetRagCorpusRequest(proto.Message): + r"""Request message for + [VertexRagDataService.GetRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.GetRagCorpus] + + Attributes: + name (str): + Required. The name of the RagCorpus resource. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListRagCorporaRequest(proto.Message): + r"""Request message for + [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]. + + Attributes: + parent (str): + Required. The resource name of the Location from which to + list the RagCorpora. Format: + ``projects/{project}/locations/{location}`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListRagCorporaResponse.next_page_token][google.cloud.aiplatform.v1.ListRagCorporaResponse.next_page_token] + of the previous + [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora] + call. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListRagCorporaResponse(proto.Message): + r"""Response message for + [VertexRagDataService.ListRagCorpora][google.cloud.aiplatform.v1.VertexRagDataService.ListRagCorpora]. + + Attributes: + rag_corpora (MutableSequence[google.cloud.aiplatform_v1.types.RagCorpus]): + List of RagCorpora in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListRagCorporaRequest.page_token][google.cloud.aiplatform.v1.ListRagCorporaRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + rag_corpora: MutableSequence[vertex_rag_data.RagCorpus] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=vertex_rag_data.RagCorpus, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteRagCorpusRequest(proto.Message): + r"""Request message for + [VertexRagDataService.DeleteRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagCorpus]. + + Attributes: + name (str): + Required. The name of the RagCorpus resource to be deleted. + Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + force (bool): + Optional. If set to true, any RagFiles in + this RagCorpus will also be deleted. Otherwise, + the request will only work if the RagCorpus has + no RagFiles. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + force: bool = proto.Field( + proto.BOOL, + number=2, + ) + + +class UploadRagFileRequest(proto.Message): + r"""Request message for + [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + + Attributes: + parent (str): + Required. The name of the RagCorpus resource into which to + upload the file. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + rag_file (google.cloud.aiplatform_v1.types.RagFile): + Required. The RagFile to upload. + upload_rag_file_config (google.cloud.aiplatform_v1.types.UploadRagFileConfig): + Required. The config for the RagFiles to be uploaded into + the RagCorpus. + [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + rag_file: vertex_rag_data.RagFile = proto.Field( + proto.MESSAGE, + number=2, + message=vertex_rag_data.RagFile, + ) + upload_rag_file_config: vertex_rag_data.UploadRagFileConfig = proto.Field( + proto.MESSAGE, + number=5, + message=vertex_rag_data.UploadRagFileConfig, + ) + + +class UploadRagFileResponse(proto.Message): + r"""Response message for + [VertexRagDataService.UploadRagFile][google.cloud.aiplatform.v1.VertexRagDataService.UploadRagFile]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + rag_file (google.cloud.aiplatform_v1.types.RagFile): + The RagFile that had been uploaded into the + RagCorpus. + + This field is a member of `oneof`_ ``result``. + error (google.rpc.status_pb2.Status): + The error that occurred while processing the + RagFile. + + This field is a member of `oneof`_ ``result``. + """ + + rag_file: vertex_rag_data.RagFile = proto.Field( + proto.MESSAGE, + number=1, + oneof="result", + message=vertex_rag_data.RagFile, + ) + error: status_pb2.Status = proto.Field( + proto.MESSAGE, + number=4, + oneof="result", + message=status_pb2.Status, + ) + + +class ImportRagFilesRequest(proto.Message): + r"""Request message for + [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + + Attributes: + parent (str): + Required. The name of the RagCorpus resource into which to + import files. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + import_rag_files_config (google.cloud.aiplatform_v1.types.ImportRagFilesConfig): + Required. The config for the RagFiles to be synced and + imported into the RagCorpus. + [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + import_rag_files_config: vertex_rag_data.ImportRagFilesConfig = proto.Field( + proto.MESSAGE, + number=2, + message=vertex_rag_data.ImportRagFilesConfig, + ) + + +class ImportRagFilesResponse(proto.Message): + r"""Response message for + [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + partial_failures_gcs_path (str): + The Google Cloud Storage path into which the + partial failures were written. + + This field is a member of `oneof`_ ``partial_failure_sink``. + partial_failures_bigquery_table (str): + The BigQuery table into which the partial + failures were written. + + This field is a member of `oneof`_ ``partial_failure_sink``. + imported_rag_files_count (int): + The number of RagFiles that had been imported + into the RagCorpus. + failed_rag_files_count (int): + The number of RagFiles that had failed while + importing into the RagCorpus. + skipped_rag_files_count (int): + The number of RagFiles that was skipped while + importing into the RagCorpus. + """ + + partial_failures_gcs_path: str = proto.Field( + proto.STRING, + number=4, + oneof="partial_failure_sink", + ) + partial_failures_bigquery_table: str = proto.Field( + proto.STRING, + number=5, + oneof="partial_failure_sink", + ) + imported_rag_files_count: int = proto.Field( + proto.INT64, + number=1, + ) + failed_rag_files_count: int = proto.Field( + proto.INT64, + number=2, + ) + skipped_rag_files_count: int = proto.Field( + proto.INT64, + number=3, + ) + + +class GetRagFileRequest(proto.Message): + r"""Request message for + [VertexRagDataService.GetRagFile][google.cloud.aiplatform.v1.VertexRagDataService.GetRagFile] + + Attributes: + name (str): + Required. The name of the RagFile resource. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListRagFilesRequest(proto.Message): + r"""Request message for + [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]. + + Attributes: + parent (str): + Required. The resource name of the RagCorpus from which to + list the RagFiles. Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}`` + page_size (int): + Optional. The standard list page size. + page_token (str): + Optional. The standard list page token. Typically obtained + via + [ListRagFilesResponse.next_page_token][google.cloud.aiplatform.v1.ListRagFilesResponse.next_page_token] + of the previous + [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles] + call. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_size: int = proto.Field( + proto.INT32, + number=2, + ) + page_token: str = proto.Field( + proto.STRING, + number=3, + ) + + +class ListRagFilesResponse(proto.Message): + r"""Response message for + [VertexRagDataService.ListRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ListRagFiles]. + + Attributes: + rag_files (MutableSequence[google.cloud.aiplatform_v1.types.RagFile]): + List of RagFiles in the requested page. + next_page_token (str): + A token to retrieve the next page of results. Pass to + [ListRagFilesRequest.page_token][google.cloud.aiplatform.v1.ListRagFilesRequest.page_token] + to obtain that page. + """ + + @property + def raw_page(self): + return self + + rag_files: MutableSequence[vertex_rag_data.RagFile] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=vertex_rag_data.RagFile, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteRagFileRequest(proto.Message): + r"""Request message for + [VertexRagDataService.DeleteRagFile][google.cloud.aiplatform.v1.VertexRagDataService.DeleteRagFile]. + + Attributes: + name (str): + Required. The name of the RagFile resource to be deleted. + Format: + ``projects/{project}/locations/{location}/ragCorpora/{rag_corpus}/ragFiles/{rag_file}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateRagCorpusOperationMetadata(proto.Message): + r"""Runtime operation information for + [VertexRagDataService.CreateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.CreateRagCorpus]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class GetRagEngineConfigRequest(proto.Message): + r"""Request message for + [VertexRagDataService.GetRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.GetRagEngineConfig] + + Attributes: + name (str): + Required. The name of the RagEngineConfig resource. Format: + ``projects/{project}/locations/{location}/ragEngineConfig`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class UpdateRagCorpusRequest(proto.Message): + r"""Request message for + [VertexRagDataService.UpdateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus]. + + Attributes: + rag_corpus (google.cloud.aiplatform_v1.types.RagCorpus): + Required. The RagCorpus which replaces the + resource on the server. + """ + + rag_corpus: vertex_rag_data.RagCorpus = proto.Field( + proto.MESSAGE, + number=1, + message=vertex_rag_data.RagCorpus, + ) + + +class UpdateRagCorpusOperationMetadata(proto.Message): + r"""Runtime operation information for + [VertexRagDataService.UpdateRagCorpus][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagCorpus]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +class ImportRagFilesOperationMetadata(proto.Message): + r"""Runtime operation information for + [VertexRagDataService.ImportRagFiles][google.cloud.aiplatform.v1.VertexRagDataService.ImportRagFiles]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + rag_corpus_id (int): + The resource ID of RagCorpus that this + operation is executed on. + import_rag_files_config (google.cloud.aiplatform_v1.types.ImportRagFilesConfig): + Output only. The config that was passed in + the ImportRagFilesRequest. + progress_percentage (int): + The progress percentage of the operation. Value is in the + range [0, 100]. This percentage is calculated as follows: + progress_percentage = 100 \* (successes + failures + skips) + / total + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + rag_corpus_id: int = proto.Field( + proto.INT64, + number=2, + ) + import_rag_files_config: vertex_rag_data.ImportRagFilesConfig = proto.Field( + proto.MESSAGE, + number=3, + message=vertex_rag_data.ImportRagFilesConfig, + ) + progress_percentage: int = proto.Field( + proto.INT32, + number=4, + ) + + +class UpdateRagEngineConfigRequest(proto.Message): + r"""Request message for + [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig]. + + Attributes: + rag_engine_config (google.cloud.aiplatform_v1.types.RagEngineConfig): + Required. The updated RagEngineConfig. + + NOTE: Downgrading your RagManagedDb's + ComputeTier could temporarily increase request + latencies until the operation is fully complete. + """ + + rag_engine_config: vertex_rag_data.RagEngineConfig = proto.Field( + proto.MESSAGE, + number=1, + message=vertex_rag_data.RagEngineConfig, + ) + + +class UpdateRagEngineConfigOperationMetadata(proto.Message): + r"""Runtime operation information for + [VertexRagDataService.UpdateRagEngineConfig][google.cloud.aiplatform.v1.VertexRagDataService.UpdateRagEngineConfig]. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + The operation generic information. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vizier_service.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vizier_service.py new file mode 100644 index 0000000000000000000000000000000000000000..523522e2fd12986673d7754216b6102b281a23e3 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/aiplatform_v1/types/vizier_service.py @@ -0,0 +1,640 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.cloud.aiplatform_v1.types import operation +from google.cloud.aiplatform_v1.types import study as gca_study +import google.protobuf.timestamp_pb2 as timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package="google.cloud.aiplatform.v1", + manifest={ + "GetStudyRequest", + "CreateStudyRequest", + "ListStudiesRequest", + "ListStudiesResponse", + "DeleteStudyRequest", + "LookupStudyRequest", + "SuggestTrialsRequest", + "SuggestTrialsResponse", + "SuggestTrialsMetadata", + "CreateTrialRequest", + "GetTrialRequest", + "ListTrialsRequest", + "ListTrialsResponse", + "AddTrialMeasurementRequest", + "CompleteTrialRequest", + "DeleteTrialRequest", + "CheckTrialEarlyStoppingStateRequest", + "CheckTrialEarlyStoppingStateResponse", + "CheckTrialEarlyStoppingStateMetatdata", + "StopTrialRequest", + "ListOptimalTrialsRequest", + "ListOptimalTrialsResponse", + }, +) + + +class GetStudyRequest(proto.Message): + r"""Request message for + [VizierService.GetStudy][google.cloud.aiplatform.v1.VizierService.GetStudy]. + + Attributes: + name (str): + Required. The name of the Study resource. Format: + ``projects/{project}/locations/{location}/studies/{study}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CreateStudyRequest(proto.Message): + r"""Request message for + [VizierService.CreateStudy][google.cloud.aiplatform.v1.VizierService.CreateStudy]. + + Attributes: + parent (str): + Required. The resource name of the Location to create the + CustomJob in. Format: + ``projects/{project}/locations/{location}`` + study (google.cloud.aiplatform_v1.types.Study): + Required. The Study configuration used to + create the Study. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + study: gca_study.Study = proto.Field( + proto.MESSAGE, + number=2, + message=gca_study.Study, + ) + + +class ListStudiesRequest(proto.Message): + r"""Request message for + [VizierService.ListStudies][google.cloud.aiplatform.v1.VizierService.ListStudies]. + + Attributes: + parent (str): + Required. The resource name of the Location to list the + Study from. Format: + ``projects/{project}/locations/{location}`` + page_token (str): + Optional. A page token to request the next + page of results. If unspecified, there are no + subsequent pages. + page_size (int): + Optional. The maximum number of studies to + return per "page" of results. If unspecified, + service will pick an appropriate default. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_token: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + + +class ListStudiesResponse(proto.Message): + r"""Response message for + [VizierService.ListStudies][google.cloud.aiplatform.v1.VizierService.ListStudies]. + + Attributes: + studies (MutableSequence[google.cloud.aiplatform_v1.types.Study]): + The studies associated with the project. + next_page_token (str): + Passes this token as the ``page_token`` field of the request + for a subsequent call. If this field is omitted, there are + no subsequent pages. + """ + + @property + def raw_page(self): + return self + + studies: MutableSequence[gca_study.Study] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_study.Study, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class DeleteStudyRequest(proto.Message): + r"""Request message for + [VizierService.DeleteStudy][google.cloud.aiplatform.v1.VizierService.DeleteStudy]. + + Attributes: + name (str): + Required. The name of the Study resource to be deleted. + Format: + ``projects/{project}/locations/{location}/studies/{study}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class LookupStudyRequest(proto.Message): + r"""Request message for + [VizierService.LookupStudy][google.cloud.aiplatform.v1.VizierService.LookupStudy]. + + Attributes: + parent (str): + Required. The resource name of the Location to get the Study + from. Format: ``projects/{project}/locations/{location}`` + display_name (str): + Required. The user-defined display name of + the Study + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + display_name: str = proto.Field( + proto.STRING, + number=2, + ) + + +class SuggestTrialsRequest(proto.Message): + r"""Request message for + [VizierService.SuggestTrials][google.cloud.aiplatform.v1.VizierService.SuggestTrials]. + + Attributes: + parent (str): + Required. The project and location that the Study belongs + to. Format: + ``projects/{project}/locations/{location}/studies/{study}`` + suggestion_count (int): + Required. The number of suggestions + requested. It must be positive. + client_id (str): + Required. The identifier of the client that is requesting + the suggestion. + + If multiple SuggestTrialsRequests have the same + ``client_id``, the service will return the identical + suggested Trial if the Trial is pending, and provide a new + Trial if the last suggested Trial was completed. + contexts (MutableSequence[google.cloud.aiplatform_v1.types.TrialContext]): + Optional. This allows you to specify the "context" for a + Trial; a context is a slice (a subspace) of the search + space. + + Typical uses for contexts: + + 1) You are using Vizier to tune a server for best + performance, but there's a strong weekly cycle. The + context specifies the day-of-week. This allows Tuesday to + generalize from Wednesday without assuming that + everything is identical. + 2) Imagine you're optimizing some medical treatment for + people. As they walk in the door, you know certain facts + about them (e.g. sex, weight, height, blood-pressure). + Put that information in the context, and Vizier will + adapt its suggestions to the patient. + 3) You want to do a fair A/B test efficiently. Specify the + "A" and "B" conditions as contexts, and Vizier will + generalize between "A" and "B" conditions. If they are + similar, this will allow Vizier to converge to the + optimum faster than if "A" and "B" were separate Studies. + NOTE: You can also enter contexts as REQUESTED Trials, + e.g. via the CreateTrial() RPC; that's the asynchronous + option where you don't need a close association between + contexts and suggestions. + + NOTE: All the Parameters you set in a context MUST be + defined in the Study. NOTE: You must supply 0 or + $suggestion_count contexts. If you don't supply any + contexts, Vizier will make suggestions from the full search + space specified in the StudySpec; if you supply a full set + of context, each suggestion will match the corresponding + context. NOTE: A Context with no features set matches + anything, and allows suggestions from the full search space. + NOTE: Contexts MUST lie within the search space specified in + the StudySpec. It's an error if they don't. NOTE: Contexts + preferentially match ACTIVE then REQUESTED trials before new + suggestions are generated. NOTE: Generation of suggestions + involves a match between a Context and (optionally) a + REQUESTED trial; if that match is not fully specified, a + suggestion will be geneated in the merged subspace. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + suggestion_count: int = proto.Field( + proto.INT32, + number=2, + ) + client_id: str = proto.Field( + proto.STRING, + number=3, + ) + contexts: MutableSequence[gca_study.TrialContext] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message=gca_study.TrialContext, + ) + + +class SuggestTrialsResponse(proto.Message): + r"""Response message for + [VizierService.SuggestTrials][google.cloud.aiplatform.v1.VizierService.SuggestTrials]. + + Attributes: + trials (MutableSequence[google.cloud.aiplatform_v1.types.Trial]): + A list of Trials. + study_state (google.cloud.aiplatform_v1.types.Study.State): + The state of the Study. + start_time (google.protobuf.timestamp_pb2.Timestamp): + The time at which the operation was started. + end_time (google.protobuf.timestamp_pb2.Timestamp): + The time at which operation processing + completed. + """ + + trials: MutableSequence[gca_study.Trial] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_study.Trial, + ) + study_state: gca_study.Study.State = proto.Field( + proto.ENUM, + number=2, + enum=gca_study.Study.State, + ) + start_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + end_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + + +class SuggestTrialsMetadata(proto.Message): + r"""Details of operations that perform Trials suggestion. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for suggesting Trials. + client_id (str): + The identifier of the client that is requesting the + suggestion. + + If multiple SuggestTrialsRequests have the same + ``client_id``, the service will return the identical + suggested Trial if the Trial is pending, and provide a new + Trial if the last suggested Trial was completed. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + client_id: str = proto.Field( + proto.STRING, + number=2, + ) + + +class CreateTrialRequest(proto.Message): + r"""Request message for + [VizierService.CreateTrial][google.cloud.aiplatform.v1.VizierService.CreateTrial]. + + Attributes: + parent (str): + Required. The resource name of the Study to create the Trial + in. Format: + ``projects/{project}/locations/{location}/studies/{study}`` + trial (google.cloud.aiplatform_v1.types.Trial): + Required. The Trial to create. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + trial: gca_study.Trial = proto.Field( + proto.MESSAGE, + number=2, + message=gca_study.Trial, + ) + + +class GetTrialRequest(proto.Message): + r"""Request message for + [VizierService.GetTrial][google.cloud.aiplatform.v1.VizierService.GetTrial]. + + Attributes: + name (str): + Required. The name of the Trial resource. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListTrialsRequest(proto.Message): + r"""Request message for + [VizierService.ListTrials][google.cloud.aiplatform.v1.VizierService.ListTrials]. + + Attributes: + parent (str): + Required. The resource name of the Study to list the Trial + from. Format: + ``projects/{project}/locations/{location}/studies/{study}`` + page_token (str): + Optional. A page token to request the next + page of results. If unspecified, there are no + subsequent pages. + page_size (int): + Optional. The number of Trials to retrieve + per "page" of results. If unspecified, the + service will pick an appropriate default. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + page_token: str = proto.Field( + proto.STRING, + number=2, + ) + page_size: int = proto.Field( + proto.INT32, + number=3, + ) + + +class ListTrialsResponse(proto.Message): + r"""Response message for + [VizierService.ListTrials][google.cloud.aiplatform.v1.VizierService.ListTrials]. + + Attributes: + trials (MutableSequence[google.cloud.aiplatform_v1.types.Trial]): + The Trials associated with the Study. + next_page_token (str): + Pass this token as the ``page_token`` field of the request + for a subsequent call. If this field is omitted, there are + no subsequent pages. + """ + + @property + def raw_page(self): + return self + + trials: MutableSequence[gca_study.Trial] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_study.Trial, + ) + next_page_token: str = proto.Field( + proto.STRING, + number=2, + ) + + +class AddTrialMeasurementRequest(proto.Message): + r"""Request message for + [VizierService.AddTrialMeasurement][google.cloud.aiplatform.v1.VizierService.AddTrialMeasurement]. + + Attributes: + trial_name (str): + Required. The name of the trial to add measurement. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + measurement (google.cloud.aiplatform_v1.types.Measurement): + Required. The measurement to be added to a + Trial. + """ + + trial_name: str = proto.Field( + proto.STRING, + number=1, + ) + measurement: gca_study.Measurement = proto.Field( + proto.MESSAGE, + number=3, + message=gca_study.Measurement, + ) + + +class CompleteTrialRequest(proto.Message): + r"""Request message for + [VizierService.CompleteTrial][google.cloud.aiplatform.v1.VizierService.CompleteTrial]. + + Attributes: + name (str): + Required. The Trial's name. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + final_measurement (google.cloud.aiplatform_v1.types.Measurement): + Optional. If provided, it will be used as the completed + Trial's final_measurement; Otherwise, the service will + auto-select a previously reported measurement as the + final-measurement + trial_infeasible (bool): + Optional. True if the Trial cannot be run with the given + Parameter, and final_measurement will be ignored. + infeasible_reason (str): + Optional. A human readable reason why the trial was + infeasible. This should only be provided if + ``trial_infeasible`` is true. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + final_measurement: gca_study.Measurement = proto.Field( + proto.MESSAGE, + number=2, + message=gca_study.Measurement, + ) + trial_infeasible: bool = proto.Field( + proto.BOOL, + number=3, + ) + infeasible_reason: str = proto.Field( + proto.STRING, + number=4, + ) + + +class DeleteTrialRequest(proto.Message): + r"""Request message for + [VizierService.DeleteTrial][google.cloud.aiplatform.v1.VizierService.DeleteTrial]. + + Attributes: + name (str): + Required. The Trial's name. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CheckTrialEarlyStoppingStateRequest(proto.Message): + r"""Request message for + [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]. + + Attributes: + trial_name (str): + Required. The Trial's name. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + """ + + trial_name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class CheckTrialEarlyStoppingStateResponse(proto.Message): + r"""Response message for + [VizierService.CheckTrialEarlyStoppingState][google.cloud.aiplatform.v1.VizierService.CheckTrialEarlyStoppingState]. + + Attributes: + should_stop (bool): + True if the Trial should stop. + """ + + should_stop: bool = proto.Field( + proto.BOOL, + number=1, + ) + + +class CheckTrialEarlyStoppingStateMetatdata(proto.Message): + r"""This message will be placed in the metadata field of a + google.longrunning.Operation associated with a + CheckTrialEarlyStoppingState request. + + Attributes: + generic_metadata (google.cloud.aiplatform_v1.types.GenericOperationMetadata): + Operation metadata for suggesting Trials. + study (str): + The name of the Study that the Trial belongs + to. + trial (str): + The Trial name. + """ + + generic_metadata: operation.GenericOperationMetadata = proto.Field( + proto.MESSAGE, + number=1, + message=operation.GenericOperationMetadata, + ) + study: str = proto.Field( + proto.STRING, + number=2, + ) + trial: str = proto.Field( + proto.STRING, + number=3, + ) + + +class StopTrialRequest(proto.Message): + r"""Request message for + [VizierService.StopTrial][google.cloud.aiplatform.v1.VizierService.StopTrial]. + + Attributes: + name (str): + Required. The Trial's name. Format: + ``projects/{project}/locations/{location}/studies/{study}/trials/{trial}`` + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListOptimalTrialsRequest(proto.Message): + r"""Request message for + [VizierService.ListOptimalTrials][google.cloud.aiplatform.v1.VizierService.ListOptimalTrials]. + + Attributes: + parent (str): + Required. The name of the Study that the + optimal Trial belongs to. + """ + + parent: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ListOptimalTrialsResponse(proto.Message): + r"""Response message for + [VizierService.ListOptimalTrials][google.cloud.aiplatform.v1.VizierService.ListOptimalTrials]. + + Attributes: + optimal_trials (MutableSequence[google.cloud.aiplatform_v1.types.Trial]): + The pareto-optimal Trials for multiple objective Study or + the optimal trial for single objective Study. The definition + of pareto-optimal can be checked in wiki page. + https://en.wikipedia.org/wiki/Pareto_efficiency + """ + + optimal_trials: MutableSequence[gca_study.Trial] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message=gca_study.Trial, + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/__init__.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..9ce476306b593cedfb9a0f4a36f03ea0de09b421 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/__init__.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/async_client.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/async_client.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4b0397ce19fd247904e95fed85680e04770829cb Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/async_client.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/client.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/client.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..6b46f8d974da2d6bf5cfa45003cababfb39ab5c8 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/__pycache__/client.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__init__.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..cdf70a314ea2ba4cbcee511d34a7d0ff3ffab98a --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import BigQueryReadTransport +from .grpc import BigQueryReadGrpcTransport +from .grpc_asyncio import BigQueryReadGrpcAsyncIOTransport + +# Compile a registry of transports. +_transport_registry = OrderedDict() # type: Dict[str, Type[BigQueryReadTransport]] +_transport_registry["grpc"] = BigQueryReadGrpcTransport +_transport_registry["grpc_asyncio"] = BigQueryReadGrpcAsyncIOTransport + +__all__ = ( + "BigQueryReadTransport", + "BigQueryReadGrpcTransport", + "BigQueryReadGrpcAsyncIOTransport", +) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/__init__.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..d114933c8af5497a273dddaa5090607f5e70e5ca Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/__init__.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/base.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/base.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..aa2850c861e68b32fb6b080ece6a057d9f45e640 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/base.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..a1838d69bf81a6ab01b157d46534fd08d49bed5a Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc_asyncio.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc_asyncio.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..1d723a73d29ad7e96d4dcfa785189d87fc7a48a1 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/__pycache__/grpc_asyncio.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py new file mode 100644 index 0000000000000000000000000000000000000000..e0f3f00ec2cbf80ab1e16d0db8b6e8b03766fcc1 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/base.py @@ -0,0 +1,237 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +import google.auth # type: ignore +import google.protobuf +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore + +from google.cloud.bigquery_storage_v1 import gapic_version as package_version +from google.cloud.bigquery_storage_v1.types import storage, stream + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class BigQueryReadTransport(abc.ABC): + """Abstract transport class for BigQueryRead.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "bigquerystorage.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'bigquerystorage.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + api_audience (Optional[str]): The intended audience for the API calls + to the service that will be set when using certain 3rd party + authentication flows. Audience is typically a resource identifier. + If not set, the host value will be used as a default. + """ + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + self._wrapped_methods: Dict[Callable, Callable] = {} + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.create_read_session: gapic_v1.method.wrap_method( + self.create_read_session, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + self.read_rows: gapic_v1.method.wrap_method( + self.read_rows, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=86400.0, + ), + default_timeout=86400.0, + client_info=client_info, + ), + self.split_read_stream: gapic_v1.method.wrap_method( + self.split_read_stream, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def create_read_session( + self, + ) -> Callable[ + [storage.CreateReadSessionRequest], + Union[stream.ReadSession, Awaitable[stream.ReadSession]], + ]: + raise NotImplementedError() + + @property + def read_rows( + self, + ) -> Callable[ + [storage.ReadRowsRequest], + Union[storage.ReadRowsResponse, Awaitable[storage.ReadRowsResponse]], + ]: + raise NotImplementedError() + + @property + def split_read_stream( + self, + ) -> Callable[ + [storage.SplitReadStreamRequest], + Union[ + storage.SplitReadStreamResponse, Awaitable[storage.SplitReadStreamResponse] + ], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + +__all__ = ("BigQueryReadTransport",) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py new file mode 100644 index 0000000000000000000000000000000000000000..f778c0aabdd7716019c426bc851d43639aa1cc01 --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc.py @@ -0,0 +1,457 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import json +import logging as std_logging +import pickle +import warnings +from typing import Callable, Dict, Optional, Sequence, Tuple, Union + +import google.auth # type: ignore +import google.protobuf.message +import grpc # type: ignore +import proto # type: ignore +from google.api_core import gapic_v1, grpc_helpers +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.protobuf.json_format import MessageToJson + +from google.cloud.bigquery_storage_v1.types import storage, stream + +from .base import DEFAULT_CLIENT_INFO, BigQueryReadTransport + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + + +class _LoggingClientInterceptor(grpc.UnaryUnaryClientInterceptor): # pragma: NO COVER + def intercept_unary_unary(self, continuation, client_call_details, request): + logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ) + if logging_enabled: # pragma: NO COVER + request_metadata = client_call_details.metadata + if isinstance(request, proto.Message): + request_payload = type(request).to_json(request) + elif isinstance(request, google.protobuf.message.Message): + request_payload = MessageToJson(request) + else: + request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}" + + request_metadata = { + key: value.decode("utf-8") if isinstance(value, bytes) else value + for key, value in request_metadata + } + grpc_request = { + "payload": request_payload, + "requestMethod": "grpc", + "metadata": dict(request_metadata), + } + _LOGGER.debug( + f"Sending request for {client_call_details.method}", + extra={ + "serviceName": "google.cloud.bigquery.storage.v1.BigQueryRead", + "rpcName": str(client_call_details.method), + "request": grpc_request, + "metadata": grpc_request["metadata"], + }, + ) + response = continuation(client_call_details, request) + if logging_enabled: # pragma: NO COVER + response_metadata = response.trailing_metadata() + # Convert gRPC metadata `` to list of tuples + metadata = ( + dict([(k, str(v)) for k, v in response_metadata]) + if response_metadata + else None + ) + result = response.result() + if isinstance(result, proto.Message): + response_payload = type(result).to_json(result) + elif isinstance(result, google.protobuf.message.Message): + response_payload = MessageToJson(result) + else: + response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}" + grpc_response = { + "payload": response_payload, + "metadata": metadata, + "status": "OK", + } + _LOGGER.debug( + f"Received response for {client_call_details.method}.", + extra={ + "serviceName": "google.cloud.bigquery.storage.v1.BigQueryRead", + "rpcName": client_call_details.method, + "response": grpc_response, + "metadata": grpc_response["metadata"], + }, + ) + return response + + +class BigQueryReadGrpcTransport(BigQueryReadTransport): + """gRPC backend transport for BigQueryRead. + + BigQuery Read API. + + The Read API can be used to read data from BigQuery. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends protocol buffers over the wire using gRPC (which is built on + top of HTTP/2); the ``grpcio`` package must be installed. + """ + + _stubs: Dict[str, Callable] + + def __init__( + self, + *, + host: str = "bigquerystorage.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'bigquerystorage.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is ignored if a ``channel`` instance is provided. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if a ``channel`` instance is provided. + This argument will be removed in the next major version of this library. + scopes (Optional(Sequence[str])): A list of scopes. This argument is + ignored if a ``channel`` instance is provided. + channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]): + A ``Channel`` instance through which to make calls, or a Callable + that constructs and returns one. If set to None, ``self.create_channel`` + is used to create the channel. If a Callable is given, it will be called + with the same arguments as used in ``self.create_channel``. + api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. + If provided, it overrides the ``host`` argument and tries to create + a mutual TLS channel with client SSL credentials from + ``client_cert_source`` or application default SSL credentials. + client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): + Deprecated. A callback to provide client SSL certificate bytes and + private key bytes, both in PEM format. It is ignored if + ``api_mtls_endpoint`` is None. + ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials + for the grpc channel. It is ignored if a ``channel`` instance is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure a mutual TLS channel. It is + ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + api_audience (Optional[str]): The intended audience for the API calls + to the service that will be set when using certain 3rd party + authentication flows. Audience is typically a resource identifier. + If not set, the host value will be used as a default. + + Raises: + google.auth.exceptions.MutualTLSChannelError: If mutual TLS transport + creation failed for any reason. + google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` + and ``credentials_file`` are passed. + """ + self._grpc_channel = None + self._ssl_channel_credentials = ssl_channel_credentials + self._stubs: Dict[str, Callable] = {} + + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + + if isinstance(channel, grpc.Channel): + # Ignore credentials if a channel was passed. + credentials = None + self._ignore_credentials = True + # If a channel was explicitly provided, set it. + self._grpc_channel = channel + self._ssl_channel_credentials = None + + else: + if api_mtls_endpoint: + host = api_mtls_endpoint + + # Create SSL credentials with client_cert_source or application + # default SSL credentials. + if client_cert_source: + cert, key = client_cert_source() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + else: + self._ssl_channel_credentials = SslCredentials().ssl_credentials + + else: + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + + # The base transport sets the host, credentials and scopes + super().__init__( + host=host, + credentials=credentials, + credentials_file=credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + if not self._grpc_channel: + # initialize with the provided callable or the default channel + channel_init = channel or type(self).create_channel + self._grpc_channel = channel_init( + self._host, + # use the credentials which are saved + credentials=self._credentials, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, + scopes=self._scopes, + ssl_credentials=self._ssl_channel_credentials, + quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + self._interceptor = _LoggingClientInterceptor() + self._logged_channel = grpc.intercept_channel( + self._grpc_channel, self._interceptor + ) + + # Wrap messages. This must be done after self._logged_channel exists + self._prep_wrapped_messages(client_info) + + @classmethod + def create_channel( + cls, + host: str = "bigquerystorage.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + **kwargs, + ) -> grpc.Channel: + """Create and return a gRPC channel object. + Args: + host (Optional[str]): The host for the channel to use. + credentials (Optional[~.Credentials]): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A optional list of scopes needed for this + service. These are only used when credentials are not specified and + are passed to :func:`google.auth.default`. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + kwargs (Optional[dict]): Keyword arguments, which are passed to the + channel creation. + Returns: + grpc.Channel: A gRPC channel object. + + Raises: + google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` + and ``credentials_file`` are passed. + """ + + return grpc_helpers.create_channel( + host, + credentials=credentials, + credentials_file=credentials_file, + quota_project_id=quota_project_id, + default_scopes=cls.AUTH_SCOPES, + scopes=scopes, + default_host=cls.DEFAULT_HOST, + **kwargs, + ) + + @property + def grpc_channel(self) -> grpc.Channel: + """Return the channel designed to connect to this service.""" + return self._grpc_channel + + @property + def create_read_session( + self, + ) -> Callable[[storage.CreateReadSessionRequest], stream.ReadSession]: + r"""Return a callable for the create read session method over gRPC. + + Creates a new read session. A read session divides + the contents of a BigQuery table into one or more + streams, which can then be used to read data from the + table. The read session also specifies properties of the + data to be read, such as a list of columns or a + push-down filter describing the rows to be returned. + + A particular row can be read by at most one stream. When + the caller has reached the end of each stream in the + session, then all the data in the table has been read. + + Data is assigned to each stream such that roughly the + same number of rows can be read from each stream. + Because the server-side unit for assigning data is + collections of rows, the API does not guarantee that + each stream will return the same number or rows. + Additionally, the limits are enforced based on the + number of pre-filtered rows, so some filters can lead to + lopsided assignments. + + Read sessions automatically expire 6 hours after they + are created and do not require manual clean-up by the + caller. + + Returns: + Callable[[~.CreateReadSessionRequest], + ~.ReadSession]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_read_session" not in self._stubs: + self._stubs["create_read_session"] = self._logged_channel.unary_unary( + "/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession", + request_serializer=storage.CreateReadSessionRequest.serialize, + response_deserializer=stream.ReadSession.deserialize, + ) + return self._stubs["create_read_session"] + + @property + def read_rows( + self, + ) -> Callable[[storage.ReadRowsRequest], storage.ReadRowsResponse]: + r"""Return a callable for the read rows method over gRPC. + + Reads rows from the stream in the format prescribed + by the ReadSession. Each response contains one or more + table rows, up to a maximum of 128 MB per response; read + requests which attempt to read individual rows larger + than 128 MB will fail. + + Each request also returns a set of stream statistics + reflecting the current state of the stream. + + Returns: + Callable[[~.ReadRowsRequest], + ~.ReadRowsResponse]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "read_rows" not in self._stubs: + self._stubs["read_rows"] = self._logged_channel.unary_stream( + "/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows", + request_serializer=storage.ReadRowsRequest.serialize, + response_deserializer=storage.ReadRowsResponse.deserialize, + ) + return self._stubs["read_rows"] + + @property + def split_read_stream( + self, + ) -> Callable[[storage.SplitReadStreamRequest], storage.SplitReadStreamResponse]: + r"""Return a callable for the split read stream method over gRPC. + + Splits a given ``ReadStream`` into two ``ReadStream`` objects. + These ``ReadStream`` objects are referred to as the primary and + the residual streams of the split. The original ``ReadStream`` + can still be read from in the same manner as before. Both of the + returned ``ReadStream`` objects can also be read from, and the + rows returned by both child streams will be the same as the rows + read from the original stream. + + Moreover, the two child streams will be allocated back-to-back + in the original ``ReadStream``. Concretely, it is guaranteed + that for streams original, primary, and residual, that + original[0-j] = primary[0-j] and original[j-n] = residual[0-m] + once the streams have been read to completion. + + Returns: + Callable[[~.SplitReadStreamRequest], + ~.SplitReadStreamResponse]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "split_read_stream" not in self._stubs: + self._stubs["split_read_stream"] = self._logged_channel.unary_unary( + "/google.cloud.bigquery.storage.v1.BigQueryRead/SplitReadStream", + request_serializer=storage.SplitReadStreamRequest.serialize, + response_deserializer=storage.SplitReadStreamResponse.deserialize, + ) + return self._stubs["split_read_stream"] + + def close(self): + self._logged_channel.close() + + @property + def kind(self) -> str: + return "grpc" + + +__all__ = ("BigQueryReadGrpcTransport",) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py new file mode 100644 index 0000000000000000000000000000000000000000..3e7181e426ef49b538d58aa2d878a82d370a5e3a --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_read/transports/grpc_asyncio.py @@ -0,0 +1,521 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import inspect +import json +import logging as std_logging +import pickle +import warnings +from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union + +import google.protobuf.message +import grpc # type: ignore +import proto # type: ignore +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1, grpc_helpers_async +from google.api_core import retry_async as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.auth.transport.grpc import SslCredentials # type: ignore +from google.protobuf.json_format import MessageToJson +from grpc.experimental import aio # type: ignore + +from google.cloud.bigquery_storage_v1.types import storage, stream + +from .base import DEFAULT_CLIENT_INFO, BigQueryReadTransport +from .grpc import BigQueryReadGrpcTransport + +try: + from google.api_core import client_logging # type: ignore + + CLIENT_LOGGING_SUPPORTED = True # pragma: NO COVER +except ImportError: # pragma: NO COVER + CLIENT_LOGGING_SUPPORTED = False + +_LOGGER = std_logging.getLogger(__name__) + + +class _LoggingClientAIOInterceptor( + grpc.aio.UnaryUnaryClientInterceptor +): # pragma: NO COVER + async def intercept_unary_unary(self, continuation, client_call_details, request): + logging_enabled = CLIENT_LOGGING_SUPPORTED and _LOGGER.isEnabledFor( + std_logging.DEBUG + ) + if logging_enabled: # pragma: NO COVER + request_metadata = client_call_details.metadata + if isinstance(request, proto.Message): + request_payload = type(request).to_json(request) + elif isinstance(request, google.protobuf.message.Message): + request_payload = MessageToJson(request) + else: + request_payload = f"{type(request).__name__}: {pickle.dumps(request)!r}" + + request_metadata = { + key: value.decode("utf-8") if isinstance(value, bytes) else value + for key, value in request_metadata + } + grpc_request = { + "payload": request_payload, + "requestMethod": "grpc", + "metadata": dict(request_metadata), + } + _LOGGER.debug( + f"Sending request for {client_call_details.method}", + extra={ + "serviceName": "google.cloud.bigquery.storage.v1.BigQueryRead", + "rpcName": str(client_call_details.method), + "request": grpc_request, + "metadata": grpc_request["metadata"], + }, + ) + response = await continuation(client_call_details, request) + if logging_enabled: # pragma: NO COVER + response_metadata = await response.trailing_metadata() + # Convert gRPC metadata `` to list of tuples + metadata = ( + dict([(k, str(v)) for k, v in response_metadata]) + if response_metadata + else None + ) + result = await response + if isinstance(result, proto.Message): + response_payload = type(result).to_json(result) + elif isinstance(result, google.protobuf.message.Message): + response_payload = MessageToJson(result) + else: + response_payload = f"{type(result).__name__}: {pickle.dumps(result)!r}" + grpc_response = { + "payload": response_payload, + "metadata": metadata, + "status": "OK", + } + _LOGGER.debug( + f"Received response to rpc {client_call_details.method}.", + extra={ + "serviceName": "google.cloud.bigquery.storage.v1.BigQueryRead", + "rpcName": str(client_call_details.method), + "response": grpc_response, + "metadata": grpc_response["metadata"], + }, + ) + return response + + +class BigQueryReadGrpcAsyncIOTransport(BigQueryReadTransport): + """gRPC AsyncIO backend transport for BigQueryRead. + + BigQuery Read API. + + The Read API can be used to read data from BigQuery. + + This class defines the same methods as the primary client, so the + primary client can load the underlying transport implementation + and call it. + + It sends protocol buffers over the wire using gRPC (which is built on + top of HTTP/2); the ``grpcio`` package must be installed. + """ + + _grpc_channel: aio.Channel + _stubs: Dict[str, Callable] = {} + + @classmethod + def create_channel( + cls, + host: str = "bigquerystorage.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + **kwargs, + ) -> aio.Channel: + """Create and return a gRPC AsyncIO channel object. + Args: + host (Optional[str]): The host for the channel to use. + credentials (Optional[~.Credentials]): The + authorization credentials to attach to requests. These + credentials identify this application to the service. If + none are specified, the client will attempt to ascertain + the credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A optional list of scopes needed for this + service. These are only used when credentials are not specified and + are passed to :func:`google.auth.default`. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + kwargs (Optional[dict]): Keyword arguments, which are passed to the + channel creation. + Returns: + aio.Channel: A gRPC AsyncIO channel object. + """ + + return grpc_helpers_async.create_channel( + host, + credentials=credentials, + credentials_file=credentials_file, + quota_project_id=quota_project_id, + default_scopes=cls.AUTH_SCOPES, + scopes=scopes, + default_host=cls.DEFAULT_HOST, + **kwargs, + ) + + def __init__( + self, + *, + host: str = "bigquerystorage.googleapis.com", + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + channel: Optional[Union[aio.Channel, Callable[..., aio.Channel]]] = None, + api_mtls_endpoint: Optional[str] = None, + client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None, + client_cert_source_for_mtls: Optional[Callable[[], Tuple[bytes, bytes]]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'bigquerystorage.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + This argument is ignored if a ``channel`` instance is provided. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is ignored if a ``channel`` instance is provided. + This argument will be removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A optional list of scopes needed for this + service. These are only used when credentials are not specified and + are passed to :func:`google.auth.default`. + channel (Optional[Union[aio.Channel, Callable[..., aio.Channel]]]): + A ``Channel`` instance through which to make calls, or a Callable + that constructs and returns one. If set to None, ``self.create_channel`` + is used to create the channel. If a Callable is given, it will be called + with the same arguments as used in ``self.create_channel``. + api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint. + If provided, it overrides the ``host`` argument and tries to create + a mutual TLS channel with client SSL credentials from + ``client_cert_source`` or application default SSL credentials. + client_cert_source (Optional[Callable[[], Tuple[bytes, bytes]]]): + Deprecated. A callback to provide client SSL certificate bytes and + private key bytes, both in PEM format. It is ignored if + ``api_mtls_endpoint`` is None. + ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials + for the grpc channel. It is ignored if a ``channel`` instance is provided. + client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]): + A callback to provide client certificate bytes and private key bytes, + both in PEM format. It is used to configure a mutual TLS channel. It is + ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + api_audience (Optional[str]): The intended audience for the API calls + to the service that will be set when using certain 3rd party + authentication flows. Audience is typically a resource identifier. + If not set, the host value will be used as a default. + + Raises: + google.auth.exceptions.MutualTlsChannelError: If mutual TLS transport + creation failed for any reason. + google.api_core.exceptions.DuplicateCredentialArgs: If both ``credentials`` + and ``credentials_file`` are passed. + """ + self._grpc_channel = None + self._ssl_channel_credentials = ssl_channel_credentials + self._stubs: Dict[str, Callable] = {} + + if api_mtls_endpoint: + warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning) + if client_cert_source: + warnings.warn("client_cert_source is deprecated", DeprecationWarning) + + if isinstance(channel, aio.Channel): + # Ignore credentials if a channel was passed. + credentials = None + self._ignore_credentials = True + # If a channel was explicitly provided, set it. + self._grpc_channel = channel + self._ssl_channel_credentials = None + else: + if api_mtls_endpoint: + host = api_mtls_endpoint + + # Create SSL credentials with client_cert_source or application + # default SSL credentials. + if client_cert_source: + cert, key = client_cert_source() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + else: + self._ssl_channel_credentials = SslCredentials().ssl_credentials + + else: + if client_cert_source_for_mtls and not ssl_channel_credentials: + cert, key = client_cert_source_for_mtls() + self._ssl_channel_credentials = grpc.ssl_channel_credentials( + certificate_chain=cert, private_key=key + ) + + # The base transport sets the host, credentials and scopes + super().__init__( + host=host, + credentials=credentials, + credentials_file=credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + client_info=client_info, + always_use_jwt_access=always_use_jwt_access, + api_audience=api_audience, + ) + + if not self._grpc_channel: + # initialize with the provided callable or the default channel + channel_init = channel or type(self).create_channel + self._grpc_channel = channel_init( + self._host, + # use the credentials which are saved + credentials=self._credentials, + # Set ``credentials_file`` to ``None`` here as + # the credentials that we saved earlier should be used. + credentials_file=None, + scopes=self._scopes, + ssl_credentials=self._ssl_channel_credentials, + quota_project_id=quota_project_id, + options=[ + ("grpc.max_send_message_length", -1), + ("grpc.max_receive_message_length", -1), + ], + ) + + self._interceptor = _LoggingClientAIOInterceptor() + self._grpc_channel._unary_unary_interceptors.append(self._interceptor) + self._logged_channel = self._grpc_channel + self._wrap_with_kind = ( + "kind" in inspect.signature(gapic_v1.method_async.wrap_method).parameters + ) + # Wrap messages. This must be done after self._logged_channel exists + self._prep_wrapped_messages(client_info) + + @property + def grpc_channel(self) -> aio.Channel: + """Create the channel designed to connect to this service. + + This property caches on the instance; repeated calls return + the same channel. + """ + # Return the channel from cache. + return self._grpc_channel + + @property + def create_read_session( + self, + ) -> Callable[[storage.CreateReadSessionRequest], Awaitable[stream.ReadSession]]: + r"""Return a callable for the create read session method over gRPC. + + Creates a new read session. A read session divides + the contents of a BigQuery table into one or more + streams, which can then be used to read data from the + table. The read session also specifies properties of the + data to be read, such as a list of columns or a + push-down filter describing the rows to be returned. + + A particular row can be read by at most one stream. When + the caller has reached the end of each stream in the + session, then all the data in the table has been read. + + Data is assigned to each stream such that roughly the + same number of rows can be read from each stream. + Because the server-side unit for assigning data is + collections of rows, the API does not guarantee that + each stream will return the same number or rows. + Additionally, the limits are enforced based on the + number of pre-filtered rows, so some filters can lead to + lopsided assignments. + + Read sessions automatically expire 6 hours after they + are created and do not require manual clean-up by the + caller. + + Returns: + Callable[[~.CreateReadSessionRequest], + Awaitable[~.ReadSession]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "create_read_session" not in self._stubs: + self._stubs["create_read_session"] = self._logged_channel.unary_unary( + "/google.cloud.bigquery.storage.v1.BigQueryRead/CreateReadSession", + request_serializer=storage.CreateReadSessionRequest.serialize, + response_deserializer=stream.ReadSession.deserialize, + ) + return self._stubs["create_read_session"] + + @property + def read_rows( + self, + ) -> Callable[[storage.ReadRowsRequest], Awaitable[storage.ReadRowsResponse]]: + r"""Return a callable for the read rows method over gRPC. + + Reads rows from the stream in the format prescribed + by the ReadSession. Each response contains one or more + table rows, up to a maximum of 128 MB per response; read + requests which attempt to read individual rows larger + than 128 MB will fail. + + Each request also returns a set of stream statistics + reflecting the current state of the stream. + + Returns: + Callable[[~.ReadRowsRequest], + Awaitable[~.ReadRowsResponse]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "read_rows" not in self._stubs: + self._stubs["read_rows"] = self._logged_channel.unary_stream( + "/google.cloud.bigquery.storage.v1.BigQueryRead/ReadRows", + request_serializer=storage.ReadRowsRequest.serialize, + response_deserializer=storage.ReadRowsResponse.deserialize, + ) + return self._stubs["read_rows"] + + @property + def split_read_stream( + self, + ) -> Callable[ + [storage.SplitReadStreamRequest], Awaitable[storage.SplitReadStreamResponse] + ]: + r"""Return a callable for the split read stream method over gRPC. + + Splits a given ``ReadStream`` into two ``ReadStream`` objects. + These ``ReadStream`` objects are referred to as the primary and + the residual streams of the split. The original ``ReadStream`` + can still be read from in the same manner as before. Both of the + returned ``ReadStream`` objects can also be read from, and the + rows returned by both child streams will be the same as the rows + read from the original stream. + + Moreover, the two child streams will be allocated back-to-back + in the original ``ReadStream``. Concretely, it is guaranteed + that for streams original, primary, and residual, that + original[0-j] = primary[0-j] and original[j-n] = residual[0-m] + once the streams have been read to completion. + + Returns: + Callable[[~.SplitReadStreamRequest], + Awaitable[~.SplitReadStreamResponse]]: + A function that, when called, will call the underlying RPC + on the server. + """ + # Generate a "stub function" on-the-fly which will actually make + # the request. + # gRPC handles serialization and deserialization, so we just need + # to pass in the functions for each. + if "split_read_stream" not in self._stubs: + self._stubs["split_read_stream"] = self._logged_channel.unary_unary( + "/google.cloud.bigquery.storage.v1.BigQueryRead/SplitReadStream", + request_serializer=storage.SplitReadStreamRequest.serialize, + response_deserializer=storage.SplitReadStreamResponse.deserialize, + ) + return self._stubs["split_read_stream"] + + def _prep_wrapped_messages(self, client_info): + """Precompute the wrapped methods, overriding the base class method to use async wrappers.""" + self._wrapped_methods = { + self.create_read_session: self._wrap_method( + self.create_read_session, + default_retry=retries.AsyncRetry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + self.read_rows: self._wrap_method( + self.read_rows, + default_retry=retries.AsyncRetry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=86400.0, + ), + default_timeout=86400.0, + client_info=client_info, + ), + self.split_read_stream: self._wrap_method( + self.split_read_stream, + default_retry=retries.AsyncRetry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + } + + def _wrap_method(self, func, *args, **kwargs): + if self._wrap_with_kind: # pragma: NO COVER + kwargs["kind"] = self.kind + return gapic_v1.method_async.wrap_method(func, *args, **kwargs) + + def close(self): + return self._logged_channel.close() + + @property + def kind(self) -> str: + return "grpc_asyncio" + + +__all__ = ("BigQueryReadGrpcAsyncIOTransport",) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__init__.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..80b1473be8d3180704b4377e258aa83e7bf6828b --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from collections import OrderedDict +from typing import Dict, Type + +from .base import BigQueryWriteTransport +from .grpc import BigQueryWriteGrpcTransport +from .grpc_asyncio import BigQueryWriteGrpcAsyncIOTransport + +# Compile a registry of transports. +_transport_registry = OrderedDict() # type: Dict[str, Type[BigQueryWriteTransport]] +_transport_registry["grpc"] = BigQueryWriteGrpcTransport +_transport_registry["grpc_asyncio"] = BigQueryWriteGrpcAsyncIOTransport + +__all__ = ( + "BigQueryWriteTransport", + "BigQueryWriteGrpcTransport", + "BigQueryWriteGrpcAsyncIOTransport", +) diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/__init__.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/__init__.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..4e42e1dfcae4cea446cfe415ddd6075900447047 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/__init__.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/base.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/base.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..19ce1e85ff7117362ebd489dcc82c5cbd6c5f3d0 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/base.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..953158716519f0b460b50052c59d507e0996beb1 Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc_asyncio.cpython-311.pyc b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc_asyncio.cpython-311.pyc new file mode 100644 index 0000000000000000000000000000000000000000..cfbbe8102606b495716030521ee8af8a352ecc6d Binary files /dev/null and b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/__pycache__/grpc_asyncio.cpython-311.pyc differ diff --git a/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py new file mode 100644 index 0000000000000000000000000000000000000000..1997d880a6a27526d195fa08926076259894225f --- /dev/null +++ b/data/conda_envs/evalclaw/lib/python3.11/site-packages/google/cloud/bigquery_storage_v1/services/big_query_write/transports/base.py @@ -0,0 +1,319 @@ +# -*- coding: utf-8 -*- +# Copyright 2025 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +import abc +from typing import Awaitable, Callable, Dict, Optional, Sequence, Union + +import google.api_core +import google.auth # type: ignore +import google.protobuf +from google.api_core import exceptions as core_exceptions +from google.api_core import gapic_v1 +from google.api_core import retry as retries +from google.auth import credentials as ga_credentials # type: ignore +from google.oauth2 import service_account # type: ignore + +from google.cloud.bigquery_storage_v1 import gapic_version as package_version +from google.cloud.bigquery_storage_v1.types import storage, stream + +DEFAULT_CLIENT_INFO = gapic_v1.client_info.ClientInfo( + gapic_version=package_version.__version__ +) + +if hasattr(DEFAULT_CLIENT_INFO, "protobuf_runtime_version"): # pragma: NO COVER + DEFAULT_CLIENT_INFO.protobuf_runtime_version = google.protobuf.__version__ + + +class BigQueryWriteTransport(abc.ABC): + """Abstract transport class for BigQueryWrite.""" + + AUTH_SCOPES = ( + "https://www.googleapis.com/auth/bigquery", + "https://www.googleapis.com/auth/bigquery.insertdata", + "https://www.googleapis.com/auth/cloud-platform", + ) + + DEFAULT_HOST: str = "bigquerystorage.googleapis.com" + + def __init__( + self, + *, + host: str = DEFAULT_HOST, + credentials: Optional[ga_credentials.Credentials] = None, + credentials_file: Optional[str] = None, + scopes: Optional[Sequence[str]] = None, + quota_project_id: Optional[str] = None, + client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO, + always_use_jwt_access: Optional[bool] = False, + api_audience: Optional[str] = None, + **kwargs, + ) -> None: + """Instantiate the transport. + + Args: + host (Optional[str]): + The hostname to connect to (default: 'bigquerystorage.googleapis.com'). + credentials (Optional[google.auth.credentials.Credentials]): The + authorization credentials to attach to requests. These + credentials identify the application to the service; if none + are specified, the client will attempt to ascertain the + credentials from the environment. + credentials_file (Optional[str]): Deprecated. A file with credentials that can + be loaded with :func:`google.auth.load_credentials_from_file`. + This argument is mutually exclusive with credentials. This argument will be + removed in the next major version of this library. + scopes (Optional[Sequence[str]]): A list of scopes. + quota_project_id (Optional[str]): An optional project to use for billing + and quota. + client_info (google.api_core.gapic_v1.client_info.ClientInfo): + The client info used to send a user-agent string along with + API requests. If ``None``, then default info will be used. + Generally, you only need to set this if you're developing + your own client library. + always_use_jwt_access (Optional[bool]): Whether self signed JWT should + be used for service account credentials. + api_audience (Optional[str]): The intended audience for the API calls + to the service that will be set when using certain 3rd party + authentication flows. Audience is typically a resource identifier. + If not set, the host value will be used as a default. + """ + + # Save the scopes. + self._scopes = scopes + if not hasattr(self, "_ignore_credentials"): + self._ignore_credentials: bool = False + + # If no credentials are provided, then determine the appropriate + # defaults. + if credentials and credentials_file: + raise core_exceptions.DuplicateCredentialArgs( + "'credentials_file' and 'credentials' are mutually exclusive" + ) + + if credentials_file is not None: + credentials, _ = google.auth.load_credentials_from_file( + credentials_file, + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, + ) + elif credentials is None and not self._ignore_credentials: + credentials, _ = google.auth.default( + scopes=scopes, + quota_project_id=quota_project_id, + default_scopes=self.AUTH_SCOPES, + ) + # Don't apply audience if the credentials file passed from user. + if hasattr(credentials, "with_gdch_audience"): + credentials = credentials.with_gdch_audience( + api_audience if api_audience else host + ) + + # If the credentials are service account credentials, then always try to use self signed JWT. + if ( + always_use_jwt_access + and isinstance(credentials, service_account.Credentials) + and hasattr(service_account.Credentials, "with_always_use_jwt_access") + ): + credentials = credentials.with_always_use_jwt_access(True) + + # Save the credentials. + self._credentials = credentials + + # Save the hostname. Default to port 443 (HTTPS) if none is specified. + if ":" not in host: + host += ":443" + self._host = host + + self._wrapped_methods: Dict[Callable, Callable] = {} + + @property + def host(self): + return self._host + + def _prep_wrapped_messages(self, client_info): + # Precompute the wrapped methods. + self._wrapped_methods = { + self.create_write_stream: gapic_v1.method.wrap_method( + self.create_write_stream, + default_retry=retries.Retry( + initial=10.0, + maximum=120.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, + core_exceptions.ServiceUnavailable, + ), + deadline=1200.0, + ), + default_timeout=1200.0, + client_info=client_info, + ), + self.append_rows: gapic_v1.method.wrap_method( + self.append_rows, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.ServiceUnavailable, + ), + deadline=86400.0, + ), + default_timeout=86400.0, + client_info=client_info, + ), + self.get_write_stream: gapic_v1.method.wrap_method( + self.get_write_stream, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + self.finalize_write_stream: gapic_v1.method.wrap_method( + self.finalize_write_stream, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + self.batch_commit_write_streams: gapic_v1.method.wrap_method( + self.batch_commit_write_streams, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + self.flush_rows: gapic_v1.method.wrap_method( + self.flush_rows, + default_retry=retries.Retry( + initial=0.1, + maximum=60.0, + multiplier=1.3, + predicate=retries.if_exception_type( + core_exceptions.DeadlineExceeded, + core_exceptions.ResourceExhausted, + core_exceptions.ServiceUnavailable, + ), + deadline=600.0, + ), + default_timeout=600.0, + client_info=client_info, + ), + } + + def close(self): + """Closes resources associated with the transport. + + .. warning:: + Only call this method if the transport is NOT shared + with other clients - this may cause errors in other clients! + """ + raise NotImplementedError() + + @property + def create_write_stream( + self, + ) -> Callable[ + [storage.CreateWriteStreamRequest], + Union[stream.WriteStream, Awaitable[stream.WriteStream]], + ]: + raise NotImplementedError() + + @property + def append_rows( + self, + ) -> Callable[ + [storage.AppendRowsRequest], + Union[storage.AppendRowsResponse, Awaitable[storage.AppendRowsResponse]], + ]: + raise NotImplementedError() + + @property + def get_write_stream( + self, + ) -> Callable[ + [storage.GetWriteStreamRequest], + Union[stream.WriteStream, Awaitable[stream.WriteStream]], + ]: + raise NotImplementedError() + + @property + def finalize_write_stream( + self, + ) -> Callable[ + [storage.FinalizeWriteStreamRequest], + Union[ + storage.FinalizeWriteStreamResponse, + Awaitable[storage.FinalizeWriteStreamResponse], + ], + ]: + raise NotImplementedError() + + @property + def batch_commit_write_streams( + self, + ) -> Callable[ + [storage.BatchCommitWriteStreamsRequest], + Union[ + storage.BatchCommitWriteStreamsResponse, + Awaitable[storage.BatchCommitWriteStreamsResponse], + ], + ]: + raise NotImplementedError() + + @property + def flush_rows( + self, + ) -> Callable[ + [storage.FlushRowsRequest], + Union[storage.FlushRowsResponse, Awaitable[storage.FlushRowsResponse]], + ]: + raise NotImplementedError() + + @property + def kind(self) -> str: + raise NotImplementedError() + + +__all__ = ("BigQueryWriteTransport",)