AGENT SKILL

libmtl

Routes LibMTL installation, core APIs, customization, and benchmark workflows.

License 许可
MIT
最近更新
2026-09-03
Stars
★ 351
Forks
27

01 前言 Front Matter

name
libmtl
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes LibMTL installation, core APIs, customization, and benchmark workflows.
disable-model-invocation
true

02 资源文件 6

03 SKILL.md 正文

LibMTL

Use this skill for the LibMTL package, its shared training engine, and the benchmark examples that ship with the repository.

First checks

  • Read references/repo-provenance.md when you need to confirm whether this skill matches the current checkout or before asking for a refresh.
  • Use the repository's own install flow first: pip install -r requirements.txt && pip install -e .
  • Then run the bundled install smoke check: python -I scripts/check_install.py
  • LibMTL's benchmark workflows assume a CUDA-capable PyTorch environment. LibMTL.Trainer hard-codes cuda:0, so there is no CPU fallback for the training examples.
  • Each benchmark sub-skill bundles the launch pattern and validation helpers for its workflow. Several older docs and tests in the source checkout use outdated benchmark names; rely on the current sub-skill guidance and bundled scripts instead.

Route map

  • sub-skills/core-api/ — install/import details, Trainer, shared config, built-in losses/metrics/models/architectures/weightings, and direct API usage.
  • sub-skills/customization/ — adding a new dataset, new task dictionary, new loss or metric, new architecture, or new weighting strategy.
  • sub-skills/vision-benchmarks/ — NYUv2 and Cityscapes scene understanding workflows, including DeepLabV3+, SegNet+MTAN, and the shared vision helpers.
  • sub-skills/office-benchmarks/ — Office-31 and Office-Home multi-input image classification workflows with a bundled self-contained runtime package.
  • sub-skills/qm9/ — QM9 graph regression with torch-geometric and random_split.t.
  • sub-skills/paws-x/ — PAWS-X / XTREME multilingual sentence classification, cache generation, and preprocessing caveats.

What this root skill covers

  • Shared installation and import verification.
  • Which public modules exist and how to choose them.
  • Which sub-skill owns a dataset- or workflow-specific question.
  • Cross-cutting runtime pitfalls such as CUDA-only training, stale docs/tests, or configuration flags that are accepted by help output but not fully wired.

When to stay at the root

Use the root when the request is only about:

  • the package name, version, or install command;
  • whether LibMTL can be imported in the current environment;
  • which sub-skill to use;
  • the repo provenance or staleness check;
  • a cross-cutting troubleshooting question that is not tied to one benchmark.

When to open a sub-skill

Open the matching sub-skill if the request mentions any of these signals:

  • Trainer, prepare_args, weight_args, arch_args, rep_grad, or multi_input → core-api.
  • new dataset, new metric/loss, new architecture, or new weighting strategy → customization.
  • NYUv2, Cityscapes, semantic segmentation, depth, surface normals, DeepLab, ASPP, SegNet, or MTAN → vision-benchmarks.
  • Office-31, Office-Home, domain adaptation, or multi-input image classification → office-benchmarks.
  • QM9, torch_geometric, NNConv, Set2Set, or molecular regression → qm9.
  • PAWS-X, XTREME, bert-base-multilingual-cased, cached features, or the raw TSV preprocess scripts → paws-x.

Shared guidance

  • Pass weighting and architecture as string names such as "EW" and "HPS"; the trainer resolves them internally.
  • If you instantiate Trainer manually, include both weight_args={} and arch_args={} unless you already ran prepare_args.
  • prepare_args currently wires optim=adam|sgd and scheduler=step. adagrad, rmsprop, cos, and exp appear in the parser/help text but are not fully populated by the current implementation.
  • Vision and PAWS-X example scripts may download pretrained backbones or model weights on first run; that is expected and should be called out when a user is offline.

Read next

  • references/api-reference.md for the verified Python API surface.
  • references/configuration.md for shared CLI flags and method-specific options.
  • references/troubleshooting.md for cross-cutting install, import, and runtime failures.

04 同仓库更多 Skills

VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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.

★ 351
VectorSpaceLab
VectorSpaceLab/AREX-Skill

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).

★ 351