embodichain.learning.rl.train

embodichain.learning.rl.train#

Overview#

Training entry points and command-line helpers for launching RL experiments.

Functions

cli([argv])

Command-line interface for RL training.

parse_args([argv])

Parse command-line arguments.

train_from_config(config_path[, ...])

Run training from a config file path.

Functions:

cli([argv])

Command-line interface for RL training.

parse_args([argv])

Parse command-line arguments.

train_from_config(config_path[, ...])

Run training from a config file path.

embodichain.learning.rl.train.cli(argv=None)[source]#

Command-line interface for RL training.

Parses CLI arguments and launches training from a config file.

Task packages are discovered (and init hooks executed) before training so that task environments registered in separate packages (e.g. embodichain_tasks) are available to build_env. This mirrors the run_task CLI.

Return type:

None

embodichain.learning.rl.train.parse_args(argv=None)[source]#

Parse command-line arguments.

Parameters:

argv (Sequence[str] | None) – Arguments excluding the command name. Uses sys.argv when omitted.

Return type:

Namespace

Returns:

Parsed training arguments.

embodichain.learning.rl.train.train_from_config(config_path, distributed=None, *, profile=False, profile_output=None, resume=None, run=None, resume_scheduler='restore')[source]#

Run training from a config file path.

Parameters:
  • config_path (str) – Path to the training config file (.json, .yaml, or .yml).

  • distributed (bool | None) – If True, run multi-GPU distributed training. If None, use trainer.distributed from config.

  • profile (bool) – Enable gym EnvProfiler on the training environment.

  • profile_output (str | None) – Optional JSON dump path for the profiling report.

  • resume (str | Path | None) – Checkpoint file, or latest/best selected from run.

  • run (str | Path | None) – Source run directory when resume selects latest/best.

  • resume_scheduler (str) – Restore the saved LR curve or restart the configured curve with optimizer momentum retained.

Return type:

dict[str, object] | None

Returns:

The lightweight trainer summary, or None for simulator training.