deployments-workers
Create and manage Prefect deployments, schedules, serve processes, work pools, work queues, workers, runner APIs, Docker/image inputs, and prefect.yaml configuration.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- deployments-workers
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Create and manage Prefect deployments, schedules, serve processes, work pools, work queues, workers, runner APIs, Docker/image inputs, and prefect.yaml configuration.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/api-reference.md8.6 KB
- 参考文档references/cli-reference.md11.1 KB
- 参考文档references/prefect-yaml.md10.3 KB
- 参考文档references/troubleshooting.md10.2 KB
- 脚本scripts/deployment_command_builder.py17.8 KB
- 脚本scripts/validate_prefect_yaml.py23.5 KB
03 SKILL.md 正文
Deployments And Workers
Use this sub-skill when a task is about turning authored Prefect flows into remotely triggerable deployments, serving flows from a long-running process, configuring prefect.yaml, or routing runs through work pools, work queues, and workers.
Start Here
- Choose the deployment mode in references/api-reference.md:
flow.serve()for static local processes,flow.deploy()/prefect deployfor work-pool deployments, orrun_deployment()/prefect deployment runfor triggering an existing deployment. - Check exact command flags in references/cli-reference.md before composing CLI commands; this Prefect version uses
prefect deploy init, not top-levelprefect init --help. - For project YAML, read references/prefect-yaml.md and run
python scripts/validate_prefect_yaml.py --file prefect.yamlbefore deploying. - For failures where a deployment validates but never starts, read references/troubleshooting.md and verify the API URL/profile, deployment name, work pool, work queue, and worker command all match.
Use For
prefect deploy,prefect deploy init,prefect flow serve,prefect deployment run, deployment schedules, deployment triggers, and runtime parameters.prefect work-pool,prefect work-queue, andprefect worker startcommands for process, Docker, Kubernetes, and integration-provided worker types.prefect.yamlbuild,push,pull,deployments,schedules,work_pool,job_variables, and templated step-output fields.- Python deployment APIs:
Flow.serve,Flow.deploy,prefect.deploy,RunnerDeployment.from_flow,RunnerDeployment.from_entrypoint, andrun_deployment. - Docker image deployment inputs and job variables at the general Prefect layer; route provider-specific worker setup to integration-specific skills when available.
Route Elsewhere
- General profile, server startup/status, Cloud login, dashboard, config, variables, and operational diagnostics: use
cli-server-operations. - Authoring
@flowand@taskcode before deployment, local state behavior, task runners, retries, caching, and flow tests: useflow-task-authoring. - Direct
get_client,PrefectClient, settings/profile internals, schema models, and theprefect-clientpackage split: useapi-client-settings. - Events/automations details, blocks, assets, and concurrency primitives beyond deployment trigger wiring: use
events-blocks-assets. - Maintainer-only source changes, repo test selection, generated artifacts, and internal runner refactors: use
repo-development.
Safe Validation
- Validate deployment YAML structure without contacting a Prefect API:
python scripts/validate_prefect_yaml.py --file prefect.yaml --check-entrypoints
- Build copyable commands from explicit inputs without running Prefect:
python scripts/deployment_command_builder.py deploy --entrypoint flows.py:etl --name etl-prod --pool process-pool --work-queue default --param limit=10
- Use
--helpon both bundled scripts for examples. They perform no network calls, do not start workers, and do not mutate Prefect server state.
Safety Notes
prefect flow serveandprefect worker startare long-running listeners; only run them when the user explicitly wants a service process.prefect deployment runcreates server-side flow runs; use--start-in,--start-at, and--watch-timeoutdeliberately.prefect deployandflow.deploy()require a reachable Prefect API and can create/update deployments, queues, and schedules.- Docker image builds, pushes, and integration workers may require optional packages, credentials, network access, and external infrastructure; keep those provider-specific details outside this sub-skill unless the user asks at the general Prefect layer.
04 同仓库更多 Skills
passnet-triton-opt
Make a single PassNet Triton kernel fast AND numerically faithful: performance model (when a replacement can win at all), block/grid/warp tuning, autotune policy, launch overhead, and per-op numeric recipes to pass the dtype baseline tolerances. Use when a pass matches and is correct but speedup below expected, or when correctness fails by small numeric margins.
passnet-solve
END-TO-END playbook for solving one PassNet sample: analyze the computation graphs, decide the optimization strategy (what to fuse, what to replace, what to leave alone), drive the iteration loop, and maximize the sample score. This is the ENTRY skill — invoke it first for any PassNet optimization task; it tells you when to use passnet-pattern-fusion, passnet-triton-opt and passnet-feedback.
passnet-skill
PassNet GPU kernel optimization via compiler passes. Design and implement Triton-based optimization passes, create pass files under ./pass_dir/, self-evaluate with pass_evaluator, and iterate to maximize GPU speedup.
passnet-pattern-fusion
Author PassNet pass files: write patterns that actually MATCH the FX graph, pick fusion regions (which ops to absorb into one Triton kernel), and structure multi-pass submissions with the mandatory shared-dispatch architecture. Use when creating or fixing pattern()/replacement_args()/replacement_func() files, when a pass "failed to match", or when deciding how to fuse multiple kernels/ops.
passnet-orchestrate
Round/batch planning and decision support for PassNet graph optimization. Use for multi-sample triage, worker allocation, eval-budget policy, and post-eval keep/revert decisions. For solving one concrete sample end to end, use passnet-solve as the entry skill; consult this skill only when you need broader planning or a specific decision gate.
passnet-feedback
Fast, deterministic feedback for PassNet work: pre-flight pattern/match verification WITHOUT burning a GPU evaluation, per-node bottleneck analysis of a sample's graphs, and eval-log parsing into per-variant status + estimated score + failure classification. Use BEFORE every GPU evaluation (check_pattern), at the START of a sample (analyze_graph), and AFTER every evaluation (parse_eval_log).