Tim-Oliver
11/03/2022, 3:34 PM@flow(
name="Create Experiment",
task_runner=DaskTaskRunner(
cluster_class="dask_jobqueue.SLURMCluster",
cluster_kwargs={
...
"job_script_prologue": [
String.load("log-slurm-job").value,
],
},
),
)
def my_flow():
But this will not build a deployment because the load was not awaited
. What would be the correct way to use blocks for flow-configurations?Khuyen Tran
11/03/2022, 3:44 PMfrom prefect import flow
from prefect.blocks.system import String
@flow(name=String.load("test").value)
def my_flow():
...
if __name__=="__main__":
my_flow()
Tim-Oliver
11/03/2022, 3:46 PMKhuyen Tran
11/03/2022, 3:49 PMTim-Oliver
11/03/2022, 3:51 PM@flow(
name=String.load("test").value
I get RuntimeWarning: coroutine 'Block.load' was never awaited
when I run prefect deployment build ...
.String.load("test").value
into a `async`function and await the result inside it. Then the deployment works, but when I run the deployment it hangs forever (waited for 10min and then killed it).Khuyen Tran
11/03/2022, 4:34 PM