AGENT SKILL

core-api

Routes LibMTL's Trainer, shared configuration, and built-in API surface.

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

01 前言 Front Matter

name
core-api
license
MIT
metadata
{ "disco-role": "operating" }
description
Routes LibMTL's Trainer, shared configuration, and built-in API surface.
disable-model-invocation
true

02 资源文件 3

03 SKILL.md 正文

core-api

Use this sub-skill when the task is about the shared LibMTL API rather than a specific benchmark dataset.

Covers

  • LibMTL.Trainer construction and runtime behavior.
  • LibMTL.config.LibMTL_args and prepare_args.
  • Built-in losses, metrics, architectures, weightings, and backbone builders.
  • The shared utility helpers in LibMTL.utils.
  • Direct inspection of the API surface before writing a custom benchmark or a new method.

Does not cover

  • Dataset-specific file layouts or benchmark commands.
  • New-task adaptation recipes; use customization for that.
  • NYUv2/Cityscapes, Office-31/Office-Home, QM9, or PAWS-X details.

When to use this sub-skill

Choose this route when the user asks things like:

  • "How do I instantiate Trainer correctly?"
  • "Which weighting and architecture names are supported?"
  • "What does prepare_args return?"
  • "How do the built-in backbones and utilities fit together?"
  • "Why did a direct Trainer call fail even though the docs looked correct?"

Read next

  • ../../references/api-reference.md for the verified signature and exported classes.
  • ../../references/configuration.md for shared CLI and method flags.
  • ../../references/troubleshooting.md for configuration and runtime failures.

Workflow

  1. Confirm whether the user is passing string names or class objects.
  2. Confirm whether prepare_args is being used. If not, check that both weight_args and arch_args are supplied.
  3. Confirm the runtime has CUDA. The trainer's default device is cuda:0.
  4. Check the requested weighting and architecture names against the exported module lists.
  5. If the request is to validate the install rather than solve a dataset task, run scripts/check_core_api.py.

Common gotchas

  • Trainer resolves weighting and architecture names internally. Pass strings such as "EW" and "HPS".
  • The supported optimizer/scheduler combinations in the current code are narrower than the parser help suggests; adam/sgd and step are the safe choices.
  • resnet18 and resnet_dilated return feature maps. They are not end-to-end classifiers.
  • MOML, FORUM, and AutoLambda are treated as bilevel methods and use the trainer's special path.

Exit criteria

Leave this sub-skill when you can answer, from the bundled files alone:

  • which object to import,
  • which string names to pass,
  • which kwargs must be present,
  • and what failures mean the configuration is wrong versus the environment is incomplete.

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