【问题标题】:Configure subnetwork for vertex ai pipeline component为顶点 ai 管道组件配置子网
【发布时间】:2023-02-03 04:32:50
【问题描述】:

我有一个需要连接到数据库的顶点 ai 管道组件。此数据库存在于 VPC 网络中。目前我的组件失败了,因为它无法连接到数据库,但我相信如果我可以将组件配置为使用子网,我可以让它工作。 如何配置组件的workerPoolSpecs使用子网?

我希望我能做这样的事情:

preprocess_data_op = component_store.load_component('org/ml_engine/preprocess')


@dsl.pipeline(name="test-pipeline-vertex-ai")
def pipeline(project_id: str, some_param: str):
    
    preprocess_data_op(
        project_id=project_id,
        my_param=some_param,
        subnetwork_uri="projects/xxxxxxxxx/global/networks/data",
    ).set_display_name("Preprocess data")

但是参数不存在,我明白了

TypeError: Preprocess() got an unexpected keyword argument 'subnetwork_uri'

如何为组件定义子网?

【问题讨论】:

    标签: google-cloud-vertex-ai kubeflow kubeflow-pipelines vertex-ai-pipeline


    【解决方案1】:

    来自 Google docs,没有提及如何在特定子网上运行组件。

    但是,通过将子网作为作业提交 api 的一部分传入,可以在子网中运行整个管道。

    job.submit(service_account=SERVICE_ACCOUNT, network=NETWORK)

    【讨论】:

      猜你喜欢
      • 2022-10-06
      • 2021-08-21
      • 2021-05-05
      • 1970-01-01
      • 2022-01-18
      • 2022-07-08
      • 2022-10-15
      • 2023-02-18
      • 2021-09-21
      相关资源
      最近更新 更多