QDpy
Loading...
Searching...
No Matches
qdpy.rl.qdos.QDOS Class Reference

Train trajectory skills from a fixed log and adapt a high-level controller online. More...

Public Member Functions

 stats (self)
 pretrain (self, updates)
 Fit the skill and advantage networks from logged segments only.
 train (self, max_env_steps)
 Spend exactly the additional primitive-step budget on the deployed hierarchy.
 policy (self, *, seed=0, device=None)
 Copy both inference actors without replay or optimizer state.

Detailed Description

Train trajectory skills from a fixed log and adapt a high-level controller online.

Discover skills with a trajectory VAE and compose them using semi-Markov SAC.

:param env_factory: Single Gymnasium environment with fixed Box observations and actions.
:param episodes: Completed rollout.Episode records from the same observation and action spaces.
:param config: Skill learning, reward relabeling and mixed replay settings.
:param sac: SACConfig for primitive discount, critics and high-level SAC.
    learning_starts is measured in live primitive steps.
:param policy: Network architecture for both actors and the trajectory encoder.
:param max_episode_steps: External episode safety horizon.
:param seed: Nonnegative seed for data sampling, optimizers and reset.
:param device: Torch device. CPU by default.

Definition at line 261 of file qdos.py.

Member Function Documentation

◆ policy()

qdpy.rl.qdos.QDOS.policy ( self,
* ,
seed = 0,
device = None )

Copy both inference actors without replay or optimizer state.

Return a new episode-state QDOSPolicy for evaluation or export.

Definition at line 456 of file qdos.py.

◆ pretrain()

qdpy.rl.qdos.QDOS.pretrain ( self,
updates )

Fit the skill and advantage networks from logged segments only.

Continue offline updates up to the first call to train().

Definition at line 335 of file qdos.py.

◆ stats()

qdpy.rl.qdos.QDOS.stats ( self)
Return the updated split of logged, live, and optimizer work.

Definition at line 317 of file qdos.py.

◆ train()

qdpy.rl.qdos.QDOS.train ( self,
max_env_steps )

Spend exactly the additional primitive-step budget on the deployed hierarchy.

Continue high-level SAC in a fresh environment with the same spaces.

A cut prefix without an environment boundary is counted and
omitted from replay. A completed short terminal or truncated
skill is kept with its actual duration and last observation.

Definition at line 410 of file qdos.py.


The documentation for this class was generated from the following file: