airflow.providers.google.cloud.operators.vertex_ai.experiment_service

Classes

CreateExperimentOperator

Use the Vertex AI SDK to create experiment.

DeleteExperimentOperator

Use the Vertex AI SDK to delete experiment.

CreateExperimentRunOperator

Use the Vertex AI SDK to create experiment run.

ListExperimentRunsOperator

Use the Vertex AI SDK to list experiment runs in experiment.

UpdateExperimentRunStateOperator

Use the Vertex AI SDK to update state of the experiment run.

DeleteExperimentRunOperator

Use the Vertex AI SDK to delete experiment run.

Module Contents

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.CreateExperimentOperator(*, project_id, location, experiment_name, experiment_description='', gcp_conn_id='google_cloud_default', impersonation_chain=None, experiment_tensorboard=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to create experiment.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • experiment_description (str) – Optional. Description of the evaluation experiment.

  • experiment_tensorboard (str | None) – Optional. The Vertex TensorBoard instance to use as a backing TensorBoard for the provided experiment. If no TensorBoard is provided, a default TensorBoard instance is created and used by this experiment.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name')[source]
project_id[source]
location[source]
experiment_name[source]
experiment_description = ''[source]
experiment_tensorboard = None[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.DeleteExperimentOperator(*, project_id, location, experiment_name, delete_backing_tensorboard_runs=False, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to delete experiment.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • delete_backing_tensorboard_runs (bool) – Optional. If True will also delete the Vertex AI TensorBoard runs associated with the experiment runs under this experiment that we used to store time series metrics.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name')[source]
project_id[source]
location[source]
experiment_name[source]
delete_backing_tensorboard_runs = False[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.CreateExperimentRunOperator(*, project_id, location, experiment_name, experiment_run_name, experiment_run_tensorboard=None, run_after_creation=False, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to create experiment run.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • experiment_run_name (str) – Required. The specific run name or ID for this experiment.

  • experiment_run_tensorboard (str | None) – Optional. A backing TensorBoard resource to enable and store time series metrics logged to this experiment run using log_time_series_metrics.

  • run_after_creation (bool) – Optional. If True experiment run will be created with state running.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name', 'experiment_run_name')[source]
project_id[source]
location[source]
experiment_name[source]
experiment_run_name[source]
experiment_run_tensorboard = None[source]
run_after_creation = False[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.ListExperimentRunsOperator(*, project_id, location, experiment_name, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to list experiment runs in experiment.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name')[source]
project_id[source]
location[source]
experiment_name[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.UpdateExperimentRunStateOperator(*, project_id, location, experiment_name, experiment_run_name, new_state, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to update state of the experiment run.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • experiment_run_name (str) – Required. The specific run name or ID for this experiment.

  • new_state (int) – Required. The specific state of experiment run.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name', 'experiment_run_name', 'new_state')[source]
project_id[source]
location[source]
experiment_name[source]
experiment_run_name[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
new_state[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

class airflow.providers.google.cloud.operators.vertex_ai.experiment_service.DeleteExperimentRunOperator(*, project_id, location, experiment_name, experiment_run_name, gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[source]

Bases: airflow.providers.google.cloud.operators.cloud_base.GoogleCloudBaseOperator

Use the Vertex AI SDK to delete experiment run.

Parameters:
  • project_id (str) – Required. The ID of the Google Cloud project that the service belongs to.

  • location (str) – Required. The ID of the Google Cloud location that the service belongs to.

  • experiment_name (str) – Required. The name of the evaluation experiment.

  • experiment_run_name (str) – Required. The specific run name or ID for this experiment.

  • gcp_conn_id (str) – The connection ID to use connecting to Google Cloud.

  • impersonation_chain (str | collections.abc.Sequence[str] | None) – Optional service account to impersonate using short-term credentials, or chained list of accounts required to get the access_token of the last account in the list, which will be impersonated in the request. If set as a string, the account must grant the originating account the Service Account Token Creator IAM role. If set as a sequence, the identities from the list must grant Service Account Token Creator IAM role to the directly preceding identity, with first account from the list granting this role to the originating account (templated).

template_fields = ('location', 'project_id', 'impersonation_chain', 'experiment_name', 'experiment_run_name')[source]
project_id[source]
location[source]
experiment_name[source]
experiment_run_name[source]
gcp_conn_id = 'google_cloud_default'[source]
impersonation_chain = None[source]
execute(context)[source]

Derive when creating an operator.

The main method to execute the task. Context is the same dictionary used as when rendering jinja templates.

Refer to get_template_context for more context.

Was this entry helpful?