From 14bd22993ec4f176288cba1852063fd55e719190 Mon Sep 17 00:00:00 2001 From: yoshi-code-bot <70984784+yoshi-code-bot@users.noreply.github.com> Date: Tue, 29 Apr 2025 00:40:29 -0700 Subject: [PATCH 1/2] chore: Update discovery artifacts (#2599) ## Deleted keys were detected in the following stable discovery artifacts: connectors v1 https://togithub.com/googleapis/google-api-python-client/commit/a456e2ceaf17ac8f7710d4e343159604c82fd499 file v1 https://togithub.com/googleapis/google-api-python-client/commit/a820c78341fba7ebe448376aa0f21e3e357a0244 sqladmin v1 https://togithub.com/googleapis/google-api-python-client/commit/900e43c86d4fd4c658968cb026ceea0c2e686fa9 ## Deleted keys were detected in the following pre-stable discovery artifacts: dialogflow v3beta1 https://togithub.com/googleapis/google-api-python-client/commit/bb0b59eedcf033a216a45b158554b35c52fd413f file v1beta1 https://togithub.com/googleapis/google-api-python-client/commit/a820c78341fba7ebe448376aa0f21e3e357a0244 sqladmin v1beta4 https://togithub.com/googleapis/google-api-python-client/commit/900e43c86d4fd4c658968cb026ceea0c2e686fa9 ## Discovery Artifact Change Summary: fix(admin): update the api https://togithub.com/googleapis/google-api-python-client/commit/82e6e7d206d450272275ff089c4c764d60984cff feat(aiplatform): update the api https://togithub.com/googleapis/google-api-python-client/commit/6ccd7f53713cb0cf7e129f7fb42deccccc1bf8ab feat(artifactregistry): update the api https://togithub.com/googleapis/google-api-python-client/commit/ac6477013f5b42579690e32cc5a784d579f1fa9d feat(blockchainnodeengine): update the api https://togithub.com/googleapis/google-api-python-client/commit/4b1c7d24665c1e52b9f2eb0259483185c54cb109 fix(cloudbuild): update the api https://togithub.com/googleapis/google-api-python-client/commit/009d14e0bd73ceb4e5a7d0b8138d3e44b72b806e feat(cloudchannel): update the api https://togithub.com/googleapis/google-api-python-client/commit/5e15d858ddef5f4eb274b015c8880c7d81ea3e82 feat(cloudresourcemanager): update the api https://togithub.com/googleapis/google-api-python-client/commit/94d98b6e6a150e3247bc021ce0453affcb8b27b0 feat(connectors): update the api https://togithub.com/googleapis/google-api-python-client/commit/a456e2ceaf17ac8f7710d4e343159604c82fd499 feat(dataflow): update the api https://togithub.com/googleapis/google-api-python-client/commit/ea28e0289eb26231845953976364e0ca999ef5e3 feat(dataform): update the api https://togithub.com/googleapis/google-api-python-client/commit/35990c2ffd683b41a4340626c48b8b4311d0f6d9 feat(datamigration): update the api https://togithub.com/googleapis/google-api-python-client/commit/d9218bd46049c0a0b9edac33cc11e6c1f7970ddd feat(dataplex): update the api https://togithub.com/googleapis/google-api-python-client/commit/6df52e86e8b210bb7d413ef95271eac80fb91211 feat(dialogflow): update the api https://togithub.com/googleapis/google-api-python-client/commit/bb0b59eedcf033a216a45b158554b35c52fd413f feat(discoveryengine): update the api https://togithub.com/googleapis/google-api-python-client/commit/5af62dfdcf7ee10d59d236896f3e95d379379304 feat(displayvideo): update the api https://togithub.com/googleapis/google-api-python-client/commit/67effcf14bb410463adb7e99e088961597738c0b feat(documentai): update the api https://togithub.com/googleapis/google-api-python-client/commit/fadb34b1a65e9c173588a7788d31d3804bae4f1f feat(drive): update the api https://togithub.com/googleapis/google-api-python-client/commit/7d2063f757e86943e177fdf914eadd26fabd0e31 feat(file): update the api https://togithub.com/googleapis/google-api-python-client/commit/a820c78341fba7ebe448376aa0f21e3e357a0244 feat(firebaseml): update the api https://togithub.com/googleapis/google-api-python-client/commit/e45e9b0fc2da43ab1ab524e7518f03e19b086cc5 feat(gkehub): update the api https://togithub.com/googleapis/google-api-python-client/commit/3c38499a902df9211b4dbcb9c4896ee59ccea384 feat(iamcredentials): update the api https://togithub.com/googleapis/google-api-python-client/commit/c59ac8442a3e57fa7430fef7babf0bebde9d1df8 feat(integrations): update the api https://togithub.com/googleapis/google-api-python-client/commit/fa57493279565f4a4ec8f8fbfb138516e8371f4f feat(merchantapi): update the api https://togithub.com/googleapis/google-api-python-client/commit/8e00992fb222d42f9075eb164c454fd3fc5b8172 feat(networkconnectivity): update the api https://togithub.com/googleapis/google-api-python-client/commit/b3c8df3478c32120434e7c0e583f90587364fbd9 feat(networkmanagement): update the api https://togithub.com/googleapis/google-api-python-client/commit/62a2c6a4764cebf88a6e0c841ca9cddd81e88cc7 feat(networksecurity): update the api https://togithub.com/googleapis/google-api-python-client/commit/39706e9fd8c45ad3ca07db157d9b758678b4c9cd feat(oracledatabase): update the api https://togithub.com/googleapis/google-api-python-client/commit/6678c3beeb2c1e6df4d9e2bc6dfd95a979f29f28 feat(orgpolicy): update the api https://togithub.com/googleapis/google-api-python-client/commit/d1244740ed0bdac0f7b2f851fe274e340d9f7942 feat(sheets): update the api https://togithub.com/googleapis/google-api-python-client/commit/8b09804195036a644d75abeddc994537606dfcca feat(sqladmin): update the api https://togithub.com/googleapis/google-api-python-client/commit/900e43c86d4fd4c658968cb026ceea0c2e686fa9 fix(storage): update the api https://togithub.com/googleapis/google-api-python-client/commit/e70b2a8745a60c0eb1c62eb43e84ce0ea6c6a66b feat(tpu): update the api https://togithub.com/googleapis/google-api-python-client/commit/183d48eb2495b9e0ed894f2c254cefd50381553d feat(translate): update the api https://togithub.com/googleapis/google-api-python-client/commit/c230f82427be605aada20ea3849f0992cff67242 feat(vpcaccess): update the api https://togithub.com/googleapis/google-api-python-client/commit/cae086c59af5819276da3c17999f2788d27d2019 feat(youtube): update the api https://togithub.com/googleapis/google-api-python-client/commit/d0b32ba5bae6950cbd3aa061281e13ed4838af25 --- docs/dyn/admin_reports_v1.activities.html | 1 - .../aiplatform_v1.batchPredictionJobs.html | 1565 +++ docs/dyn/aiplatform_v1.endpoints.chat.html | 127 + docs/dyn/aiplatform_v1.endpoints.html | 61 +- docs/dyn/aiplatform_v1.html | 5 + docs/dyn/aiplatform_v1.media.html | 4 +- ...rojects.locations.batchPredictionJobs.html | 40 +- ..._v1.projects.locations.cachedContents.html | 36 +- ...atform_v1.projects.locations.datasets.html | 2 +- ...cts.locations.deploymentResourcePools.html | 2 +- ...tform_v1.projects.locations.endpoints.html | 74 +- ...s.locations.featurestores.entityTypes.html | 6 +- ...m_v1.projects.locations.featurestores.html | 2 +- .../dyn/aiplatform_v1.projects.locations.html | 46 +- ...cations.modelDeploymentMonitoringJobs.html | 10 +- ...projects.locations.models.evaluations.html | 8 +- ...platform_v1.projects.locations.models.html | 58 +- ...ts.locations.notebookRuntimeTemplates.html | 35 + ...1.projects.locations.notebookRuntimes.html | 21 + ....projects.locations.publishers.models.html | 56 +- ...rojects.locations.ragCorpora.ragFiles.html | 6 +- ...v1.projects.locations.ragEngineConfig.html | 91 + ....locations.ragEngineConfig.operations.html | 268 + ...1.projects.locations.reasoningEngines.html | 8 +- ....projects.locations.trainingPipelines.html | 32 +- ...form_v1.projects.locations.tuningJobs.html | 20 +- docs/dyn/aiplatform_v1.publishers.models.html | 68 +- ...iplatform_v1beta1.batchPredictionJobs.html | 2089 ++++ .../aiplatform_v1beta1.endpoints.chat.html | 127 + docs/dyn/aiplatform_v1beta1.endpoints.html | 70 +- docs/dyn/aiplatform_v1beta1.html | 5 + docs/dyn/aiplatform_v1beta1.media.html | 4 +- ...rojects.locations.batchPredictionJobs.html | 56 +- ...ta1.projects.locations.cachedContents.html | 36 +- ...m_v1beta1.projects.locations.datasets.html | 32 +- ...cts.locations.deploymentResourcePools.html | 4 +- ..._v1beta1.projects.locations.endpoints.html | 117 +- ...eta1.projects.locations.exampleStores.html | 28 +- ...v1beta1.projects.locations.extensions.html | 4 +- ...s.locations.featurestores.entityTypes.html | 6 +- ...eta1.projects.locations.featurestores.html | 2 +- ...aiplatform_v1beta1.projects.locations.html | 131 +- ...cations.modelDeploymentMonitoringJobs.html | 10 +- ...eta1.projects.locations.modelMonitors.html | 24 +- ...ons.modelMonitors.modelMonitoringJobs.html | 32 +- ...projects.locations.models.evaluations.html | 16 +- ...orm_v1beta1.projects.locations.models.html | 74 +- ...ts.locations.notebookRuntimeTemplates.html | 35 + ...1.projects.locations.notebookRuntimes.html | 21 + ....projects.locations.publishers.models.html | 150 +- ...rojects.locations.ragCorpora.ragFiles.html | 6 +- ...a1.projects.locations.ragEngineConfig.html | 91 + ....locations.ragEngineConfig.operations.html | 268 + ...1.projects.locations.reasoningEngines.html | 8 +- ...ions.reasoningEngines.sessions.events.html | 12 +- ...s.locations.reasoningEngines.sessions.html | 12 +- ..._v1beta1.projects.locations.schedules.html | 48 +- ....projects.locations.trainingPipelines.html | 40 +- ...v1beta1.projects.locations.tuningJobs.html | 40 +- .../aiplatform_v1beta1.publishers.models.html | 89 +- .../apigee_v1.organizations.environments.html | 2 +- docs/dyn/apigee_v1.organizations.html | 10 +- ...ctregistry_v1beta2.projects.locations.html | 5 +- ...v1.projects.locations.blockchainNodes.html | 8 +- .../classroom_v1.courses.announcements.html | 20 +- docs/dyn/classroom_v1.courses.courseWork.html | 24 +- ...assroom_v1.courses.courseWork.rubrics.html | 12 +- ...ssroom_v1.courses.courseWorkMaterials.html | 18 +- docs/dyn/classroom_v1.courses.html | 4 +- docs/dyn/classroom_v1.courses.posts.html | 6 +- docs/dyn/classroom_v1.courses.students.html | 4 +- docs/dyn/classroom_v1.courses.teachers.html | 4 +- ...ccounts.channelPartnerLinks.customers.html | 7 + ...el_v1.accounts.customers.entitlements.html | 8 +- .../cloudchannel_v1.accounts.customers.html | 13 +- docs/dyn/cloudchannel_v1.accounts.html | 2 +- docs/dyn/cloudchannel_v1.accounts.offers.html | 2 +- ....projects.locations.deliveryPipelines.html | 16 +- ....locations.deliveryPipelines.releases.html | 12 +- docs/dyn/cloudresourcemanager_v2.folders.html | 32 + .../cloudresourcemanager_v2beta1.folders.html | 32 + ...sourcemanager_v3.folders.capabilities.html | 156 + docs/dyn/cloudresourcemanager_v3.folders.html | 25 + ...ors_v1.projects.locations.connections.html | 5 - ...tomConnectors.customConnectorVersions.html | 279 +- ...cations.providers.connectors.versions.html | 4 +- docs/dyn/content_v2_1.liasettings.html | 4 +- .../dyn/css_v1.accounts.cssProductInputs.html | 10 +- docs/dyn/css_v1.accounts.labels.html | 12 +- docs/dyn/dataflow_v1b3.projects.jobs.html | 1 + ...dataflow_v1b3.projects.jobs.workItems.html | 1 + ...dataflow_v1b3.projects.locations.jobs.html | 2 + ...w_v1b3.projects.locations.jobs.stages.html | 1 + ...1b3.projects.locations.jobs.workItems.html | 1 + ...tions.repositories.compilationResults.html | 41 + ...beta1.projects.locations.repositories.html | 4 +- ...locations.repositories.releaseConfigs.html | 6 + ...ocations.repositories.workflowConfigs.html | 6 + ...ions.repositories.workflowInvocations.html | 28 + ...n_v1.projects.locations.migrationJobs.html | 14 + ...jects.locations.migrationJobs.objects.html | 8 + ...nizations.locations.encryptionConfigs.html | 240 + ...aplex_v1.projects.locations.dataScans.html | 10 +- ..._v1.projects.locations.dataScans.jobs.html | 4 +- ...ex_v1.projects.locations.metadataJobs.html | 72 +- ...ogflow_v2.projects.agent.environments.html | 42 + ...cts.agent.environments.users.sessions.html | 16 +- ...dialogflow_v2.projects.agent.sessions.html | 16 +- ...flow_v2.projects.conversationProfiles.html | 54 +- ...2.projects.conversations.participants.html | 23 +- ...projects.locations.agent.environments.html | 42 + ...ons.agent.environments.users.sessions.html | 16 +- ..._v2.projects.locations.agent.sessions.html | 16 +- ...ojects.locations.conversationProfiles.html | 54 +- ....locations.conversations.participants.html | 23 +- ...low_v2.projects.locations.suggestions.html | 9 +- .../dialogflow_v2.projects.suggestions.html | 9 +- ...cts.agent.environments.users.sessions.html | 2 +- ...gflow_v2beta1.projects.agent.sessions.html | 2 +- ...v2beta1.projects.conversationProfiles.html | 12 +- ...1.projects.conversations.participants.html | 2 +- ...ons.agent.environments.users.sessions.html | 2 +- ...ta1.projects.locations.agent.sessions.html | 2 +- ...ojects.locations.conversationProfiles.html | 12 +- ....locations.conversations.participants.html | 2 +- ...2beta1.projects.locations.suggestions.html | 2 +- ...alogflow_v2beta1.projects.suggestions.html | 2 +- ...ocations.agents.environments.sessions.html | 417 + ...ow_v3.projects.locations.agents.flows.html | 252 + ...projects.locations.agents.flows.pages.html | 504 + ...ns.agents.flows.transitionRouteGroups.html | 84 + ....projects.locations.agents.generators.html | 24 + ...alogflow_v3.projects.locations.agents.html | 43 +- ...s.locations.agents.playbooks.examples.html | 535 + ...3.projects.locations.agents.playbooks.html | 515 + ...s.locations.agents.playbooks.versions.html | 619 ++ ...v3.projects.locations.agents.sessions.html | 417 + ...3.projects.locations.agents.testCases.html | 1436 +++ ...ts.locations.agents.testCases.results.html | 188 + ...ow_v3.projects.locations.agents.tools.html | 601 ++ ...ocations.agents.transitionRouteGroups.html | 84 + ...ections.dataStores.branches.documents.html | 14 +- ....collections.dataStores.conversations.html | 2 +- ...ects.locations.collections.dataStores.html | 90 + ...collections.dataStores.servingConfigs.html | 30 +- ...ons.collections.engines.conversations.html | 2 +- ...rojects.locations.collections.engines.html | 85 + ...ations.collections.engines.operations.html | 27 + ...ns.collections.engines.servingConfigs.html | 30 +- ...cations.dataStores.branches.documents.html | 14 +- ...ts.locations.dataStores.conversations.html | 2 +- ...gine_v1.projects.locations.dataStores.html | 90 + ...s.locations.dataStores.servingConfigs.html | 30 +- ...1.projects.locations.groundingConfigs.html | 5 + ...s.locations.collections.dataConnector.html | 1 + ...ections.dataStores.branches.documents.html | 14 +- ...llections.dataStores.completionConfig.html | 7 +- ....collections.dataStores.conversations.html | 2 +- ...ects.locations.collections.dataStores.html | 144 + ...collections.dataStores.servingConfigs.html | 58 +- ....collections.dataStores.widgetConfigs.html | 4 +- ....collections.engines.completionConfig.html | 7 +- ...ons.collections.engines.conversations.html | 2 +- ...rojects.locations.collections.engines.html | 56 + ...ns.collections.engines.servingConfigs.html | 58 +- ...ons.collections.engines.widgetConfigs.html | 4 +- ...1alpha.projects.locations.collections.html | 72 + ...cations.dataStores.branches.documents.html | 14 +- ...locations.dataStores.completionConfig.html | 7 +- ...ts.locations.dataStores.conversations.html | 2 +- ...v1alpha.projects.locations.dataStores.html | 144 + ...s.locations.dataStores.servingConfigs.html | 58 +- ...ts.locations.dataStores.widgetConfigs.html | 4 +- ...a.projects.locations.groundingConfigs.html | 5 + ...veryengine_v1alpha.projects.locations.html | 12 + ...ections.dataStores.branches.documents.html | 14 +- ...llections.dataStores.completionConfig.html | 7 +- ....collections.dataStores.conversations.html | 2 +- ...ects.locations.collections.dataStores.html | 90 + ...collections.dataStores.servingConfigs.html | 58 +- ....collections.engines.completionConfig.html | 7 +- ...ons.collections.engines.conversations.html | 2 +- ...rojects.locations.collections.engines.html | 119 + ...ns.collections.engines.servingConfigs.html | 58 +- ...cations.dataStores.branches.documents.html | 14 +- ...locations.dataStores.completionConfig.html | 7 +- ...ts.locations.dataStores.conversations.html | 2 +- ..._v1beta.projects.locations.dataStores.html | 90 + ...s.locations.dataStores.servingConfigs.html | 58 +- ...a.projects.locations.groundingConfigs.html | 5 + docs/dyn/displayvideo_v2.advertisers.html | 12 +- ...yvideo_v2.advertisers.insertionOrders.html | 24 +- ...displayvideo_v2.advertisers.lineItems.html | 72 +- ...rgetingTypes.assignedTargetingOptions.html | 16 +- ...rgetingTypes.assignedTargetingOptions.html | 16 +- ...yvideo_v2.advertisers.youtubeAdGroups.html | 4 +- ...rgetingTypes.assignedTargetingOptions.html | 8 +- ...splayvideo_v2.customBiddingAlgorithms.html | 4 +- ...eo_v2.customBiddingAlgorithms.scripts.html | 4 +- docs/dyn/displayvideo_v2.partners.html | 8 +- ...rgetingTypes.assignedTargetingOptions.html | 16 +- .../dyn/displayvideo_v2.sdfdownloadtasks.html | 4 +- .../displayvideo_v3.advertisers.adGroups.html | 14 +- ...rgetingTypes.assignedTargetingOptions.html | 12 +- ...displayvideo_v3.advertisers.campaigns.html | 6 +- ...rgetingTypes.assignedTargetingOptions.html | 12 +- docs/dyn/displayvideo_v3.advertisers.html | 18 +- ...yvideo_v3.advertisers.insertionOrders.html | 30 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- ...displayvideo_v3.advertisers.lineItems.html | 76 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- ...splayvideo_v3.customBiddingAlgorithms.html | 4 +- ...ideo_v3.customBiddingAlgorithms.rules.html | 4 +- ...eo_v3.customBiddingAlgorithms.scripts.html | 4 +- ...yvideo_v3.firstAndThirdPartyAudiences.html | 12 +- docs/dyn/displayvideo_v3.partners.html | 12 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- .../dyn/displayvideo_v3.sdfdownloadtasks.html | 4 +- .../displayvideo_v4.advertisers.adGroups.html | 14 +- ...rgetingTypes.assignedTargetingOptions.html | 12 +- docs/dyn/displayvideo_v4.advertisers.html | 18 +- ...yvideo_v4.advertisers.insertionOrders.html | 24 +- ...displayvideo_v4.advertisers.lineItems.html | 76 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- ...splayvideo_v4.customBiddingAlgorithms.html | 4 +- ...ideo_v4.customBiddingAlgorithms.rules.html | 4 +- ...eo_v4.customBiddingAlgorithms.scripts.html | 4 +- ...ideo_v4.firstPartyAndPartnerAudiences.html | 12 +- docs/dyn/displayvideo_v4.partners.html | 12 +- ...rgetingTypes.assignedTargetingOptions.html | 24 +- .../dyn/displayvideo_v4.sdfdownloadtasks.html | 4 +- ...ntai_v1.projects.locations.processors.html | 2 + ...ocations.processors.humanReviewConfig.html | 1 + ...ocations.processors.processorVersions.html | 6 + ...projects.locations.processors.dataset.html | 37 + ...v1beta3.projects.locations.processors.html | 104 + ...ocations.processors.humanReviewConfig.html | 69 + ...ocations.processors.processorVersions.html | 108 + docs/dyn/drive_v2.about.html | 2 +- docs/dyn/drive_v2.changes.html | 24 +- docs/dyn/drive_v2.comments.html | 32 +- docs/dyn/drive_v2.files.html | 160 +- docs/dyn/drive_v2.replies.html | 16 +- docs/dyn/drive_v2.revisions.html | 12 +- docs/dyn/file_v1.projects.locations.html | 5 +- docs/dyn/file_v1beta1.projects.locations.html | 5 +- ....projects.locations.publishers.models.html | 45 + docs/dyn/forms_v1.forms.html | 8 +- ...jects.locations.restorePlans.restores.html | 8 +- ...gkehub_v1.projects.locations.features.html | 16 +- ...b_v1alpha.projects.locations.features.html | 124 +- ...ub_v1beta.projects.locations.features.html | 16 +- docs/dyn/iamcredentials_v1.html | 5 + docs/dyn/iamcredentials_v1.locations.html | 91 + ...edentials_v1.locations.workforcePools.html | 111 + docs/dyn/iamcredentials_v1.projects.html | 5 + .../iamcredentials_v1.projects.locations.html | 91 + ...jects.locations.workloadIdentityPools.html | 111 + ...edentials_v1.projects.serviceAccounts.html | 3 +- ..._v1.projects.locations.cloudFunctions.html | 1 + ...cts.locations.products.cloudFunctions.html | 1 + docs/dyn/meet_v2.spaces.html | 10 +- .../merchantapi_accounts_v1beta.accounts.html | 12 +- ...ntapi_accounts_v1beta.accounts.issues.html | 4 +- ...ccounts_v1beta.accounts.relationships.html | 196 + ...api_accounts_v1beta.accounts.services.html | 321 + ...ccounts.termsOfServiceAgreementStates.html | 8 +- ...antapi_accounts_v1beta.termsOfService.html | 20 +- ...roducts_v1beta.accounts.productInputs.html | 8 +- ...ty_v1.projects.locations.global_.hubs.html | 2 +- ...orkconnectivity_v1.projects.locations.html | 5 +- ...ectivity_v1.projects.locations.spokes.html | 8 +- ...nectivity_v1alpha1.projects.locations.html | 5 +- ...ha1.projects.locations.internalRanges.html | 16 + ...s.locations.global_.connectivityTests.html | 8 + ...s.locations.global_.connectivityTests.html | 8 + ...networksecurity_v1.projects.locations.html | 20 + ...s.locations.interceptDeploymentGroups.html | 393 + ...ojects.locations.interceptDeployments.html | 332 + ...ns.interceptEndpointGroupAssociations.html | 373 + ...cts.locations.interceptEndpointGroups.html | 389 + ...vability_v1.projects.locations.scopes.html | 2 +- ...locations.cloudExadataInfrastructures.html | 9 + ...v1.projects.locations.cloudVmClusters.html | 21 +- .../dyn/orgpolicy_v2.folders.constraints.html | 1 + ...rgpolicy_v2.organizations.constraints.html | 1 + .../orgpolicy_v2.projects.constraints.html | 1 + ...store_v1.projects.locations.instances.html | 18 +- ...e_v1beta.projects.locations.instances.html | 18 +- docs/dyn/reseller_v1.customers.html | 12 +- docs/dyn/reseller_v1.subscriptions.html | 52 +- ....locations.catalogs.branches.products.html | 18 +- ...rojects.locations.catalogs.placements.html | 4 +- ...cts.locations.catalogs.servingConfigs.html | 4 +- ...rojects.locations.catalogs.userEvents.html | 6 +- ....projects.locations.catalogs.branches.html | 4 +- ....locations.catalogs.branches.products.html | 18 +- ...rojects.locations.catalogs.placements.html | 4 +- ...cts.locations.catalogs.servingConfigs.html | 4 +- ...rojects.locations.catalogs.userEvents.html | 6 +- ....locations.catalogs.branches.products.html | 18 +- ...rojects.locations.catalogs.placements.html | 4 +- ...cts.locations.catalogs.servingConfigs.html | 4 +- ...rojects.locations.catalogs.userEvents.html | 6 +- ...v1beta1.services.consumerQuotaMetrics.html | 2 +- docs/dyn/sheets_v4.spreadsheets.html | 585 +- docs/dyn/sqladmin_v1.Backups.html | 124 +- docs/dyn/sqladmin_v1.backupRuns.html | 14 +- docs/dyn/sqladmin_v1.connect.html | 14 +- docs/dyn/sqladmin_v1.databases.html | 16 +- docs/dyn/sqladmin_v1.instances.html | 252 +- docs/dyn/sqladmin_v1.operations.html | 8 +- docs/dyn/sqladmin_v1.projects.instances.html | 16 +- docs/dyn/sqladmin_v1.sslCerts.html | 8 +- docs/dyn/sqladmin_v1.users.html | 16 +- docs/dyn/sqladmin_v1beta4.backupRuns.html | 14 +- docs/dyn/sqladmin_v1beta4.backups.html | 124 +- docs/dyn/sqladmin_v1beta4.connect.html | 14 +- docs/dyn/sqladmin_v1beta4.databases.html | 16 +- docs/dyn/sqladmin_v1beta4.instances.html | 252 +- docs/dyn/sqladmin_v1beta4.operations.html | 8 +- .../sqladmin_v1beta4.projects.instances.html | 16 +- docs/dyn/sqladmin_v1beta4.sslCerts.html | 8 +- docs/dyn/sqladmin_v1beta4.users.html | 16 +- ...tpu_v2alpha1.projects.locations.nodes.html | 12 + ...a1.projects.locations.queuedResources.html | 9 + docs/dyn/translate_v3.projects.locations.html | 5 +- .../translate_v3beta1.projects.locations.html | 5 +- docs/dyn/vpcaccess_v1.projects.locations.html | 5 +- .../vpcaccess_v1beta1.projects.locations.html | 5 +- .../dyn/workspaceevents_v1.subscriptions.html | 32 +- .../documents/admin.datatransfer_v1.json | 4 +- .../documents/admin.directory_v1.json | 4 +- .../documents/admin.reports_v1.json | 12 +- .../documents/aiplatform.v1.json | 411 +- .../documents/aiplatform.v1beta1.json | 634 +- .../discovery_cache/documents/apigee.v1.json | 4 +- .../documents/artifactregistry.v1beta2.json | 18 +- .../documents/blockchainnodeengine.v1.json | 6 +- .../discovery_cache/documents/chat.v1.json | 6 +- .../documents/classroom.v1.json | 36 +- .../documents/cloudbuild.v1.json | 7 +- .../documents/cloudbuild.v2.json | 7 +- .../documents/cloudchannel.v1.json | 28 +- .../documents/clouddeploy.v1.json | 6 +- .../documents/cloudresourcemanager.v2.json | 15 +- .../cloudresourcemanager.v2beta1.json | 15 +- .../documents/cloudresourcemanager.v3.json | 95 +- .../documents/connectors.v1.json | 678 +- .../documents/connectors.v2.json | 6 +- .../documents/content.v2.1.json | 4 +- .../discovery_cache/documents/css.v1.json | 10 +- .../documents/dataflow.v1b3.json | 6 +- .../documents/dataform.v1beta1.json | 230 +- .../documents/datamigration.v1.json | 18 +- .../documents/dataplex.v1.json | 307 +- .../documents/dialogflow.v2.json | 111 +- .../documents/dialogflow.v2beta1.json | 75 +- .../documents/dialogflow.v3.json | 9431 ++++++++++------- .../documents/dialogflow.v3beta1.json | 83 +- .../documents/discoveryengine.v1.json | 458 +- .../documents/discoveryengine.v1alpha.json | 522 +- .../documents/discoveryengine.v1beta.json | 495 +- .../documents/displayvideo.v2.json | 56 +- .../documents/displayvideo.v3.json | 201 +- .../documents/displayvideo.v4.json | 201 +- .../documents/documentai.v1.json | 18 +- .../documents/documentai.v1beta3.json | 147 +- .../discovery_cache/documents/drive.v2.json | 11 +- .../discovery_cache/documents/file.v1.json | 11 +- .../documents/file.v1beta1.json | 11 +- .../documents/firebaseml.v2beta.json | 23 +- .../discovery_cache/documents/forms.v1.json | 4 +- .../documents/gkebackup.v1.json | 4 +- .../discovery_cache/documents/gkehub.v1.json | 6 +- .../documents/gkehub.v1alpha.json | 148 +- .../documents/gkehub.v1beta.json | 6 +- .../documents/iamcredentials.v1.json | 115 +- .../documents/integrations.v1.json | 16 +- .../documents/language.v1.json | 6 +- .../documents/language.v1beta2.json | 6 +- .../documents/language.v2.json | 6 +- .../documents/licensing.v1.json | 4 +- .../discovery_cache/documents/meet.v2.json | 4 +- .../merchantapi.accounts_v1beta.json | 478 +- .../merchantapi.products_v1beta.json | 4 +- .../documents/networkconnectivity.v1.json | 10 +- .../networkconnectivity.v1alpha1.json | 42 +- .../documents/networkmanagement.v1.json | 17 +- .../documents/networkmanagement.v1beta1.json | 17 +- .../documents/networksecurity.v1.json | 3445 ++++-- .../documents/networksecurity.v1beta1.json | 4 +- .../documents/observability.v1.json | 4 +- .../documents/oracledatabase.v1.json | 48 +- .../documents/orgpolicy.v2.json | 6 +- .../documents/parallelstore.v1.json | 14 +- .../documents/parallelstore.v1beta.json | 14 +- .../discovery_cache/documents/redis.v1.json | 57 +- .../documents/redis.v1beta1.json | 57 +- .../documents/reseller.v1.json | 24 +- .../discovery_cache/documents/retail.v2.json | 4 +- .../documents/retail.v2alpha.json | 4 +- .../documents/retail.v2beta.json | 4 +- .../documents/serviceusage.v1beta1.json | 4 +- .../discovery_cache/documents/sheets.v4.json | 214 +- .../documents/sqladmin.v1.json | 122 +- .../documents/sqladmin.v1beta4.json | 122 +- .../discovery_cache/documents/storage.v1.json | 9 +- .../documents/tpu.v2alpha1.json | 17 +- .../documents/translate.v3.json | 8 +- .../documents/translate.v3beta1.json | 8 +- .../documents/vpcaccess.v1.json | 8 +- .../documents/vpcaccess.v1beta1.json | 8 +- .../documents/workspaceevents.v1.json | 16 +- .../discovery_cache/documents/youtube.v3.json | 3 +- 417 files changed, 32489 insertions(+), 8207 deletions(-) create mode 100644 docs/dyn/aiplatform_v1.batchPredictionJobs.html create mode 100644 docs/dyn/aiplatform_v1.endpoints.chat.html create mode 100644 docs/dyn/aiplatform_v1.projects.locations.ragEngineConfig.html create mode 100644 docs/dyn/aiplatform_v1.projects.locations.ragEngineConfig.operations.html create mode 100644 docs/dyn/aiplatform_v1beta1.batchPredictionJobs.html create mode 100644 docs/dyn/aiplatform_v1beta1.endpoints.chat.html create mode 100644 docs/dyn/aiplatform_v1beta1.projects.locations.ragEngineConfig.html create mode 100644 docs/dyn/aiplatform_v1beta1.projects.locations.ragEngineConfig.operations.html create mode 100644 docs/dyn/cloudresourcemanager_v3.folders.capabilities.html create mode 100644 docs/dyn/dialogflow_v3.projects.locations.agents.playbooks.examples.html create mode 100644 docs/dyn/dialogflow_v3.projects.locations.agents.playbooks.html create mode 100644 docs/dyn/dialogflow_v3.projects.locations.agents.playbooks.versions.html create mode 100644 docs/dyn/dialogflow_v3.projects.locations.agents.tools.html create mode 100644 docs/dyn/iamcredentials_v1.locations.html create mode 100644 docs/dyn/iamcredentials_v1.locations.workforcePools.html create mode 100644 docs/dyn/iamcredentials_v1.projects.locations.html create mode 100644 docs/dyn/iamcredentials_v1.projects.locations.workloadIdentityPools.html create mode 100644 docs/dyn/merchantapi_accounts_v1beta.accounts.relationships.html create mode 100644 docs/dyn/merchantapi_accounts_v1beta.accounts.services.html create mode 100644 docs/dyn/networksecurity_v1.projects.locations.interceptDeploymentGroups.html create mode 100644 docs/dyn/networksecurity_v1.projects.locations.interceptDeployments.html create mode 100644 docs/dyn/networksecurity_v1.projects.locations.interceptEndpointGroupAssociations.html create mode 100644 docs/dyn/networksecurity_v1.projects.locations.interceptEndpointGroups.html diff --git a/docs/dyn/admin_reports_v1.activities.html b/docs/dyn/admin_reports_v1.activities.html index 74eb44f1b36..23907bb68fd 100644 --- a/docs/dyn/admin_reports_v1.activities.html +++ b/docs/dyn/admin_reports_v1.activities.html @@ -122,7 +122,6 @@
+ close()
Close httplib2 connections.
+
+ create(body=None, parent=None, x__xgafv=None)
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
+ +Gets a BatchPredictionJob
+
+ list(filter=None, pageSize=None, pageToken=None, parent=None, readMask=None, x__xgafv=None)
Lists BatchPredictionJobs in a Location.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
create(body=None, parent=None, x__xgafv=None)
+ Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start. + +Args: + body: object, The request body. + The object takes the form of: + +{ # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +} + + parent: string, Required. The resource name of the Location to create the BatchPredictionJob in. Format: `projects/{project}/locations/{location}` + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +}+
get(name, x__xgafv=None)
+ Gets a BatchPredictionJob + +Args: + name: string, Required. The name of the BatchPredictionJob resource. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +}+
list(filter=None, pageSize=None, pageToken=None, parent=None, readMask=None, x__xgafv=None)
+ Lists BatchPredictionJobs in a Location. + +Args: + filter: string, 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:*` + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. Typically obtained via ListBatchPredictionJobsResponse.next_page_token of the previous JobService.ListBatchPredictionJobs call. + parent: string, Required. The resource name of the Location to list the BatchPredictionJobs from. Format: `projects/{project}/locations/{location}` + readMask: string, Mask specifying which fields to read. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for JobService.ListBatchPredictionJobs + "batchPredictionJobs": [ # List of BatchPredictionJobs in the requested page. + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. + }, + ], + "nextPageToken": "A String", # A token to retrieve the next page of results. Pass to ListBatchPredictionJobsRequest.page_token to obtain that page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ completions(endpoint, body=None, x__xgafv=None)
Exposes an OpenAI-compatible endpoint for chat completions.
+close()
+ Close httplib2 connections.+
completions(endpoint, body=None, x__xgafv=None)
+ Exposes an OpenAI-compatible endpoint for chat completions. + +Args: + endpoint: string, Required. The name of the endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` (required) + body: object, The request body. + The object takes the form of: + +{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +}+
+ chat()
+
Returns the chat Resource.
+Close httplib2 connections.
@@ -126,7 +131,7 @@Returns the batchPredictionJobs Resource.
+ diff --git a/docs/dyn/aiplatform_v1.media.html b/docs/dyn/aiplatform_v1.media.html index 0ef633a5d83..21928fc9d9a 100644 --- a/docs/dyn/aiplatform_v1.media.html +++ b/docs/dyn/aiplatform_v1.media.html @@ -107,7 +107,7 @@Returns the ragCorpora Resource.
+ +Returns the ragEngineConfig Resource.
+ @@ -295,7 +300,7 @@
+ operations()
+
Returns the operations Resource.
+ +
+ close()
Close httplib2 connections.
+close()
+ Close httplib2 connections.+
Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`.
+
+ close()
Close httplib2 connections.
+ +Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`.
+ +Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service.
+
+ list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`.
+ +Retrieves the next page of results.
+
+ wait(name, timeout=None, x__xgafv=None)
Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done.
+cancel(name, x__xgafv=None)
+ Starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of `1`, corresponding to `Code.CANCELLED`. + +Args: + name: string, The name of the operation resource to be cancelled. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +}+
close()
+ Close httplib2 connections.+
delete(name, x__xgafv=None)
+ Deletes a long-running operation. This method indicates that the client is no longer interested in the operation result. It does not cancel the operation. If the server doesn't support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. + +Args: + name: string, The name of the operation resource to be deleted. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); } +}+
get(name, x__xgafv=None)
+ Gets the latest state of a long-running operation. Clients can use this method to poll the operation result at intervals as recommended by the API service. + +Args: + name: string, The name of the operation resource. (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
list(name, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
+ Lists operations that match the specified filter in the request. If the server doesn't support this method, it returns `UNIMPLEMENTED`. + +Args: + name: string, The name of the operation's parent resource. (required) + filter: string, The standard list filter. + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # The response message for Operations.ListOperations. + "nextPageToken": "A String", # The standard List next-page token. + "operations": [ # A list of operations that matches the specified filter in the request. + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + }, + ], +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
wait(name, timeout=None, x__xgafv=None)
+ Waits until the specified long-running operation is done or reaches at most a specified timeout, returning the latest state. If the operation is already done, the latest state is immediately returned. If the timeout specified is greater than the default HTTP/RPC timeout, the HTTP/RPC timeout is used. If the server does not support this method, it returns `google.rpc.Code.UNIMPLEMENTED`. Note that this method is on a best-effort basis. It may return the latest state before the specified timeout (including immediately), meaning even an immediate response is no guarantee that the operation is done. + +Args: + name: string, The name of the operation resource to wait on. (required) + timeout: string, The maximum duration to wait before timing out. If left blank, the wait will be at most the time permitted by the underlying HTTP/RPC protocol. If RPC context deadline is also specified, the shorter one will be used. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+
+ close()
Close httplib2 connections.
+
+ create(body=None, parent=None, x__xgafv=None)
Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start.
+ +Gets a BatchPredictionJob
+
+ list(filter=None, pageSize=None, pageToken=None, parent=None, readMask=None, x__xgafv=None)
Lists BatchPredictionJobs in a Location.
+ +Retrieves the next page of results.
+close()
+ Close httplib2 connections.+
create(body=None, parent=None, x__xgafv=None)
+ Creates a BatchPredictionJob. A BatchPredictionJob once created will right away be attempted to start. + +Args: + body: object, The request body. + The object takes the form of: + +{ # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "multihostGpuNodeCount": 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage locations that contain the instances to be indexed for approximate nearest neighbor search. + "uris": [ # 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. + "A String", + ], + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelMonitoringConfig": { # The model monitoring configuration used for Batch Prediction Job. # Model monitoring config will be used for analysis model behaviors, based on the input and output to the batch prediction job, as well as the provided training dataset. + "alertConfig": { # The alert config for model monitoring. # Model monitoring alert config. + "emailAlertConfig": { # The config for email alert. # Email alert config. + "userEmails": [ # The email addresses to send the alert. + "A String", + ], + }, + "enableLogging": True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging. + "notificationChannels": [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/` + "A String", + ], + }, + "analysisInstanceSchemaUri": "A String", # YAML schema file uri in Cloud Storage describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. 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. + "objectiveConfigs": [ # Model monitoring objective config. + { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. + "explanationConfig": { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI. + "enableFeatureAttributes": True or False, # 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. + "explanationBaseline": { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset. + "bigquery": { # The BigQuery location for the output content. # BigQuery location for BatchExplain output. + "outputUri": "A String", # 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`. + }, + "gcs": { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output. + "outputUriPrefix": "A String", # 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. + }, + "predictionFormat": "A String", # The storage format of the predictions generated BatchPrediction job. + }, + }, + "predictionDriftDetectionConfig": { # The config for Prediction data drift detection. # The config for drift of prediction data. + "attributionScoreDriftThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultDriftThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "driftThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + "trainingDataset": { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified. + "bigquerySource": { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "dataFormat": "A String", # 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. + "dataset": "A String", # The resource name of the Dataset used to train this Model. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model. + "uris": [ # 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. + "A String", + ], + }, + "loggingSamplingStrategy": { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset. + "randomSampleConfig": { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later. + "sampleRate": 3.14, # Sample rate (0, 1] + }, + }, + "targetField": "A String", # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data. + }, + "trainingPredictionSkewDetectionConfig": { # The config for Training & Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data. + "attributionScoreSkewThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultSkewThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "skewThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + }, + ], + "statsAnomaliesBaseDirectory": { # The Google Cloud Storage location where the output is to be written to. # A Google Cloud Storage location for batch prediction model monitoring to dump statistics and anomalies. If not provided, a folder will be created in customer project to hold statistics and anomalies. + "outputUriPrefix": "A String", # 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. + }, + }, + "modelMonitoringStatsAnomalies": [ # Get batch prediction job monitoring statistics. + { # Statistics and anomalies generated by Model Monitoring. + "anomalyCount": 42, # Number of anomalies within all stats. + "deployedModelId": "A String", # Deployed Model ID. + "featureStats": [ # A list of historical Stats and Anomalies generated for all Features. + { # Historical Stats (and Anomalies) for a specific Feature. + "featureDisplayName": "A String", # Display Name of the Feature. + "predictionStats": [ # A list of historical stats generated by different time window's Prediction Dataset. + { # 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. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + ], + "threshold": { # The config for feature monitoring threshold. # Threshold for anomaly detection. + "value": 3.14, # 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. + }, + "trainingStats": { # 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. # Stats calculated for the Training Dataset. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + }, + ], + "objective": "A String", # Model Monitoring Objective those stats and anomalies belonging to. + }, + ], + "modelMonitoringStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The running status of the model monitoring pipeline. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +} + + parent: string, Required. The resource name of the Location to create the BatchPredictionJob in. Format: `projects/{project}/locations/{location}` + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "multihostGpuNodeCount": 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage locations that contain the instances to be indexed for approximate nearest neighbor search. + "uris": [ # 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. + "A String", + ], + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelMonitoringConfig": { # The model monitoring configuration used for Batch Prediction Job. # Model monitoring config will be used for analysis model behaviors, based on the input and output to the batch prediction job, as well as the provided training dataset. + "alertConfig": { # The alert config for model monitoring. # Model monitoring alert config. + "emailAlertConfig": { # The config for email alert. # Email alert config. + "userEmails": [ # The email addresses to send the alert. + "A String", + ], + }, + "enableLogging": True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging. + "notificationChannels": [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/` + "A String", + ], + }, + "analysisInstanceSchemaUri": "A String", # YAML schema file uri in Cloud Storage describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. 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. + "objectiveConfigs": [ # Model monitoring objective config. + { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. + "explanationConfig": { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI. + "enableFeatureAttributes": True or False, # 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. + "explanationBaseline": { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset. + "bigquery": { # The BigQuery location for the output content. # BigQuery location for BatchExplain output. + "outputUri": "A String", # 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`. + }, + "gcs": { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output. + "outputUriPrefix": "A String", # 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. + }, + "predictionFormat": "A String", # The storage format of the predictions generated BatchPrediction job. + }, + }, + "predictionDriftDetectionConfig": { # The config for Prediction data drift detection. # The config for drift of prediction data. + "attributionScoreDriftThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultDriftThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "driftThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + "trainingDataset": { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified. + "bigquerySource": { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "dataFormat": "A String", # 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. + "dataset": "A String", # The resource name of the Dataset used to train this Model. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model. + "uris": [ # 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. + "A String", + ], + }, + "loggingSamplingStrategy": { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset. + "randomSampleConfig": { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later. + "sampleRate": 3.14, # Sample rate (0, 1] + }, + }, + "targetField": "A String", # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data. + }, + "trainingPredictionSkewDetectionConfig": { # The config for Training & Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data. + "attributionScoreSkewThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultSkewThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "skewThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + }, + ], + "statsAnomaliesBaseDirectory": { # The Google Cloud Storage location where the output is to be written to. # A Google Cloud Storage location for batch prediction model monitoring to dump statistics and anomalies. If not provided, a folder will be created in customer project to hold statistics and anomalies. + "outputUriPrefix": "A String", # 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. + }, + }, + "modelMonitoringStatsAnomalies": [ # Get batch prediction job monitoring statistics. + { # Statistics and anomalies generated by Model Monitoring. + "anomalyCount": 42, # Number of anomalies within all stats. + "deployedModelId": "A String", # Deployed Model ID. + "featureStats": [ # A list of historical Stats and Anomalies generated for all Features. + { # Historical Stats (and Anomalies) for a specific Feature. + "featureDisplayName": "A String", # Display Name of the Feature. + "predictionStats": [ # A list of historical stats generated by different time window's Prediction Dataset. + { # 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. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + ], + "threshold": { # The config for feature monitoring threshold. # Threshold for anomaly detection. + "value": 3.14, # 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. + }, + "trainingStats": { # 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. # Stats calculated for the Training Dataset. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + }, + ], + "objective": "A String", # Model Monitoring Objective those stats and anomalies belonging to. + }, + ], + "modelMonitoringStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The running status of the model monitoring pipeline. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +}+
get(name, x__xgafv=None)
+ Gets a BatchPredictionJob + +Args: + name: string, Required. The name of the BatchPredictionJob resource. Format: `projects/{project}/locations/{location}/batchPredictionJobs/{batch_prediction_job}` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "multihostGpuNodeCount": 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage locations that contain the instances to be indexed for approximate nearest neighbor search. + "uris": [ # 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. + "A String", + ], + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelMonitoringConfig": { # The model monitoring configuration used for Batch Prediction Job. # Model monitoring config will be used for analysis model behaviors, based on the input and output to the batch prediction job, as well as the provided training dataset. + "alertConfig": { # The alert config for model monitoring. # Model monitoring alert config. + "emailAlertConfig": { # The config for email alert. # Email alert config. + "userEmails": [ # The email addresses to send the alert. + "A String", + ], + }, + "enableLogging": True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging. + "notificationChannels": [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/` + "A String", + ], + }, + "analysisInstanceSchemaUri": "A String", # YAML schema file uri in Cloud Storage describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. 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. + "objectiveConfigs": [ # Model monitoring objective config. + { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. + "explanationConfig": { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI. + "enableFeatureAttributes": True or False, # 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. + "explanationBaseline": { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset. + "bigquery": { # The BigQuery location for the output content. # BigQuery location for BatchExplain output. + "outputUri": "A String", # 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`. + }, + "gcs": { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output. + "outputUriPrefix": "A String", # 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. + }, + "predictionFormat": "A String", # The storage format of the predictions generated BatchPrediction job. + }, + }, + "predictionDriftDetectionConfig": { # The config for Prediction data drift detection. # The config for drift of prediction data. + "attributionScoreDriftThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultDriftThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "driftThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + "trainingDataset": { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified. + "bigquerySource": { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "dataFormat": "A String", # 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. + "dataset": "A String", # The resource name of the Dataset used to train this Model. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model. + "uris": [ # 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. + "A String", + ], + }, + "loggingSamplingStrategy": { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset. + "randomSampleConfig": { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later. + "sampleRate": 3.14, # Sample rate (0, 1] + }, + }, + "targetField": "A String", # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data. + }, + "trainingPredictionSkewDetectionConfig": { # The config for Training & Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data. + "attributionScoreSkewThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultSkewThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "skewThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + }, + ], + "statsAnomaliesBaseDirectory": { # The Google Cloud Storage location where the output is to be written to. # A Google Cloud Storage location for batch prediction model monitoring to dump statistics and anomalies. If not provided, a folder will be created in customer project to hold statistics and anomalies. + "outputUriPrefix": "A String", # 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. + }, + }, + "modelMonitoringStatsAnomalies": [ # Get batch prediction job monitoring statistics. + { # Statistics and anomalies generated by Model Monitoring. + "anomalyCount": 42, # Number of anomalies within all stats. + "deployedModelId": "A String", # Deployed Model ID. + "featureStats": [ # A list of historical Stats and Anomalies generated for all Features. + { # Historical Stats (and Anomalies) for a specific Feature. + "featureDisplayName": "A String", # Display Name of the Feature. + "predictionStats": [ # A list of historical stats generated by different time window's Prediction Dataset. + { # 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. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + ], + "threshold": { # The config for feature monitoring threshold. # Threshold for anomaly detection. + "value": 3.14, # 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. + }, + "trainingStats": { # 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. # Stats calculated for the Training Dataset. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + }, + ], + "objective": "A String", # Model Monitoring Objective those stats and anomalies belonging to. + }, + ], + "modelMonitoringStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The running status of the model monitoring pipeline. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. +}+
list(filter=None, pageSize=None, pageToken=None, parent=None, readMask=None, x__xgafv=None)
+ Lists BatchPredictionJobs in a Location. + +Args: + filter: string, 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:*` + pageSize: integer, The standard list page size. + pageToken: string, The standard list page token. Typically obtained via ListBatchPredictionJobsResponse.next_page_token of the previous JobService.ListBatchPredictionJobs call. + parent: string, Required. The resource name of the Location to list the BatchPredictionJobs from. Format: `projects/{project}/locations/{location}` + readMask: string, Mask specifying which fields to read. + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Response message for JobService.ListBatchPredictionJobs + "batchPredictionJobs": [ # List of BatchPredictionJobs in the requested page. + { # A job that uses a Model to produce predictions on multiple input instances. If predictions for significant portion of the instances fail, the job may finish without attempting predictions for all remaining instances. + "completionStats": { # Success and error statistics of processing multiple entities (for example, DataItems or structured data rows) in batch. # Output only. Statistics on completed and failed prediction instances. + "failedCount": "A String", # Output only. The number of entities for which any error was encountered. + "incompleteCount": "A String", # Output only. In cases when enough errors are encountered a job, pipeline, or operation may be failed as a whole. Below is the number of entities for which the processing had not been finished (either in successful or failed state). Set to -1 if the number is unknown (for example, the operation failed before the total entity number could be collected). + "successfulCount": "A String", # Output only. The number of entities that had been processed successfully. + "successfulForecastPointCount": "A String", # Output only. The number of the successful forecast points that are generated by the forecasting model. This is ONLY used by the forecasting batch prediction. + }, + "createTime": "A String", # Output only. Time when the BatchPredictionJob was created. + "dedicatedResources": { # A description of resources that are used for performing batch operations, are dedicated to a Model, and need manual configuration. # The config of resources used by the Model during the batch prediction. If the Model supports 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. + "machineSpec": { # Specification of a single machine. # Required. Immutable. The specification of a single machine. + "acceleratorCount": 42, # The number of accelerators to attach to the machine. + "acceleratorType": "A String", # Immutable. The type of accelerator(s) that may be attached to the machine as per accelerator_count. + "machineType": "A String", # Immutable. The type of the machine. See the [list of machine types supported for prediction](https://cloud.google.com/vertex-ai/docs/predictions/configure-compute#machine-types) See the [list of machine types supported for custom training](https://cloud.google.com/vertex-ai/docs/training/configure-compute#machine-types). For DeployedModel this field is optional, and the default value is `n1-standard-2`. For BatchPredictionJob or as part of WorkerPoolSpec this field is required. + "multihostGpuNodeCount": 42, # Optional. Immutable. The number of nodes per replica for multihost GPU deployments. + "reservationAffinity": { # 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. # Optional. Immutable. Configuration controlling how this resource pool consumes reservation. + "key": "A String", # 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. + "reservationAffinityType": "A String", # Required. Specifies the reservation affinity type. + "values": [ # Optional. Corresponds to the label values of a reservation resource. This must be the full resource name of the reservation or reservation block. + "A String", + ], + }, + "tpuTopology": "A String", # Immutable. The topology of the TPUs. Corresponds to the TPU topologies available from GKE. (Example: tpu_topology: "2x2x1"). + }, + "maxReplicaCount": 42, # Immutable. The maximum number of machine replicas the batch operation may be scaled to. The default value is 10. + "startingReplicaCount": 42, # Immutable. The number of machine replicas used at the start of the batch operation. If not set, Vertex AI decides starting number, not greater than max_replica_count + }, + "disableContainerLogging": True or False, # 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](https://cloud.google.com/logging/pricing). User can disable container logging by setting this flag to true. + "displayName": "A String", # Required. The user-defined name of this BatchPredictionJob. + "encryptionSpec": { # Represents a customer-managed encryption key spec that can be applied to a top-level resource. # 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. + "kmsKeyName": "A String", # 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. + }, + "endTime": "A String", # Output only. Time when the BatchPredictionJob entered any of the following states: `JOB_STATE_SUCCEEDED`, `JOB_STATE_FAILED`, `JOB_STATE_CANCELLED`. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. Only populated when the job's state is JOB_STATE_FAILED or JOB_STATE_CANCELLED. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "explanationSpec": { # Specification of Model explanation. # Explanation configuration for this BatchPredictionJob. Can be specified only if generate_explanation is set to `true`. This value overrides the value of Model.explanation_spec. All fields of explanation_spec are optional in the request. If a field of the explanation_spec object is not populated, the corresponding field of the Model.explanation_spec object is inherited. + "metadata": { # Metadata describing the Model's input and output for explanation. # Optional. Metadata describing the Model's input and output for explanation. + "featureAttributionsSchemaUri": "A String", # Points to a YAML file stored on Google Cloud Storage describing the format of the feature attributions. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "inputs": { # 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. 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 are keyed by this key (if not grouped with another feature). For custom images, the key must match with the key in instance. + "a_key": { # Metadata of the input of a feature. Fields other than InputMetadata.input_baselines are applicable only for Models that are using Vertex AI-provided images for Tensorflow. + "denseShapeTensorName": "A String", # 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. + "encodedBaselines": [ # 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. + "", + ], + "encodedTensorName": "A String", # Encoded tensor is a transformation of the input tensor. Must be provided if choosing Integrated Gradients attribution or XRAI attribution and the input tensor is not differentiable. An encoded tensor is generated if the input tensor is encoded by a lookup table. + "encoding": "A String", # Defines how the feature is encoded into the input tensor. Defaults to IDENTITY. + "featureValueDomain": { # 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. # The domain details of the input feature value. Like min/max, original mean or standard deviation if normalized. + "maxValue": 3.14, # The maximum permissible value for this feature. + "minValue": 3.14, # The minimum permissible value for this feature. + "originalMean": 3.14, # 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. + "originalStddev": 3.14, # 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. + }, + "groupName": "A String", # 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, keyed by the group name. + "indexFeatureMapping": [ # A list of feature names for each index in the input tensor. Required when the input InputMetadata.encoding is BAG_OF_FEATURES, BAG_OF_FEATURES_SPARSE, INDICATOR. + "A String", + ], + "indicesTensorName": "A String", # 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. + "inputBaselines": [ # 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. 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[]. The schema of any single instance may be specified via Endpoint's DeployedModels' Model's PredictSchemata's instance_schema_uri. + "", + ], + "inputTensorName": "A String", # Name of the input tensor for this feature. Required and is only applicable to Vertex AI-provided images for Tensorflow. + "modality": "A String", # Modality of the feature. Valid values are: numeric, image. Defaults to numeric. + "visualization": { # Visualization configurations for image explanation. # Visualization configurations for image explanation. + "clipPercentLowerbound": 3.14, # Excludes attributions below the specified percentile, from the highlighted areas. Defaults to 62. + "clipPercentUpperbound": 3.14, # 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. + "colorMap": "A String", # The color scheme used for the highlighted areas. Defaults to PINK_GREEN for Integrated Gradients attribution, which shows positive attributions in green and negative in pink. Defaults to VIRIDIS for XRAI attribution, which highlights the most influential regions in yellow and the least influential in blue. + "overlayType": "A String", # 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. + "polarity": "A String", # Whether to only highlight pixels with positive contributions, negative or both. Defaults to POSITIVE. + "type": "A String", # Type of the image visualization. Only applicable to Integrated Gradients attribution. OUTLINES shows regions of attribution, while PIXELS shows per-pixel attribution. Defaults to OUTLINES. + }, + }, + }, + "latentSpaceSource": "A String", # Name of the source to generate embeddings for example based explanations. + "outputs": { # 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. + "a_key": { # Metadata of the prediction output to be explained. + "displayNameMappingKey": "A String", # 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 for a specific output. + "indexDisplayNameMapping": "", # 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 is populated by locating in the mapping with Attribution.output_index. + "outputTensorName": "A String", # Name of the output tensor. Required and is only applicable to Vertex AI provided images for Tensorflow. + }, + }, + }, + "parameters": { # Parameters to configure explaining for Model's predictions. # Required. Parameters that configure explaining of the Model's predictions. + "examples": { # Example-based explainability that returns the nearest neighbors from the provided dataset. # Example-based explanations that returns the nearest neighbors from the provided dataset. + "exampleGcsSource": { # The Cloud Storage input instances. # The Cloud Storage input instances. + "dataFormat": "A String", # The format in which instances are given, if not specified, assume it's JSONL format. Currently only JSONL format is supported. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage locations that contain the instances to be indexed for approximate nearest neighbor search. + "uris": [ # 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. + "A String", + ], + }, + "nearestNeighborSearchConfig": "", # The full configuration for the generated index, the semantics are the same as metadata and should match [NearestNeighborSearchConfig](https://cloud.google.com/vertex-ai/docs/explainable-ai/configuring-explanations-example-based#nearest-neighbor-search-config). + "neighborCount": 42, # The number of neighbors to return when querying for examples. + "presets": { # Preset configuration for example-based explanations # Simplified preset configuration, which automatically sets configuration values based on the desired query speed-precision trade-off and modality. + "modality": "A String", # 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. + "query": "A String", # Preset option controlling parameters for speed-precision trade-off when querying for examples. If omitted, defaults to `PRECISE`. + }, + }, + "integratedGradientsAttribution": { # 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 # 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 + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + "outputIndices": [ # If populated, only returns attributions that have 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 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). + "", + ], + "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. # 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. + "pathCount": 42, # Required. The number of feature permutations to consider when approximating the Shapley values. Valid range of its value is [1, 50], inclusively. + }, + "topK": 42, # 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. + "xraiAttribution": { # 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. # 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. + "blurBaselineConfig": { # 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 # 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 + "maxBlurSigma": 3.14, # 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. + }, + "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 # 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 + "featureNoiseSigma": { # 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. # This is similar to 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 will be used for all features. + "noiseSigma": [ # Noise sigma per feature. No noise is added to features that are not set. + { # Noise sigma for a single feature. + "name": "A String", # The name of the input feature for which noise sigma is provided. The features are defined in explanation metadata inputs. + "sigma": 3.14, # 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 but represents the noise added to the current feature. Defaults to 0.1. + }, + ], + }, + "noiseSigma": 3.14, # 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](https://developers.google.com/machine-learning/data-prep/transform/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 instead for each feature. + "noisySampleCount": 42, # 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. + }, + "stepCount": 42, # 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. + }, + }, + }, + "generateExplanation": True or False, # 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 object: * `bigquery`: output includes a column named `explanation`. The value is a struct that conforms to the 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 object. * `csv`: Generating explanations for CSV format is not supported. If this field is set to true, either the Model.explanation_spec or explanation_spec must be populated. + "inputConfig": { # Configures the input to BatchPredictionJob. See Model.supported_input_storage_formats for Model's supported input formats, and how instances should be expressed via any of them. # Required. Input configuration of the instances on which predictions are performed. The schema of any single instance may be specified via the Model's PredictSchemata's instance_schema_uri. + "bigquerySource": { # The BigQuery location for the input content. # 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. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "gcsSource": { # The Google Cloud Storage location for the input content. # The Cloud Storage location for the input instances. + "uris": [ # 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. + "A String", + ], + }, + "instancesFormat": "A String", # Required. The format in which instances are given, must be one of the Model's supported_input_storage_formats. + }, + "instanceConfig": { # Configuration defining how to transform batch prediction input instances to the instances that the Model accepts. # Configuration for how to convert batch prediction input instances to the prediction instances that are sent to the Model. + "excludedFields": [ # 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 is not specified. When excluded_fields is populated, included_fields must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "includedFields": [ # Fields that will be included in the prediction instance that is sent to the Model. If 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 must be empty. The input must be JSONL with objects at each line, BigQuery or TfRecord. + "A String", + ], + "instanceType": "A String", # The format of the instance that the Model accepts. Vertex AI will convert compatible batch prediction input instance formats 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 is populated. included_fields must be populated for specifying field orders. * For `jsonl`, if each line of the JSONL input is an object, 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 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. + "keyField": "A String", # 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. 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. + }, + "labels": { # 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. + "a_key": "A String", + }, + "manualBatchTuningParameters": { # Manual batch tuning parameters. # Immutable. Parameters configuring the batch behavior. Currently only applicable when dedicated_resources are used (in other cases Vertex AI does the tuning itself). + "batchSize": 42, # Immutable. The number of the records (e.g. instances) of the operation given in each batch to a machine replica. Machine type, and size of a single record should be considered when setting this parameter, higher value speeds up the batch operation's execution, but too high value will result in a whole batch not fitting in a machine's memory, and the whole operation will fail. The default value is 64. + }, + "model": "A String", # 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}` + "modelMonitoringConfig": { # The model monitoring configuration used for Batch Prediction Job. # Model monitoring config will be used for analysis model behaviors, based on the input and output to the batch prediction job, as well as the provided training dataset. + "alertConfig": { # The alert config for model monitoring. # Model monitoring alert config. + "emailAlertConfig": { # The config for email alert. # Email alert config. + "userEmails": [ # The email addresses to send the alert. + "A String", + ], + }, + "enableLogging": True or False, # Dump the anomalies to Cloud Logging. The anomalies will be put to json payload encoded from proto ModelMonitoringStatsAnomalies. This can be further synced to Pub/Sub or any other services supported by Cloud Logging. + "notificationChannels": [ # Resource names of the NotificationChannels to send alert. Must be of the format `projects//notificationChannels/` + "A String", + ], + }, + "analysisInstanceSchemaUri": "A String", # YAML schema file uri in Cloud Storage describing the format of a single instance that you want Tensorflow Data Validation (TFDV) to analyze. 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. + "objectiveConfigs": [ # Model monitoring objective config. + { # The objective configuration for model monitoring, including the information needed to detect anomalies for one particular model. + "explanationConfig": { # The config for integrating with Vertex Explainable AI. Only applicable if the Model has explanation_spec populated. # The config for integrating with Vertex Explainable AI. + "enableFeatureAttributes": True or False, # 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. + "explanationBaseline": { # Output from BatchPredictionJob for Model Monitoring baseline dataset, which can be used to generate baseline attribution scores. # Predictions generated by the BatchPredictionJob using baseline dataset. + "bigquery": { # The BigQuery location for the output content. # BigQuery location for BatchExplain output. + "outputUri": "A String", # 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`. + }, + "gcs": { # The Google Cloud Storage location where the output is to be written to. # Cloud Storage location for BatchExplain output. + "outputUriPrefix": "A String", # 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. + }, + "predictionFormat": "A String", # The storage format of the predictions generated BatchPrediction job. + }, + }, + "predictionDriftDetectionConfig": { # The config for Prediction data drift detection. # The config for drift of prediction data. + "attributionScoreDriftThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between different time windows. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultDriftThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "driftThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + "trainingDataset": { # Training Dataset information. # Training dataset for models. This field has to be set only if TrainingPredictionSkewDetectionConfig is specified. + "bigquerySource": { # The BigQuery location for the input content. # The BigQuery table of the unmanaged Dataset used to train this Model. + "inputUri": "A String", # Required. BigQuery URI to a table, up to 2000 characters long. Accepted forms: * BigQuery path. For example: `bq://projectId.bqDatasetId.bqTableId`. + }, + "dataFormat": "A String", # 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. + "dataset": "A String", # The resource name of the Dataset used to train this Model. + "gcsSource": { # The Google Cloud Storage location for the input content. # The Google Cloud Storage uri of the unmanaged Dataset used to train this Model. + "uris": [ # 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. + "A String", + ], + }, + "loggingSamplingStrategy": { # Sampling Strategy for logging, can be for both training and prediction dataset. # Strategy to sample data from Training Dataset. If not set, we process the whole dataset. + "randomSampleConfig": { # Requests are randomly selected. # Random sample config. Will support more sampling strategies later. + "sampleRate": 3.14, # Sample rate (0, 1] + }, + }, + "targetField": "A String", # The target field name the model is to predict. This field will be excluded when doing Predict and (or) Explain for the training data. + }, + "trainingPredictionSkewDetectionConfig": { # The config for Training & Prediction data skew detection. It specifies the training dataset sources and the skew detection parameters. # The config for skew between training data and prediction data. + "attributionScoreSkewThresholds": { # Key is the feature name and value is the threshold. The threshold here is against attribution score distance between the training and prediction feature. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + "defaultSkewThreshold": { # The config for feature monitoring threshold. # 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. + "value": 3.14, # 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. + }, + "skewThresholds": { # 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. + "a_key": { # The config for feature monitoring threshold. + "value": 3.14, # 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. + }, + }, + }, + }, + ], + "statsAnomaliesBaseDirectory": { # The Google Cloud Storage location where the output is to be written to. # A Google Cloud Storage location for batch prediction model monitoring to dump statistics and anomalies. If not provided, a folder will be created in customer project to hold statistics and anomalies. + "outputUriPrefix": "A String", # 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. + }, + }, + "modelMonitoringStatsAnomalies": [ # Get batch prediction job monitoring statistics. + { # Statistics and anomalies generated by Model Monitoring. + "anomalyCount": 42, # Number of anomalies within all stats. + "deployedModelId": "A String", # Deployed Model ID. + "featureStats": [ # A list of historical Stats and Anomalies generated for all Features. + { # Historical Stats (and Anomalies) for a specific Feature. + "featureDisplayName": "A String", # Display Name of the Feature. + "predictionStats": [ # A list of historical stats generated by different time window's Prediction Dataset. + { # 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. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + ], + "threshold": { # The config for feature monitoring threshold. # Threshold for anomaly detection. + "value": 3.14, # 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. + }, + "trainingStats": { # 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. # Stats calculated for the Training Dataset. + "anomalyDetectionThreshold": 3.14, # This is the threshold used when detecting anomalies. The threshold can be changed by user, so this one might be different from ThresholdConfig.value. + "anomalyUri": "A String", # 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). + "distributionDeviation": 3.14, # 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. + "endTime": "A String", # 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": 3.14, # 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 and ModelDeploymentMonitoringObjectiveType.FEATURE_ATTRIBUTION_DRIFT. + "startTime": "A String", # 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). + "statsUri": "A String", # 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](https://github.com/tensorflow/metadata/blob/master/tensorflow_metadata/proto/v0/statistics.proto). + }, + }, + ], + "objective": "A String", # Model Monitoring Objective those stats and anomalies belonging to. + }, + ], + "modelMonitoringStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # Output only. The running status of the model monitoring pipeline. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "modelParameters": "", # The parameters that govern the predictions. The schema of the parameters may be specified via the Model's PredictSchemata's parameters_schema_uri. + "modelVersionId": "A String", # Output only. The version ID of the Model that produces the predictions via this job. + "name": "A String", # Output only. Resource name of the BatchPredictionJob. + "outputConfig": { # Configures the output of BatchPredictionJob. See Model.supported_output_storage_formats for supported output formats, and how predictions are expressed via any of them. # 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 PredictSchemata's instance_schema_uri and prediction_schema_uri. + "bigqueryDestination": { # The BigQuery location for the output content. # 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 and prediction 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 represented as a STRUCT, and containing only `code` and `message`. + "outputUri": "A String", # 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`. + }, + "gcsDestination": { # The Google Cloud Storage location where the output is to be written to. # 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, and N may equal 0001 and depends on the total number of successfully predicted instances. If the Model has both instance and prediction schemata defined then each such file contains predictions as per the 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 containing only `code` and `message` fields. + "outputUriPrefix": "A String", # 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. + }, + "predictionsFormat": "A String", # Required. The format in which Vertex AI gives the predictions, must be one of the Model's supported_output_storage_formats. + }, + "outputInfo": { # Further describes this job's output. Supplements output_config. # Output only. Information further describing the output of this job. + "bigqueryOutputDataset": "A String", # Output only. The path of the BigQuery dataset created, in `bq://projectId.bqDatasetId` format, into which the prediction output is written. + "bigqueryOutputTable": "A String", # 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. + "gcsOutputDirectory": "A String", # Output only. The full path of the Cloud Storage directory created, into which the prediction output is written. + }, + "partialFailures": [ # 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. + { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + ], + "resourcesConsumed": { # Statistics information about resource consumption. # 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. + "replicaHours": 3.14, # Output only. The number of replica hours used. Note that many replicas may run in parallel, and additionally any given work may be queued for some time. Therefore this value is not strictly related to wall time. + }, + "satisfiesPzi": True or False, # Output only. Reserved for future use. + "satisfiesPzs": True or False, # Output only. Reserved for future use. + "serviceAccount": "A String", # 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. + "startTime": "A String", # Output only. Time when the BatchPredictionJob for the first time entered the `JOB_STATE_RUNNING` state. + "state": "A String", # Output only. The detailed state of the job. + "unmanagedContainerModel": { # Contains model information necessary to perform batch prediction without requiring a full model import. # 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. + "artifactUri": "A String", # The path to the directory containing the Model artifact and any of its supporting files. + "containerSpec": { # Specification of a container for serving predictions. Some fields in this message correspond to fields in the [Kubernetes Container v1 core specification](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). # Input only. The specification of the container that is to be used when deploying this Model. + "args": [ # Immutable. Specifies arguments for the command that runs when the container starts. This overrides the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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 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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). If you don't specify this field and don't specify the `command` field, then the container's [`ENTRYPOINT`](https://docs.docker.com/engine/reference/builder/#cmd) and `CMD` determine what runs based on their default behavior. See the Docker documentation about [how `CMD` and `ENTRYPOINT` interact](https://docs.docker.com/engine/reference/builder/#understand-how-cmd-and-entrypoint-interact). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "command": [ # Immutable. Specifies the command that runs when the container starts. This overrides the container's [ENTRYPOINT](https://docs.docker.com/engine/reference/builder/#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 field or the container's [`CMD`](https://docs.docker.com/engine/reference/builder/#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](https://docs.docker.com/engine/reference/builder/#understand-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`](https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#notes). In this field, you can reference [environment variables set by Vertex AI](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables) and environment variables set in the 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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + "A String", + ], + "deploymentTimeout": "A String", # Immutable. Deployment timeout. Limit for deployment timeout is 2 hours. + "env": [ # 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 and 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`: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents an environment variable present in a Container or Python Module. + "name": "A String", # Required. Name of the environment variable. Must be a valid C identifier. + "value": "A String", # 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. + }, + ], + "grpcPorts": [ # 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. + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "healthProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes readiness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "healthRoute": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#health). 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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "imageUri": "A String", # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#publishing), including permissions requirements for the Vertex AI Service Agent. The container image is ingested upon 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#). You can use the URI to one of Vertex AI's [pre-built container images for prediction](https://cloud.google.com/vertex-ai/docs/predictions/pre-built-containers) in this field. + "livenessProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes liveness probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + "ports": [ # 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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#liveness) to this port. If you do not specify this field, it defaults to following value: ```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](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.23/#container-v1-core). + { # Represents a network port in a container. + "containerPort": 42, # The number of the port to expose on the pod's IP address. Must be a valid port number, between 1 and 65535 inclusive. + }, + ], + "predictRoute": "A String", # Immutable. HTTP path on the container to send prediction requests to. Vertex AI forwards requests sent using projects.locations.endpoints.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 field. If you don't specify this field, it defaults to the following value when you deploy this Model to an Endpoint: /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](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) * DEPLOYED_MODEL: DeployedModel.id of the `DeployedModel`. (Vertex AI makes this value available to your container code as the [`AIP_DEPLOYED_MODEL_ID` environment variable](https://cloud.google.com/vertex-ai/docs/predictions/custom-container-requirements#aip-variables).) + "sharedMemorySizeMb": "A String", # Immutable. The amount of the VM memory to reserve as the shared memory for the model in megabytes. + "startupProbe": { # Probe describes a health check to be performed against a container to determine whether it is alive or ready to receive traffic. # Immutable. Specification for Kubernetes startup probe. + "exec": { # ExecAction specifies a command to execute. # ExecAction probes the health of a container by executing a command. + "command": [ # 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. + "A String", + ], + }, + "failureThreshold": 42, # Number of consecutive failures before the probe is considered failed. Defaults to 3. Minimum value is 1. Maps to Kubernetes probe argument 'failureThreshold'. + "grpc": { # GrpcAction checks the health of a container using a gRPC service. # GrpcAction probes the health of a container by sending a gRPC request. + "port": 42, # Port number of the gRPC service. Number must be in the range 1 to 65535. + "service": "A String", # 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. + }, + "httpGet": { # HttpGetAction describes an action based on HTTP Get requests. # HttpGetAction probes the health of a container by sending an HTTP GET request. + "host": "A String", # Host name to connect to, defaults to the model serving container's IP. You probably want to set "Host" in httpHeaders instead. + "httpHeaders": [ # Custom headers to set in the request. HTTP allows repeated headers. + { # HttpHeader describes a custom header to be used in HTTP probes + "name": "A String", # The header field name. This will be canonicalized upon output, so case-variant names will be understood as the same header. + "value": "A String", # The header field value + }, + ], + "path": "A String", # Path to access on the HTTP server. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + "scheme": "A String", # Scheme to use for connecting to the host. Defaults to HTTP. Acceptable values are "HTTP" or "HTTPS". + }, + "initialDelaySeconds": 42, # Number of seconds to wait before starting the probe. Defaults to 0. Minimum value is 0. Maps to Kubernetes probe argument 'initialDelaySeconds'. + "periodSeconds": 42, # 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'. + "successThreshold": 42, # Number of consecutive successes before the probe is considered successful. Defaults to 1. Minimum value is 1. Maps to Kubernetes probe argument 'successThreshold'. + "tcpSocket": { # TcpSocketAction probes the health of a container by opening a TCP socket connection. # TcpSocketAction probes the health of a container by opening a TCP socket connection. + "host": "A String", # Optional: Host name to connect to, defaults to the model serving container's IP. + "port": 42, # Number of the port to access on the container. Number must be in the range 1 to 65535. + }, + "timeoutSeconds": 42, # 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'. + }, + }, + "predictSchemata": { # Contains the schemata used in Model's predictions and explanations via PredictionService.Predict, PredictionService.Explain and BatchPredictionJob. # Contains the schemata used in Model's predictions and explanations + "instanceSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the format of a single instance, which are used in PredictRequest.instances, ExplainRequest.instances and BatchPredictionJob.input_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "parametersSchemaUri": "A String", # Immutable. Points to a YAML file stored on Google Cloud Storage describing the parameters of prediction and explanation via PredictRequest.parameters, ExplainRequest.parameters and BatchPredictionJob.model_parameters. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + "predictionSchemaUri": "A String", # 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, ExplainResponse.explanations, and BatchPredictionJob.output_config. The schema is defined as an OpenAPI 3.0.2 [Schema Object](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.2.md#schemaObject). 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. + }, + }, + "updateTime": "A String", # Output only. Time when the BatchPredictionJob was most recently updated. + }, + ], + "nextPageToken": "A String", # A token to retrieve the next page of results. Pass to ListBatchPredictionJobsRequest.page_token to obtain that page. +}+
list_next()
+ Retrieves the next page of results. + + Args: + previous_request: The request for the previous page. (required) + previous_response: The response from the request for the previous page. (required) + + Returns: + A request object that you can call 'execute()' on to request the next + page. Returns None if there are no more items in the collection. ++
+ close()
Close httplib2 connections.
+
+ completions(endpoint, body=None, x__xgafv=None)
Exposes an OpenAI-compatible endpoint for chat completions.
+close()
+ Close httplib2 connections.+
completions(endpoint, body=None, x__xgafv=None)
+ Exposes an OpenAI-compatible endpoint for chat completions. + +Args: + endpoint: string, Required. The name of the endpoint requested to serve the prediction. Format: `projects/{project}/locations/{location}/endpoints/{endpoint}` (required) + body: object, The request body. + The object takes the form of: + +{ # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged. + "contentType": "A String", # The HTTP Content-Type header value specifying the content type of the body. + "data": "A String", # The HTTP request/response body as raw binary. + "extensions": [ # Application specific response metadata. Must be set in the first response for streaming APIs. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], +}+
+ chat()
+
Returns the chat Resource.
+Close httplib2 connections.
@@ -126,7 +131,7 @@Returns the batchPredictionJobs Resource.
+ diff --git a/docs/dyn/aiplatform_v1beta1.media.html b/docs/dyn/aiplatform_v1beta1.media.html index af29d1a5347..d83b4296a01 100644 --- a/docs/dyn/aiplatform_v1beta1.media.html +++ b/docs/dyn/aiplatform_v1beta1.media.html @@ -107,7 +107,7 @@Returns the ragCorpora Resource.
+ +Returns the ragEngineConfig Resource.
+ @@ -313,6 +318,9 @@Gets information about a location.
+
+ getRagEngineConfig(name, x__xgafv=None)
Gets a RagEngineConfig.
list(name, extraLocationTypes=None, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists information about the supported locations for this service.
@@ -322,6 +330,9 @@
retrieveContexts(parent, body=None, x__xgafv=None)
Retrieves relevant contexts for a query.
+
+ updateRagEngineConfig(name, body=None, x__xgafv=None)
Updates a RagEngineConfig.
augmentPrompt(parent, body=None, x__xgafv=None)
@@ -351,7 +362,7 @@ getRagEngineConfig(name, x__xgafv=None)
+ Gets a RagEngineConfig. + +Args: + name: string, Required. The name of the RagEngineConfig resource. Format: `projects/{project}/locations/{location}/ragEngineConfig` (required) + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # Config for RagEngine. + "name": "A String", # Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig` + "ragManagedDbConfig": { # Configuration message for RagManagedDb used by RagEngine. # The config of the RagManagedDb used by RagEngine. + "basic": { # 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. # Sets the RagManagedDb to the Basic tier. + }, + "enterprise": { # Enterprise tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. NOTE: This is the default tier if not explicitly chosen. # Sets the RagManagedDb to the Enterprise tier. This is the default tier if not explicitly chosen. + }, + }, +}+
list(name, extraLocationTypes=None, filter=None, pageSize=None, pageToken=None, x__xgafv=None)
Lists information about the supported locations for this service. @@ -1813,7 +1863,7 @@Method Details
}, "ranking": { # Config for ranking and reranking. # Optional. Config for ranking and reranking. "llmRanker": { # Config for LlmRanker. # Optional. Config for LlmRanker. - "modelName": "A String", # Optional. The model name used for ranking. Format: `gemini-1.5-pro` + "modelName": "A String", # Optional. The model name used for ranking. See [Supported models](https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/inference#supported-models). }, "rankService": { # Config for Rank Service. # Optional. Config for Rank Service. "modelName": "A String", # Optional. The model name of the rank service. Format: `semantic-ranker-512@latest` @@ -1855,6 +1905,13 @@Method Details
"contexts": { # Relevant contexts for one query. # The contexts of the query. "contexts": [ # All its contexts. { # A context of the query. + "chunk": { # A RagChunk includes the content of a chunk of a RagFile, and associated metadata. # Context of the retrieved chunk. + "pageSpan": { # Represents where the chunk starts and ends in the document. # If populated, represents where the chunk starts and ends in the document. + "firstPage": 42, # Page where chunk starts in the document. Inclusive. 1-indexed. + "lastPage": 42, # Page where chunk ends in the document. Inclusive. 1-indexed. + }, + "text": "A String", # The content of the chunk. + }, "distance": 3.14, # The distance between the query dense embedding vector and the context text vector. "score": 3.14, # According to the underlying Vector DB and the selected metric type, the score can be either the distance or the similarity between the query and the context and its range depends on the metric type. For example, if the metric type is COSINE_DISTANCE, it represents the distance between the query and the context. The larger the distance, the less relevant the context is to the query. The range is [0, 2], while 0 means the most relevant and 2 means the least relevant. "sourceDisplayName": "A String", # The file display name. @@ -1867,4 +1924,52 @@Method Details
}
updateRagEngineConfig(name, body=None, x__xgafv=None)
+ Updates a RagEngineConfig. + +Args: + name: string, Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig` (required) + body: object, The request body. + The object takes the form of: + +{ # Config for RagEngine. + "name": "A String", # Identifier. The name of the RagEngineConfig. Format: `projects/{project}/locations/{location}/ragEngineConfig` + "ragManagedDbConfig": { # Configuration message for RagManagedDb used by RagEngine. # The config of the RagManagedDb used by RagEngine. + "basic": { # 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. # Sets the RagManagedDb to the Basic tier. + }, + "enterprise": { # Enterprise tier offers production grade performance along with autoscaling functionality. It is suitable for customers with large amounts of data or performance sensitive workloads. NOTE: This is the default tier if not explicitly chosen. # Sets the RagManagedDb to the Enterprise tier. This is the default tier if not explicitly chosen. + }, + }, +} + + x__xgafv: string, V1 error format. + Allowed values + 1 - v1 error format + 2 - v2 error format + +Returns: + An object of the form: + + { # This resource represents a long-running operation that is the result of a network API call. + "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. + "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. + "code": 42, # The status code, which should be an enum value of google.rpc.Code. + "details": [ # A list of messages that carry the error details. There is a common set of message types for APIs to use. + { + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + ], + "message": "A String", # A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client. + }, + "metadata": { # Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, + "name": "A String", # The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the `name` should be a resource name ending with `operations/{unique_id}`. + "response": { # The normal, successful response of the operation. If the original method returns no data on success, such as `Delete`, the response is `google.protobuf.Empty`. If the original method is standard `Get`/`Create`/`Update`, the response should be the resource. For other methods, the response should have the type `XxxResponse`, where `Xxx` is the original method name. For example, if the original method name is `TakeSnapshot()`, the inferred response type is `TakeSnapshotResponse`. + "a_key": "", # Properties of the object. Contains field @type with type URL. + }, +}+