Vertex AI pipelines TypeError: PipelineTask.add_node_selector_constraint() takes 2 positional arguments but 3 were given

122 views Asked by At

I am trying to have set a the NVIDIA_L4 GPU on my custom Vertex AI pipeline but running into the following issue: Vertex AI pipelines TypeError: PipelineTask.add_node_selector_constraint() takes 2 positional arguments but 3 were given What should I do to resolve this?

I tried doing the following:

@pipeline(name = 'llm-pipeline')
def data_pipeline():

    answer =  answer_prompt()
    answer.add_node_selector_constraint('cloud.google.com/gke-accelerator', 'NVIDIA_L4')

But it didn't work.

1

There are 1 answers

0
daniel.young On

The correct way to call this method is to pass one argument explicitly like so: answer.add_node_selector_constraint('NVIDIA_L4')

See docs here. Check out other versions as necessary (the link is for latest version)

Note though that this seems to be a recent change, I have seen docs for KFP 1.8.13 that say to use a format more like what you used there (though I haven't tried that personally so not sure how exactly that would work).