Shared Model Training Commands #
Example-side command runners for built-in runnable models.
The trainer API provides Trainer.new, trainer.train, and trained prediction handles. This
file owns repository command plumbing: parse example flags, check local files, run training, and
print the standard summary.
def
NN.Examples.Models.TrainCommand.csv
{Result : Type}
(exeName : String)
(args : List String)
(defaultCsv defaultLogPath : System.FilePath)
(defaultSteps : ℕ := 1)
(defaultLr : Float := 1e-3)
(banner : TorchLean.Runtime.Config → String)
(train : TorchLean.Runtime.Config → Support.Training.Options Support.Csv.Options → IO Result)
(report : Result → IO Unit)
:
CSV-backed training command. The caller chooses the objective and result reporting.
Instances For
def
NN.Examples.Models.TrainCommand.npy
{Result : Type}
(exeName : String)
(args : List String)
(parseFlags : List String → Except String (Support.Training.Options Support.Npy.Options × List String))
(banner : TorchLean.Runtime.Config → String)
(train : TorchLean.Runtime.Config → Support.Training.Options Support.Npy.Options → IO Result)
(report : Result → IO Unit)
(target : String := "target")
:
NPY-backed training command. The caller chooses the objective and result reporting.
Instances For
def
NN.Examples.Models.TrainCommand.forecast
{Result : Type}
(exeName : String)
(args : List String)
(parseFlags : List String → Except String (Support.Training.Options Support.Forecast.Options × List String))
(banner : TorchLean.Runtime.Config → String)
(train : TorchLean.Runtime.Config → Support.Training.Options Support.Forecast.Options → IO Result)
(report : Result → IO Unit)
:
Forecasting command with caller-supplied training and result reporting.