ml_switcheroo.discovery.scaffolder¶

Scaffolding Tool for Knowledge Base Discovery.

This module provides the Scaffolder class, which inspects installed libraries (Torch, JAX, etc.) and aligns them against the Specification-Guided Knowledge Base.

Optimization Update: - Implements Indexing for Catalog Lookups to prevent O(N^2) complexity

when aligning massive frameworks (Torch vs JAX).

  • Uses pre-computed indices keyed by lowercase API names for fast retrieval.

Classes¶

Scaffolder

Automated discovery tool that aligns framework APIs.

Module Contents¶

class ml_switcheroo.discovery.scaffolder.Scaffolder(semantics: ml_switcheroo.semantics.manager.SemanticsManager | None = None, similarity_threshold: float = 0.8, arity_penalty: float = 0.3)¶

Automated discovery tool that aligns framework APIs.

Optimized with catalog indexing to handle large-scale API surfaces efficiently.

inspector¶
console¶
semantics¶
similarity_threshold = 0.8¶
arity_penalty = 0.3¶
staged_specs: Dict[str, Dict[str, Any]]¶
staged_mappings: Dict[str, Dict[str, Any]]¶
scaffold(frameworks: List[str], root_dir: pathlib.Path | None = None)¶

Main entry point. Scans frameworks and builds/updates JSON mappings.