TorchLean API

NN.API.CLI.Training.Command

Training Application Commands #

Compose an application-specific data parser and training callback with common CLI options.

def TorchLean.CLI.Training.Command.runParsedWith {φ ρ : Type} (exeName : String) (args : List String) (parseFlags : List StringExcept String (φ × List String)) (banner : Runtime.ConfigString) (train : Runtime.ConfigφIO ρ) (finish : Runtime.ConfigφρIO Unit) (usage? : Option String := none) :

Run a parsed training command and finish with access to runtime flags and the result.

Instances For
    def TorchLean.CLI.Training.Command.runParsed {φ ρ : Type} (exeName : String) (args : List String) (parseFlags : List StringExcept String (φ × List String)) (banner : Runtime.ConfigString) (train : Runtime.ConfigφIO ρ) (print : ρIO Unit) (usage? : Option String := none) :

    Run a parsed training command whose final printer only needs the trained result.

    Instances For

      Shared command runner for training applications with a caller-defined data parser.

      Applications supply their data selection and training callback. The runner owns common flags, help output, and runtime selection.

      • exeName : String

        CLI subcommand name, for example rnn.

      • defaultLogPath : System.FilePath

        Default JSON log path used when --log is omitted.

      • defaultSteps :

        Default number of optimizer steps when --steps is omitted.

      • defaultLearningRate : Float

        Learning rate used when --lr is omitted.

      • description : String

        Model description used in banners.

      • dataOptions : Array String

        Command-specific data flags, rendered by --help.

      • parseData : List StringExcept String (δ × List String)

        Parse data flags, then leave device/training flags for the shared parser.

      • train : Runtime.ConfigδOptimizerOptionsIO Unit

        Run the actual training body after data, device, and training flags have been parsed.

      Instances For

        Usage text for training applications using the shared runner.

        Instances For

          Run a public native-arithmetic training command.

          Instances For