imitation.scripts.ingredients.expert#

This ingredient provides an expert policy.

The expert policy is either loaded from disk or from the HuggingFace Model Hub or is a test policy (e.g., random or zero). The supported policy types are:

  • ppo and sac: A policy trained with SB3.

    Needs a path in the loader_kwargs.

  • <algo>-huggingface (algo can be ppo or sac):

    A policy trained with SB3 and uploaded to the HuggingFace Model Hub. Will load the model from the repo <organization>/<algo>-<env_name>. You can set the organization with the organization key in loader_kwargs. The default is HumanCompatibleAI.

  • random: A policy that takes random actions.

  • zero: A policy that takes zero actions.

Functions

config_hook(config, command_name, logger)

get_expert_policy(venv, policy_type, ...)

imitation.scripts.ingredients.expert.config_hook(config, command_name, logger)[source]#
imitation.scripts.ingredients.expert.get_expert_policy(venv, policy_type, loader_kwargs)[source]#