TorchLean API

NN.Examples.ModelZoo.Command

Model-Zoo Commands #

Command-line records used by TorchLean's runnable model examples.

These declarations live with the model zoo because they describe repository commands and local artifact formats, not the tensor, trainer, or runtime API. Applications can use the public trainer directly without importing diffusion schedules, PPM paths, or prepared-dataset defaults.

Generative-model artifacts #

Diffusion schedule parameters exposed by the model-zoo diffusion command.

  • T :

    Number of diffusion timesteps in the schedule.

  • betaStart : Float

    First beta value in the schedule.

  • betaEnd : Float

    Final beta value in the schedule.

Instances For
    def NN.Examples.ModelZoo.DiffusionScheduleFlags.parse (args : List String) (defaultT : := 100) (defaultBetaStart : Float := 1e-4) (defaultBetaEnd : Float := 0.12) :

    Parse --T, --beta-start, and --beta-end.

    Instances For

      Stable TrainLog metadata for a diffusion schedule.

      Instances For

        Optional image artifacts emitted by generation and reconstruction examples.

        Instances For

          Parse image-artifact paths and the optional reconstruction timestep.

          Instances For

            Stable TrainLog metadata for requested image artifacts.

            Instances For

              Prepared-data and diagnostic artifacts #

              Train/test tensor paths and row counts for paired-NPY scientific examples.

              • trainRows :

                Number of rows loaded from the prepared training tensors.

              • testRows :

                Number of rows loaded from the prepared held-out tensors.

              • evalRows :

                Prefix length used for deterministic train/test loss reports.

              • Training input .npy path.

              • Training target .npy path.

              • Held-out input .npy path.

              • Held-out target .npy path.

              Instances For
                def NN.Examples.ModelZoo.PairedNpyEvalFlags.parse (args : List String) (defaultTrainX defaultTrainY defaultTestX defaultTestY : System.FilePath) (defaultTrainRows defaultTestRows : ) (defaultEvalRows : := 16) :

                Parse train/test paths and row counts for paired NPY tensors.

                Instances For

                  Stable TrainLog metadata for paired train/test NPY tensors.

                  Instances For

                    Optional CSV artifact path for commands that emit one tabular diagnostic.

                    Instances For

                      Parse the optional --plot-csv artifact path.

                      Instances For

                        Prepared NPY feature/target paths and their row budget.

                        • Prepared feature or image tensor path.

                        • Prepared label or target tensor path.

                        • nRows :

                          Number of rows to read from the arrays.

                        • seed :

                          Data-loader seed.

                        Instances For

                          Parse --seed, --n-total, --x, and --y for an NPY-backed example.

                          Instances For

                            Stable TrainLog metadata for an NPY-backed dataset branch.

                            Instances For

                              Prepared image datasets understood by the built-in image-model commands.

                              Instances For

                                Parse the dataset selector and reject ambiguous combinations.

                                Instances For

                                  Prepared forecasting-window paths and report controls.

                                  • Prepared input-window tensor path.

                                  • Prepared target-window tensor path.

                                  • windows :

                                    Number of forecasting windows to use.

                                  • reportOffset :

                                    Window index used for before/after forecast display.

                                  • seed :

                                    Data-loader seed.

                                  Instances For

                                    Stable TrainLog metadata for forecasting-window datasets.

                                    Instances For

                                      Data plus training controls #

                                      Standard model-training flags plus a reproducibility seed.

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

                                        Parse the standard model-training flags together with --seed.

                                        Instances For

                                          Parse NPY data and logged-training flags, then reject unused command arguments.

                                          Instances For
                                            def NN.Examples.ModelZoo.NpyModelTrainFlags.parse (exeName : String) (args : List String) (defaultLogPath : System.FilePath) (defaultSteps : := 1) (defaultLr : Float := 1e-3) (parseData : List StringExcept String (NpyDataFlags × List String)) :

                                            Parse NPY data and the standard model-training flags.

                                            Instances For

                                              Parse forecasting data and the standard model-training flags.

                                              Instances For

                                                Optimizer/training flags for a model command that reads one supervised CSV.

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

                                                  Parse a CSV path, seed, and the standard model-training flags.

                                                  Instances For
                                                    def TorchLean.CLI.Training.RunOptions.toTrainerOptions (opts : RunOptions) (enableLog : Bool := true) (logEvery : := 0) (title : String := "Training") (notes : Array String := #[]) :

                                                    Convert parsed command options to the options consumed by Trainer.train.

                                                    Instances For
                                                      def TorchLean.CLI.Training.RunOptions.toTrainerOptionsWhenRequested (opts : RunOptions) (args : List String) (logEvery : := 0) (title : String := "Training") (notes : Array String := #[]) :

                                                      Enable logging only when the command line explicitly contains --log.

                                                      Instances For

                                                        Convert parsed optimizer and command options to the options consumed by Trainer.train.

                                                        Instances For