Prefect 2.0
Tags provide a flexible and highly customizable way of organizing your flows, tasks, and deployments:
Does it mean that my work queue needs to have all those tags?
No. If you create a work queue with tag dev
and the same tag is one of the tags set on a deployment, it’s enough for the work queue to pick that up.
How to set tags?
Deployment CLI
prefect deployment build flow_script.py:flow_name --name deployment_name \
--tag dev --tag your_team --tag your_project
YAML
The easiest way to set those is by using your deployment YAML manifest:
tags:
- dev
- project1
- ml-team
- yourname
Python
To set those programmatically, you can leverage the tags
argument in a @task
decorator:
@task(tags=["project_name", "team_name"])
Prefect 1.0
You can deploy your flows to various projects. Each project
can refer to a different topic, team, environment, or business unit in your organization. You can create a project either from the UI or using the CLI:
prefect create project "project_name"