I’ve used vertex on prefect 1. Conceptually what I don’t get is if we still need to have a dedicated vertex runner (started via ‘prefect agent vertex start’) which takes in flow runs off a queue and schedules appropriate vertex jobs with it. That command doesn’t work with the prefect 2 agent, and the documentation doesn’t mention this at all.
Thanks, sounds like a normal local agent can schedule vertex flows - That’s helpful!
I don’t think I can get to the finish line without an example. The one in the docs shows how to “echo Hello World” but not how to, as far as I can tell, get a flow run to execute on a vertex machine.
I may be missing something obvious here. In prefect 1, there was a concept of a VertexRun which would run an entirely flow on a vertex instance.
Maybe I am expecting this to exist in the prefect2 module, but it doesn’t, and instead the VertexAICustomTrainingJob object is simply a way to kick off a normal vertex training job, and not a flow run. Is that right?
I tried as you said, and got further, but the GCS VM which I setup to spin up the vertex jobs fails when it tries, complaining that, “KeyError: “No class found for dispatch key ‘vertex-ai-custom-training-job’ in registry for type ‘Block’.””
Ah, thank you! Yes a key issue was my prefect agent didn’t have prefect-gcp available in it’s environment. I was imagining it was going to use my docker container (which has these python packages in it) to launch the vertex job, but that was mistaken. If I had installed the python package, as well as the other python packages it depends on, it likely would have worked.
Now I opted for another solution: I started my google cloud VM from my worker Docker image (as it had all the python modules already) with a startup command like: