Hey, I have a flow running using Vertex Run - this...
# prefect-community
d
Hey, I have a flow running using Vertex Run - this is my run config -
Copy code
flow.run_config = VertexRun(scheduling={'timeout': '3600s'},
                            machine_type='n2-highcpu-80', labels=["ml"],
                            service_account=PREFECT_SERVICRE_ACCOUNT)
It works without the scheduling parameter - I added it and used this documentation - https://docs.prefect.io/orchestration/flow_config/run_configs.html#vertexrun Now when registering to Prefect cloud and running I get this error -
Copy code
Parameter to MergeFrom() must be instance of same class: expected google.protobuf.Duration got str.
Am I missing something? Thanks
a
It looks like perhaps the google Python package changed something so that now it no longer expects this timeout as a string but rather as
google.protobuf.Duration
? But this would be surprising since based on this:
Copy code
The JSON representation for Duration is a String that ends in s to indicate seconds and is preceded by the number of seconds, with nanoseconds expressed as fractional seconds.
All we do with this, it seems, on the agent side is passing it to the Vertex task definition in this JSON format https://github.com/PrefectHQ/prefect/blob/master/src/prefect/agent/vertex/agent.py#L170-L171
Let me open an issue for this since I don't know why it occurs and this would need a deeper investigation: @Marvin open "Flow run using VertexRun fails with a protobuf error when using the timeout scheduling argument"
👍 1