TorchLean API

NN.API.Module.Command

Executable Module Commands #

Command-line support for executable TorchLean programs, including help output, seed parsing, banners, and exit codes. Module construction and device selection are defined in NN.API.Module.Execution.

Options for TorchLean.Module.run (banner printing, trailing success message, and flushing).

  • banner? : Option (OptionsString)

    Optional banner to print before executing the program.

  • flush : Bool

    Flush stdout after printing the banner, when present.

  • printOk : Bool

    Print "{exeName}: ok" on success.

Instances For

    Print the configured executable banner, if one was supplied.

    Instances For

      How run should select the scalar backend for an executable.

      Instances For

        Generic help text for executables built on TorchLean.Module.run.

        Instances For
          def TorchLean.Module.run (exeName : String) (args : List String) (action : RunAction) (runOpts : RunOptions := { }) :

          Run a TorchLean executable after parsing the shared seed and runtime flags.

          The selected seed initializes TorchLean's global random stream and is also stored in Options, so model initialization and the eager or compiled session observe the same seed.

          Instances For