Hi all, I have a flow that runs a ML pipeline tha...
# ask-community
m
Hi all, I have a flow that runs a ML pipeline that accepts the configuration as an input. I would like to deploy a single ML pipeline and schedule it for all available models (on a weekly basis). I managed to make it work when I create a deployment for each model but I suspect that it's possible with a single deployment. Can anyone point me to the right approach to achieve this? The logic looks like this as of now:
Copy code
deployments = []
    for config_path in get_model_config_paths(forecast_path, "train"):
        name = config_path.parent.parent.name + "-train" + "-simu"
        deployments.append(
            run_pipeline.to_deployment(
                name=name,
                parameters={
                    "config_path": config_path.relative_to(PROJECT_ROOT),
                    "stage": "simu",
                },
                job_variables={"image_pull_policy": "Never"},
            )
        )

    deploy(
        *deployments,
        work_pool_name="trainers",
        image=DockerImage(
            name="prefect-trainer",
            tag="latest",
            dockerfile="Dockerfile",
        ),
        push=False,
    )
Thanks in advance