Marco Ruta
02/28/2025, 8:26 AMMarvin
02/28/2025, 8:26 AMDeployment.build_from_flow()
method has been removed. Instead, you should use the flow.deploy()
method to handle deployments. The deployment process is now more flexible and can be managed via a prefect.yaml
file or directly through the Python SDK.
2. Workers and Work Pools: Prefect 3.x replaces agents with workers, and work pools have replaced the infrastructure blocks from prefect.infrastructure
.
3. Example Update:
python
from prefect import flow
# Assuming `training_flow` is a Prefect flow object
training_deployment = await training_flow.deploy(
name=f"{flow_entrypoint}_on_{workpool}",
work_pool_name=workpool,
image=base_image,
infra_overrides={"build": False, "push": False}
)
4. Additional Resources:
- Prefect Deployment Documentation
- Upgrading Agents to Workers
These changes should align your code with the new Prefect 3.x deployment system. If you have further questions about specific configuration options, the Prefect documentation provides detailed guidance.