ml_switcheroo.enums¶

Enumerations for ml-switcheroo.

This module defines standard enumerations used across the codebase for semantic categorization and framework identification.

Classes¶

SemanticTier

Categorization of API operations to distinct knowledge base tiers.

LogicOp

Supported operators for conditional logic rules in operations.

Module Contents¶

class ml_switcheroo.enums.SemanticTier¶

Bases: str, enum.Enum

Categorization of API operations to distinct knowledge base tiers.

Used to route definitions to specific JSON files in src/ml_switcheroo/semantics/.

ARRAY_API¶

Basic math and array manipulation (e.g. abs, sum). Maps to k_array_api.json.

NEURAL¶

Nural network layers and stateful operations (e.g. Conv2d, Linear). Maps to k_neural_net.json.

EXTRAS¶

Framework-specific utilities, IO, and device management. Maps to k_framework_extras.json.

ARRAY_API = 'array'¶
NEURAL = 'neural'¶
EXTRAS = 'extras'¶
class ml_switcheroo.enums.LogicOp¶

Bases: str, enum.Enum

Supported operators for conditional logic rules in operations. Used for Conditional API Dispatch.

EQ = 'eq'¶
NEQ = 'neq'¶
GT = 'gt'¶
LT = 'lt'¶
GTE = 'gte'¶
LTE = 'lte'¶
IN = 'in'¶
NOT_IN = 'not_in'¶