imitation.scripts.ingredients.policy#

This ingredient provides a newly constructed stable-baselines3 policy.

Functions

make_policy(venv, policy_cls, policy_kwargs)

Makes policy.

imitation.scripts.ingredients.policy.make_policy(venv, policy_cls, policy_kwargs)[source]#

Makes policy.

Parameters
  • venv (VecEnv) – Vectorized environment we will be imitating demos from.

  • policy_cls (Type[BasePolicy]) – Type of a Stable Baselines3 policy architecture. Specify only if policy_path is not specified.

  • policy_kwargs (Mapping[str, Any]) – Keyword arguments for policy constructor. Specify only if policy_path is not specified.

Return type

BasePolicy

Returns

A Stable Baselines3 policy.