ml_switcheroo.testing.fuzzer.heuristics ======================================= .. py:module:: ml_switcheroo.testing.fuzzer.heuristics .. autoapi-nested-parse:: Name-Based Heuristics for Input Generation. This module provides fallback logic for generating inputs when explicit type hints are missing, generally based on argument naming conventions. Functions --------- .. autoapisummary:: ml_switcheroo.testing.fuzzer.heuristics.guess_dtype_by_name ml_switcheroo.testing.fuzzer.heuristics.generate_by_heuristic Module Contents --------------- .. py:function:: guess_dtype_by_name(name: str) -> str Guesses the logical type of an argument based on its name. :param name: The argument name. :type name: str :returns: 'bool', 'int', or 'float'. :rtype: str .. py:function:: generate_by_heuristic(name: str, base_shape: Tuple[int, Ellipsis], constraints: Dict[str, Any] = None) -> Any Generates a value based on the argument name when no type hint is provided. Respects provided constraints if any. :param name: Argument name (e.g. 'axis', 'x'). :type name: str :param base_shape: Default shape for array generation. :type base_shape: Tuple :param constraints: Optional constraints (min/max/type). :type constraints: Dict :returns: Generated value. :rtype: Any