TorchLean API

NN.Examples.Support.Command

Runnable Example Commands #

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

These declarations live under example support 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 runnable diffusion example.

  • 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.Support.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.Support.PairedNpyEvalFlags.parse (exeName : String) (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 #

                                      Fixed-step training flags paired with an NPY dataset.

                                      Instances For

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

                                        Instances For

                                          Optimizer/training flags paired with an NPY dataset.

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

                                            Parse NPY data and the standard model-training flags.

                                            Instances For

                                              Optimizer/training flags paired with a forecasting-window dataset.

                                              Instances For
                                                def NN.Examples.Support.ForecastWindowModelTrainFlags.parse (exeName : String) (args : List String) (defaultLogPath : System.FilePath) (defaultSteps : := 100) (defaultLearningRate : Float := 1e-2) (parseData : List StringExcept String (ForecastWindowDataFlags × List String)) :

                                                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.Support.parseCsvTrainFlags (exeName : String) (args : List String) (defaultCsv defaultLogPath : System.FilePath) (defaultSteps : := 1) (defaultLearningRate : Float := 1e-3) (allowZeroSteps : Bool := false) :

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

                                                    Instances For