imitation.scripts.ingredients.demonstrations#
This ingredient provides (expert) demonstrations to learn from.
The demonstrations are either loaded from disk, from the HuggingFace Dataset Hub, or sampled from the expert policy provided by the expert ingredient.
Functions
|
Loads expert demonstrations. |
- imitation.scripts.ingredients.demonstrations.get_expert_trajectories(source, path)[source]#
Loads expert demonstrations.
- Parameters
source (
str
) – Can be either local to load rollouts from the disk, huggingface to load from the HuggingFace hub or generated to generate the expert trajectories.path (
str
) – A path containing a pickled sequence of sources.Trajectory.
- Return type
Sequence
[Trajectory
]- Returns
The expert trajectories.
- Raises
ValueError – if source is not in [“local”, “huggingface”, “generated”].