workload-management
Operate Lepton endpoint, pod, job, Ray cluster, fine-tune, template, node, log, event, and workload status workflows from safe CLI and SDK plans.
- License 许可
- Apache-2.0
- 最近更新
- 2026-09-03
- Stars
- ★ 351
- Forks
- 27
01 前言 Front Matter
- name
- workload-management
- license
- Apache 2.0
- metadata
- { "disco-role": "operating" }
- description
- Operate Lepton endpoint, pod, job, Ray cluster, fine-tune, template, node, log, event, and workload status workflows from safe CLI and SDK plans.
- disable-model-invocation
- true
02 资源文件 6
- 参考文档references/endpoint-and-pod-workflows.md9.1 KB
- 参考文档references/job-ray-finetune-workflows.md11.4 KB
- 参考文档references/logs-events-nodes.md7.6 KB
- 参考文档references/troubleshooting.md11.5 KB
- 参考文档references/workload-taxonomy.md6.6 KB
- 脚本scripts/build_workload_command.py13.0 KB
03 SKILL.md 正文
Workload Management
Use this sub-skill when a task involves Lepton compute workloads: endpoint/deployment serving, dev pods, batch jobs, Ray clusters, fine-tuning jobs, templates, resource shapes, node capacity, workload logs, events, status checks, restarts, stops, starts, and removal plans.
Do not run live cloud mutations unless the user has explicitly asked for them and the root or cli-operations safety route has handled confirmation. This sub-skill supplies workload-specific commands and validation checks; generic workspace authentication belongs to workspace-and-auth, and generic command confirmation/output handling belongs to cli-operations.
Choose the route
- Read references/workload-taxonomy.md when the user is choosing between endpoint, dev pod, batch job, Ray cluster, and fine-tuning job.
- Read references/endpoint-and-pod-workflows.md for
lep endpoint/legacylep deploymentandlep podcreate/list/get/status/update/stop/restart/remove/log/SSH flows. - Read references/job-ray-finetune-workflows.md for batch job, Ray cluster, Ray job, fine-tune job, and template workflows.
- Read references/logs-events-nodes.md for historical logs, streaming logs, events, replicas, nodes, node groups, resource shapes, and node-group storage visibility.
- Read references/troubleshooting.md when create/update/list/log/SSH/status commands fail or produce surprising no-op behavior.
- Use scripts/build_workload_command.py to produce dry-run command examples for endpoint, job, and pod basics without executing
lep.
Workload task mapping
| User intent | Best workload route | First read-only command |
|---|---|---|
| Serve an HTTP model, embedding service, or custom container continuously | Endpoint | lep endpoint list then lep endpoint status -n NAME |
| Open a personal interactive machine, notebook, SSH shell, or IDE target | Dev pod | lep pod list --detail then lep pod get -n NAME |
| Run training, evaluation, processing, or sweeps to completion | Batch job | lep job list then lep job get --id JOB_ID |
| Run distributed Python/Ray pipelines with a head and worker groups | Ray cluster | lep raycluster list then lep raycluster get -n NAME |
| Launch guided model fine-tuning from a trainer/template schema | Fine-tune job | lep finetune list then lep finetune get -i JOB_ID |
| Find valid shapes/capacity before creating workloads | Nodes/shapes | `lep node resource-shape --purpose deployment |
| Diagnose workload output or failures | Logs/events | lep log get ..., lep endpoint events -n NAME, or lep job events -i JOB_ID |
Safe workload workflow
- Identify the workload type. If the user says "service", "API", "serve", "replicas", "QPM", or "scale to zero", prefer endpoint. If they say "SSH", "Jupyter", "debug machine", or "interactive", prefer pod. If they say "run once", "training job", "sweep", or "completion", prefer job. If they say "Ray actors", "Ray job", "head/worker", or "autoscaling Ray", prefer Ray cluster. If they say "fine-tune", "trainer", "base model", or "dataset recipe", prefer fine-tune.
- Gather read-only state first. Use list/get/status commands and shape/node discovery before proposing create/update/stop/delete commands.
- Plan mutations as commands, not execution. Show the exact
lepcommand, expected side effects, required workspace context, and whether it may create cost, stop compute, delete resources, or replace fields. - Validate workload-specific arguments. Check create/update flags for container image/name, resource shape, port syntax, autoscale exclusivity, header-routing booleans, job filters, Ray worker group structure, and log time/replica scope.
- Use scoped diagnostics. Prefer status/get, replicas/nodes, events, and time-scoped logs over broad log downloads or unscoped destructive operations.
Core command families
- Endpoint/deployment:
lep endpoint create|list|get|status|update|stop|restart|remove|log|events; the hidden legacy aliaslep deployment ...maps to the same command family for compatibility, but preferlep endpointin new plans. - Dev pod:
lep pod create|list|get|ssh|stop|remove; uselep pod list --detailfor SSH/TCP/JupyterLab columns andlep pod get -n NAMEfor JSON details. - Batch job:
lep job create|list|get|stop|start|remove|remove-all|stop-all|clone|log|replicas|nodes|events. - Ray cluster:
lep raycluster create|list|get|update|start|stop|remove|submit-job|list-jobs|stop-job. - Fine-tune:
lep finetune list|get|create|delete|list-trainers; create dynamically injects trainer flags from a trainer template unless--filemode is used. - Templates and capacity:
lep template list, hiddenlep template get,lep node list,lep node list-nodes,lep node list-reservations,lep node resource-shape,lep node storage. - Historical logs:
lep log get --endpoint NAME ...,lep log get --job JOB_ID ..., orlep log get --job-name NAME ...; use directlep endpoint log/lep job logfor replica live-stream style commands.
Python SDK surfaces
For scripts that need API objects instead of shell commands, use APIClient() after workspace context is configured by the auth route. The workload attributes are:
client.deployment: endpoint/deployment API, dispatching to the new endpoint implementation when enabled.client.pod: dev pod API, dispatching to the new devpod implementation when enabled.client.job,client.raycluster,client.finetune,client.template,client.shapes,client.nodegroup, andclient.logfor the matching resource families.
Keep SDK examples read-only unless the user has explicitly requested a mutation. Use .safe_json(...) or model serialization for reviewable payloads before create/update/delete.
Boundaries and cross-routes
- Storage/file transfer, secrets, ingress/canary routing, IP allowlist design, and storage mount validation are owned by
storage-secrets-ingress; this sub-skill only notes workload flags that reference mounts, secrets, tokens, or IP allowlists. - Authentication, workspace selection, environment variables, and token redaction are owned by
workspace-and-auth. - Generic confirmation rules, command tree discovery, output capture, and destructive-command confirmation are owned by root/
cli-operations; apply them before running any create/update/stop/start/remove/delete command.
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).