airflow.providers.google.cloud.hooks.vertex_ai.dataset¶
此模組包含一個 Google Cloud Vertex AI Hook。
類¶
用於 Google Cloud Vertex AI Dataset API 的 Hook。 |
模組內容¶
- class airflow.providers.google.cloud.hooks.vertex_ai.dataset.DatasetHook(gcp_conn_id='google_cloud_default', impersonation_chain=None, **kwargs)[原始碼]¶
基類:
airflow.providers.google.common.hooks.base_google.GoogleBaseHook,airflow.providers.google.common.hooks.operation_helpers.OperationHelper用於 Google Cloud Vertex AI Dataset API 的 Hook。
- create_dataset(project_id, region, dataset, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
建立資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (google.cloud.aiplatform_v1.types.Dataset | dict) – 必需。要建立的資料集。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- delete_dataset(project_id, region, dataset, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
刪除資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。要刪除的資料集 ID。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- export_data(project_id, region, dataset, export_config, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
從資料集中匯出資料。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。要匯出的資料集 ID。
export_config (google.cloud.aiplatform_v1.types.ExportDataConfig | dict) – 必需。期望的輸出位置。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- get_annotation_spec(project_id, region, dataset, annotation_spec, read_mask=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
獲取 AnnotationSpec。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。資料集 ID。
annotation_spec (str) – AnnotationSpec 資源的 ID。
read_mask (str | None) – 可選。指定要讀取哪些欄位的掩碼。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- get_dataset(project_id, region, dataset, read_mask=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
獲取資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。要匯出的資料集 ID。
read_mask (str | None) – 可選。指定要讀取哪些欄位的掩碼。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- import_data(project_id, region, dataset, import_configs, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
將資料匯入資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。要匯入資料的 Dataset ID。
import_configs (collections.abc.Sequence[google.cloud.aiplatform_v1.types.ImportDataConfig]) – 必需。期望的輸入位置。所有輸入位置的內容將分批匯入。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- list_annotations(project_id, region, dataset, data_item, filter=None, page_size=None, page_token=None, read_mask=None, order_by=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
列出屬於資料項的 Annotation。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。資料集 ID。
data_item (str) – 必需。要從中列出 Annotation 的 DataItem ID。
filter (str | None) – 標準列表過濾器。
page_size (int | None) – 標準列表頁面大小。
page_token (str | None) – 標準列表頁面令牌。
read_mask (str | None) – 指定要讀取哪些欄位的掩碼。
order_by (str | None) – 一個逗號分隔的欄位列表,用於排序,按升序排列。在欄位名後使用“desc”表示降序。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- list_data_items(project_id, region, dataset, filter=None, page_size=None, page_token=None, read_mask=None, order_by=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
列出資料集中的 DataItem。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset (str) – 必需。資料集 ID。
filter (str | None) – 標準列表過濾器。
page_size (int | None) – 標準列表頁面大小。
page_token (str | None) – 標準列表頁面令牌。
read_mask (str | None) – 指定要讀取哪些欄位的掩碼。
order_by (str | None) – 一個逗號分隔的欄位列表,用於排序,按升序排列。在欄位名後使用“desc”表示降序。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- list_datasets(project_id, region, filter=None, page_size=None, page_token=None, read_mask=None, order_by=None, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
列出位置中的資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
filter (str | None) – 標準列表過濾器。
page_size (int | None) – 標準列表頁面大小。
page_token (str | None) – 標準列表頁面令牌。
read_mask (str | None) – 指定要讀取哪些欄位的掩碼。
order_by (str | None) – 一個逗號分隔的欄位列表,用於排序,按升序排列。在欄位名後使用“desc”表示降序。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。
- update_dataset(project_id, region, dataset_id, dataset, update_mask, retry=DEFAULT, timeout=None, metadata=())[原始碼]¶
更新資料集。
- 引數:
project_id (str) – 必需。服務所屬的 Google Cloud 專案 ID。
region (str) – 必需。服務所屬的 Google Cloud 區域 ID。
dataset_id (str) – 必需。資料集 ID。
dataset (google.cloud.aiplatform_v1.types.Dataset | dict) – 必需。用於替換伺服器上資源的 Dataset。
update_mask (google.protobuf.field_mask_pb2.FieldMask | dict) – 必需。更新掩碼應用於資源。
retry (google.api_core.retry.Retry | google.api_core.gapic_v1.method._MethodDefault) – 指定哪些錯誤(如果有)應重試。
timeout (float | None) – 此請求的超時時間。
metadata (collections.abc.Sequence[tuple[str, str]]) – 應隨請求傳送的元資料字串。