Ben Zehavi
02/05/2024, 1:09 PMparameters with DeploymentRunnerMarvin
02/05/2024, 1:10 PMparameters with DeploymentRunner, I would suggest checking out the documentation and source code for the DeploymentRunner class in Prefect 2.x for the most accurate and up-to-date examples.
Here's a conceptual example of how you might use parameters with DeploymentRunner, taking note that this is a generic example and might not reflect the latest changes in Prefect 2.x:
python
from prefect.deployments import Deployment
from prefect.engine.runner import DeploymentRunner
# Create your deployment using the required details
deployment = Deployment.build_from_flow(
flow=my_flow,
name="example-deployment",
parameters={"example_param": "value"}, # Here's how you define parameters for the flow
# ... more settings for the deployment
)
# Create a DeploymentRunner
runner = DeploymentRunner(deployment=deployment)
# Run the deployment with parameters, if needed to override
run_info = runner.run(parameters={"example_param": "new_value"})
Please check the Prefect documentation or contact Prefect support for assistance on using DeploymentRunner with parameters. If it's a common use case, there should likely be GitHub issues, examples in the documentation, or threads in the Prefect community discussing it.