TorchLean Example Runner #
Executable root for the torchlean example runner.
Each example keeps its own namespace, and this module selects which one to run from a subcommand
argument such as mlp or gpt2.
Runtime flags that consume the following command-line token.
Instances For
Split CLI arguments into (prefixFlags, command, commandArgs).
We allow "global" runtime flags before the command name so users can write either:
torchlean mlp --device cpu, ortorchlean --device cpu mlp.
Instances For
Detect whether the command line already selects a runtime device.
Instances For
Read one line, treating EOF as the default answer.
Instances For
Ask for the device in the interactive runtime chooser.