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.Schedule.Options.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.Npy.SplitOptions.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

                    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.

                    Instances For
                      def NN.Examples.Support.Npy.Options.parse (args : List String) (defaultX defaultY : System.FilePath) (defaultRows : ℕ) :

                      Parse --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.

                          • imagenet64 : Dataset

                            Prepared 64x64 RGB image tensors.

                          • cifar10 : Dataset

                            Prepared CIFAR-10 32x32 RGB tensors.

                          Instances For

                            Parse --dataset cifar10|imagenet64; without the flag the dataset is imagenet64.

                            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.

                              Instances For

                                Stable TrainLog metadata for forecasting-window datasets.

                                Instances For

                                  Data plus training controls #

                                  Training controls paired with the caller's data options.

                                  Instances For
                                    @[instance_reducible]
                                    instance NN.Examples.Support.Training.instReprOptions {Data✝ : Type} [Repr Data✝] :
                                    Repr (Options Data✝)
                                    Instances For
                                      def NN.Examples.Support.Training.Options.parse {Data : Type} (exeName : String) (args : List String) (defaultLogPath : System.FilePath) (defaultSteps : ℕ := 1) (defaultLr : Float := 1e-3) (parseData : List String → Except String (Data × List String)) :

                                      Parse data options before the shared optimizer and logging options. Unconsumed arguments remain available to the runtime parser.

                                      Instances For

                                        Data options for a command that reads one supervised CSV.

                                        Instances For

                                          Parse the CSV path, leaving training and runtime options to their parsers.

                                          Instances For