TorchLean API

NN.API.Public.Facade.ModelZoo.Core

TorchLean Model-Zoo Facade #

Flag and logging adapters used by runnable examples.

The ordinary training API is Trainer.new plus trainer.train. This module keeps repository command plumbing in the ModelZoo namespace instead of mixing it into the trainer core.

def TorchLean.ModelZoo.parseLoggedTrainFlags (exeName : String) (args : List String) (defaultLogPath : System.FilePath) (defaultSteps : := 1) (allowZeroSteps : Bool := false) :

Parse shared logged-training flags for model-zoo commands.

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

    Parse shared optimizer/training flags for model-zoo commands.

    Instances For
      def TorchLean.ModelZoo.parseCsvTrainFlags (exeName : String) (args : List String) (defaultCsv defaultLogPath : System.FilePath) (defaultSteps : := 1) (defaultLr : Float := 1e-3) :

      Parse shared CSV path plus optimizer/training flags for model-zoo commands.

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

        Parse shared seeded optimizer/training flags for model-zoo commands.

        Instances For
          def TorchLean.ModelZoo.LoggedTrainFlags.trainOptions (flags : LoggedTrainFlags) (enableLog : Bool := true) (logEvery : := 0) (title : String := "Training") (notes : Array String := #[]) :

          Build public trainer options from logged model-zoo flags.

          Instances For

            Build training options that write a log only when the original CLI arguments include --log.

            Tutorial commands use this when they want clean terminal output by default but still support the standard TrainLog artifact without repeating the flag check in each file.

            Instances For

              Write a before/after loss artifact from logged model-zoo flags.

              Instances For
                def TorchLean.ModelZoo.TrainFlags.trainOptions (flags : TrainFlags) (logEvery : := 0) (title : String := "Training") (notes : Array String := #[]) :

                Build public trainer options from optimizer/training model-zoo flags.

                Instances For

                  Write a before/after loss artifact from optimizer/training model-zoo flags.

                  Instances For