The interface is localized. Skill descriptions and documents are machine-translated by AI into your language; code, commands, paths and technical terms stay in the original, and the author's document governs.
Explore skills
DevOps · SKILL.md

architecture-api

architecture-api

Inspect and modify D-FINE architecture, registry, YAMLConfig, model components, deploy mode, and API behavior.

Independent GitHub snapshot · Automated classification · Original documentation governs

Skill documentation

GitHub

name: architecture-api description: "Inspect and modify D-FINE architecture, registry, YAMLConfig, model components, deploy mode, and API behavior." disable-model-invocation: true metadata: disco-role: operating license: Apache 2.0

D-FINE Architecture and API Router

Use this sub-skill when a task is about D-FINE internals rather than just running a training or inference command: YAML registry construction, component names in configs, model assembly, D-FINE decoder behavior, deploy mode, criterion/postprocessor APIs, checkpoint shape mismatches, or adding a custom component.

Route here for

  • Explaining how YAMLConfig, GLOBAL_CONFIG, register(), and create() turn YAML type names into Python objects.
  • Inspecting model components such as DFINE, HGNetv2, HybridEncoder, DFINETransformer, DFINECriterion, HungarianMatcher, and DFINEPostProcessor.
  • Diagnosing The module ... is not registered, Missing inject config, invalid type entries, or component channel/stride mismatches.
  • Understanding deploy-mode conversion before ONNX export or inference.
  • Planning code changes for a new backbone, encoder, decoder, criterion, matcher, postprocessor, optimizer, transform, dataset, or evaluator.
  • Checking a config/model safely with scripts/inspect_dfine_model.py before long training or export.

Route away

First actions

  1. Read references/api-reference.md for verified signatures, registry semantics, and component relationships.
  2. Read references/model-architecture.md when the task asks about D-FINE, FDR/GO-LSD-related knobs, model sizes, deploy mode, or component responsibilities.
  3. Run python scripts/inspect_dfine_model.py --repo-root <d-fine-checkout> --config <config.yml> --build-model for a safe import/config/model probe. Add --allow-pretrained only when the user wants pretrained backbone lookup/download behavior.
  4. For errors, use references/troubleshooting.md before editing code or config.

Safety and evidence rules

  • Disable HGNetv2 pretrained lookup for inspection unless the user explicitly wants to test pretrained weight availability.
  • Treat config keys and registered class names as case-sensitive.
  • Prefer inspecting config construction and parameter counts before attempting a dummy forward; full forward, training, or evaluation can be slow and data/backend dependent.
  • When adding a component, update both the Python registration/import path and the YAML type/injection references that select it.
Saved skills