ml_switcheroo.cli.handlers.learning¶
Interactive and Learning Command Handlers.
This module provides tools for: 1. Wizard: Interactive CLI to categorize unmapped APIs. 2. Harvest: Learning mappings from manual test files.
Functions¶
|
Handles the 'wizard' command for interactive mapping discovery. |
|
Handles the 'harvest' command to learn mappings from manual tests. |
Module Contents¶
- ml_switcheroo.cli.handlers.learning.handle_wizard(package: str) int¶
Handles the ‘wizard’ command for interactive mapping discovery.
- Parameters:
package – The name of the python package to inspect (e.g., ‘torch’).
- Returns:
Exit code (0 for success).
- Return type:
int
- ml_switcheroo.cli.handlers.learning.handle_harvest(path: pathlib.Path, target: str, dry_run: bool) int¶
Handles the ‘harvest’ command to learn mappings from manual tests.
- Parameters:
path – File or directory containing python test files.
target – The framework target used in the tests (e.g., ‘jax’).
dry_run – If True, prints changes without writing to disk.
- Returns:
Exit code (0 for success, 1 for path errors).
- Return type:
int