Ryan Peden
03/17/2023, 12:02 AMprefect.runtime namespace:
from prefect.runtime import flow_run
from prefect import flow
from prefect_dask.task_runners import DaskTaskRunner
@flow(task_runner=DaskTaskRunner(client_kwargs = {"name": flow_run.id}))
def my_flow():
...
This will create a Dask client whose name mirrors the flow run ID. Similarly, you can use prefect.runtime to access parameters that were passed to this deployment run via prefect.runtime.deployment.parameters. Note that all of these attributes will be empty if they are not available.
See #8790 for details.
A few other key enhancements and fixes:
Enhancements
⢠Add deployment ID support to run_deployment šŖŖ ā #7958
⢠Disable Postgres JIT for performance improvements š ā #8804
Fixes
⢠Fix blocking file read in async method Deployment.load_from_yaml š ļø ā #8798
⢠Allow tasks and flows to make redundant transitions such as RUNNING -> RUNNING šāāļø šāāļø ā #8802
Documentation
⢠Update workspace roles table to emphasize differences between roles ā #8787
⢠Add Webhook block docs šŖ ā #8773
⢠Update info on Ray's support for hardware and software rayā #8811
Helm chart
⢠Helm charts are now automatically published on each Prefect release kubernetes ā #8776
Contributors
⢠@devanshdoshi9
See the release notes for a full list of changes!