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 :

    Number of optimizer updates.

  • batchSize :

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

  • Destination for the JSON training log.

  • logPath : System.FilePath

    Resolved log path, retained for command summaries.

  • cudaMemWatch :

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

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

    Parse the common options accepted by runnable training commands.

    Instances For
      def TorchLean.CLI.Training.RunOptions.writeLossComparison (opts : RunOptions) (title : String) (beforeLoss afterLoss : Float) (notes : Array String := #[]) :

      Write a before-and-after loss log using the command's selected destination and step count.

      Instances For

        Training command options that also select a learning rate.

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

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

          Instances For

            Write a before-and-after loss log for an optimizer command.

            Instances For