nvflare.tool.agent.frameworks.registry module

Framework detector registry.

Adding a framework with active detection = implement a FrameworkDetector in its own module and append it to _DETECTORS. Frameworks we only recognize by import (no active class/call detection yet) live in IMPORT_ONLY_ROOTS until a full detector and conversion skill land.

detectors() list[FrameworkDetector][source]
evidence_weights() dict[str, int][source]
family_base_has_member(base: str | None, evidence_by_framework: dict) str | None[source]

If base is a family base with a member present in evidence, return the member name.

framework_for_import(module: str) str | None[source]

Map an imported module to its framework bucket by top-level segment.

is_active_evidence(framework: str, evidence: dict) bool[source]
recommended_skill_for(framework: str | None) str | None[source]
resolve_primary_framework(primary: str, evidence_by_framework: dict, resolver) str[source]

Disambiguate a family conflict (e.g. PyTorch vs PyTorch Lightning).

Returns the framework that should be primary. Only overrides primary when it is part of a family whose base and member both have evidence; the member detector owns the promotion decision.