TorchLean API

NN.API.Public.Facade.Trainer.Run

TorchLean Trainer Runtime Options #

Datasets, probes, runtime flag parsing, and per-training options for the public trainer facade.

structure TorchLean.Trainer.Dataset (σ τ : Shape) :

Runtime-polymorphic supervised dataset used by public trainer objects.

Instances For
    structure TorchLean.Trainer.Probe (σ : Shape) :

    A small input probe printed before and after training.

    Instances For
      def TorchLean.Trainer.Probe.vec2 (name : String) (x1 x2 : Float) (expected : Option String := none) :

      Two-coordinate vector probe, useful for small tabular regression examples.

      Instances For
        def TorchLean.Trainer.Probe.ofFloatTensor {σ : Shape} (name : String) (x : Tensor.T Float σ) (inputText : String := "") (expected : Option String := none) :

        Probe built from a concrete Float tensor.

        Instances For

          Override the scalar dtype for this run configuration.

          Instances For

            Override the execution backend for this run configuration.

            Instances For

              Override the execution device for this run configuration.

              Instances For

                Enable or disable runtime-only fast kernels for this run configuration.

                Instances For

                  Override CUDA matmul precision for fast kernels.

                  Instances For

                    Use the eager runtime backend.

                    Instances For

                      Use the proof-compiled runtime backend.

                      Instances For

                        Run on CPU.

                        Instances For

                          Run on CUDA.

                          Instances For

                            Apply parsed runtime/device options to a persistent trainer run configuration.

                            Instances For

                              Build a run configuration from parsed runtime flags and trainer choices.

                              Instances For

                                Lower a public run configuration to the runtime Options record.

                                Instances For

                                  CLI spelling for a Float32 runtime mode.

                                  Instances For

                                    CLI arguments that reproduce a public dtype choice.

                                    Instances For

                                      CLI arguments that reproduce a public backend choice.

                                      Instances For

                                        CLI arguments that reproduce a public device choice.

                                        Instances For

                                          CLI arguments that reproduce the CUDA matmul precision setting.

                                          Instances For

                                            Parse CLI runtime flags into persistent trainer run settings.

                                            Instances For

                                              Resolve runtime flags into a Trainer.RunConfig and reject unused trailing arguments.

                                              Instances For

                                                Lower this persistent run configuration to the standard runtime CLI flags.

                                                Instances For
                                                  def TorchLean.Trainer.Config.fromRunConfig {σ τ : Shape} (run : RunConfig) (task : Task σ τ := Task.regression) (seed : := 0) :
                                                  Config σ τ

                                                  Build unified trainer construction options from an already parsed runtime configuration.

                                                  Instances For

                                                    CLI-friendly public run configuration constructor.

                                                    Instances For

                                                      Runtime configuration carried by this trainer.

                                                      Instances For

                                                        Runtime configuration carried by this trainer.

                                                        Instances For

                                                          Runtime configuration carried by this trainer.

                                                          Instances For

                                                            Per-training-call options for the public trainer facade.

                                                            • steps :

                                                              Number of optimizer updates.

                                                            • batchSize :

                                                              Requested minibatch size for public training calls.

                                                              Fixed-shape model-zoo trainers may already carry their batch axis in the model type. This field is still part of the public API so ordinary scripts can write the same record shape across simple tensor datasets, loader-backed examples, and future batched trainer paths.

                                                            • logEvery :

                                                              Print step losses every logEvery updates; 0 disables stdout step logging.

                                                            • Optional TrainLog artifact destination. Use .disabled for stdout-only runs.

                                                            • title : String

                                                              Title used when writing a TrainLog artifact.

                                                            • notes : Array String

                                                              Free-form notes attached to the TrainLog artifact.

                                                            • loadParams? : Option System.FilePath

                                                              Optional exact-bits parameter checkpoint loaded before training.

                                                            • saveParams? : Option System.FilePath

                                                              Optional exact-bits parameter checkpoint written after training.

                                                            Instances For

                                                              Start training options with a fixed number of optimizer steps.

                                                              Instances For

                                                                Override stdout step logging cadence.

                                                                Instances For

                                                                  Override the requested minibatch size.

                                                                  Instances For

                                                                    Override the training-log destination.

                                                                    Instances For

                                                                      Disable TrainLog artifact writing for a training call that will write a richer custom artifact later.

                                                                      Instances For

                                                                        Override the training-log title.

                                                                        Instances For

                                                                          Override the training-log notes.

                                                                          Instances For

                                                                            Load an exact-bits parameter checkpoint before training.

                                                                            Instances For

                                                                              Save an exact-bits parameter checkpoint after training.

                                                                              Instances For

                                                                                Lower the public training options to the advanced runtime training config.

                                                                                Instances For

                                                                                  A named classification input used for before/after prediction reporting.

                                                                                  Instances For

                                                                                    Convert a single-example class probe into the batched tensor probe used by trainer.train.

                                                                                    Instances For