TorchLean API

NN.API.CLI.Training

Training Command-Line Options #

Command-line options shared by runnable training programs. These records describe process-level choices such as step counts, log destinations, and CUDA allocator sampling. Model definitions and the Trainer.train API do not depend on them.

Step, batching, logging, and allocator-reporting options for a training command.

  • steps : Nat

    Number of optimizer updates.

  • batchSize : Nat

    Number of in-memory samples consumed by one optimizer update.

  • logDestination : Training.LogDestination

    Destination for the JSON training log.

  • cudaMemorySampleEvery : Nat

    Number of completed steps between CUDA allocator samples; 0 selects the default policy.

Instances For
    def TorchLean.CLI.Training.RunOptions.parse (exeName : String) (arguments : List String) (defaultLogPath : System.FilePath) (defaultSteps defaultBatchSize : Nat := 1) (allowZeroSteps : Bool := false) :

    Parse the common options accepted by runnable training commands.

    Instances For

      Training command options that also select a learning rate.

      • steps : Nat

        Number of optimizer updates.

      • batchSize : Nat

        Number of in-memory samples consumed by one optimizer update.

      • logDestination : Training.LogDestination

        Destination for the JSON training log.

      • cudaMemorySampleEvery : Nat

        Number of completed steps between CUDA allocator samples; 0 selects the default policy.

      • learningRate : Float

        Learning rate passed to the command's optimizer constructor.

      Instances For

        Step, batching, and logging settings without the optimizer learning rate.

        Instances For
          def TorchLean.CLI.Training.OptimizerOptions.parse (exeName : String) (arguments : List String) (defaultLogPath : System.FilePath) (defaultSteps : Nat := 1) (defaultLearningRate : Float := 1e-3) (defaultBatchSize : Nat := 1) (allowZeroSteps : Bool := false) :

          Parse run options followed by a positive --lr value.

          Instances For