TorchLean API

NN.API.RL.Cli

RL CLI Helpers (API) #

TorchLean's runnable RL examples (NN/Examples/Models/RL/*) share one CLI shape:

This module centralizes that parsing so we don't duplicate the same flag boilerplate across CartPole/Pong/GridWorld examples.

Parsed PPO-style training flags shared by multiple runnable examples.

Instances For
    @[implicit_reducible]
    def NN.API.rl.cli.parsePpoFlags (exeName : String) (args : List String) (defaultLogPath : System.FilePath) (defaultUpdates defaultEvalEvery defaultEvalEpisodes defaultEvalMaxSteps : ) :

    Parse PPO-style shared flags.

    Notes:

    • --log off|none|false disables writing the JSON artifact but still returns the resolved default logPath (useful for printing consistent banners).
    • We treat 0 as invalid for the update/eval counts because a “no-op” run usually indicates a CLI mistake.
    Instances For