ml_switcheroo.frameworks¶
Framework Adapters Package.
Automatically discovers and registers framework adapters. Exposes concrete Adapter classes for testing/typing convenience.
Submodules¶
- ml_switcheroo.frameworks.base
- ml_switcheroo.frameworks.common
- ml_switcheroo.frameworks.flax_nnx
- ml_switcheroo.frameworks.jax
- ml_switcheroo.frameworks.keras
- ml_switcheroo.frameworks.mlx
- ml_switcheroo.frameworks.numpy
- ml_switcheroo.frameworks.optax_shim
- ml_switcheroo.frameworks.paxml
- ml_switcheroo.frameworks.tensorflow
- ml_switcheroo.frameworks.torch
Attributes¶
Classes¶
Protocol definition for a Framework Adapter. |
Functions¶
|
|
|
|
|
Returns a list of all registered framework keys. |
Package Contents¶
- class ml_switcheroo.frameworks.FrameworkAdapter¶
Bases:
ProtocolProtocol definition for a Framework Adapter.
- convert(data: Any) Any¶
- property test_config: Dict[str, str]¶
- property search_modules: List[str]¶
- property display_name: str¶
- property ui_priority: int¶
- property discovery_heuristics: Dict[str, List[str]]¶
- property supported_tiers: List[ml_switcheroo.enums.SemanticTier]¶
- property import_alias: Tuple[str, str]¶
- property inherits_from: str | None¶
- property structural_traits: ml_switcheroo.semantics.schema.StructuralTraits¶
- property rng_seed_methods: List[str]¶
- get_device_syntax(device_type: str, device_index: str | None = None) str¶
- get_serialization_syntax(op: str, file_arg: str, object_arg: str | None = None) str¶
- get_serialization_imports() List[str]¶
- classmethod get_example_code() str¶
- get_tiered_examples() Dict[str, str]¶
- property definitions: Dict[str, StandardMap]¶
Returns the framework’s static implementation of Middle Layer Operations.
- property import_namespaces: Dict[str, Dict[str, str]]¶
Returns import path remapping rules. Format: {“source.mod”: {“root”: “target”, “sub”: “mod”, “alias”: “alias”}}
- collect_api(category: StandardCategory) List[ml_switcheroo.core.ghost.GhostRef]¶
- apply_wiring(snapshot: Dict[str, Any]) None¶
- ml_switcheroo.frameworks.register_framework(name: str)¶
- ml_switcheroo.frameworks.get_adapter(name: str) FrameworkAdapter | None¶
- ml_switcheroo.frameworks.TorchAdapter = None¶
- ml_switcheroo.frameworks.JaxAdapter = None¶
- ml_switcheroo.frameworks.FlaxNNXAdapter = None¶
- ml_switcheroo.frameworks.PaxmlAdapter = None¶
- ml_switcheroo.frameworks.NumpyAdapter = None¶
- ml_switcheroo.frameworks.TensorFlowAdapter = None¶
- ml_switcheroo.frameworks.MLXAdapter = None¶
- ml_switcheroo.frameworks.available_frameworks() List[str]¶
Returns a list of all registered framework keys.