启用 Vertex AI 的 PipelineJob 任务的 Web 访问或交互式 Shell。

huangapple go评论97阅读模式
英文:

Enable web access or interactive shell for PipelineJob tasks for Vertex AI

问题

我正在尝试调试在Vertex AI上启动的PipelineJob。是否有一种方法可以在组件上启用Web访问,就像在启动自定义作业时一样?这样,我就可以ssh进入正在运行的任务并进行大量调试。

这是我的流水线代码的简化版本:

import kfp.v2.dsl as dsl

from google.cloud import aiplatform
from kfp.v2 import compiler
from kfp.v2.dsl import (
    component,
    Input,
    Output,
    Dataset,
    Metrics,
    Model,
    Artifact,
    graph_component
)
from copy import copy
from kfp.v2.google.client import AIPlatformClient
from typing import Optional, Dict, Union, List

@component(
    packages_to_install=['google-cloud-aiplatform']
)
def hello_world():
    import time
    print("Hello world")
    time.sleep(300)

@dsl.pipeline(
    name="dataprep"
)
def train_model_pipeline(style: int):
    # 设置训练和测试数据
    hello_op = hello_world()

我期望能够在任务上设置enable_web_access(True),但似乎这不是一个选项,因为它是CustomJob规范的一部分,而不是PipelineTask的一部分。

英文:

I am trying to debug a PipelineJob that I launch on Vertex AI. Is there a way to enable web access on the components like you can when you launch Custom Jobs? This way, I could ssh into the running task and do a bunch of debugging.

Here is a simplified version of my pipeline code:

import kfp.v2.dsl as dsl

from google.cloud import aiplatform
from kfp.v2 import compiler
from kfp.v2.dsl import (
    component,
    Input,
    Output,
    Dataset,
    Metrics,
    Model,
    Artifact,
    graph_component
)
from copy import copy
from kfp.v2.google.client import AIPlatformClient
from typing import Optional, Dict, Union, List

@component(
    packages_to_install=['google-cloud-aiplatform']
)
def hello_world():
    import time
    print("Hello world")
    time.sleep(300)

@dsl.pipeline(
    name = "dataprep"
)
def train_model_pipeline(style: int):
    # Set Up Training and Test Data
    hello_op = hello_world()

I expected to be able to set enable_web_access(True) on the task, but that doesn't seem like an option because it's part of the CustomJob spec and not the PipelineTask.

答案1

得分: 1

目前还没有任何功能或解决方法可以启用对 kfp 组件的 Web 访问。

关于这个问题,@Optimus 已经提出了一个功能请求

为了将来可能遇到这种情况的社区的利益,将答案发布为社区 wiki

欢迎编辑此答案以获取更多信息。

英文:

As of now, there is no feature or any workaround to enable web access to kfp components.

There is already a filed feature request regarding this issue filed by @Optimus.

Posting the answer as community wiki for the benefit of the community that might encounter this use case in the future.

Feel free to edit this answer for additional information.

huangapple
  • 本文由 发表于 2023年2月8日 21:27:32
  • 转载请务必保留本文链接:https://go.coder-hub.com/75386477.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定