Skip to content

Commit

Permalink
Fix formatting issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
ernestum committed Jul 7, 2023
1 parent f47d6e7 commit b5cc7b6
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
5 changes: 4 additions & 1 deletion src/imitation/scripts/ingredients/bc.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
"""This ingredient provides BC algorithm instance by either loading it from disk or constructing it from scratch."""
"""This ingredient provides BC algorithm instance.
It is either loaded from disk or constructed from scratch.
"""
import warnings
from typing import Optional, Sequence

Expand Down
2 changes: 1 addition & 1 deletion src/imitation/scripts/ingredients/demonstrations.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

@demonstrations_ingredient.config
def config():
# Either "local" or "{algo}-huggingface" to load them from the HuggingFace Dataset Hub.
# Either "local" or "{algo}-huggingface" to load them from the HF Dataset Hub.
rollout_type = "local"

# If none, they are sampled from the expert policy.
Expand Down
15 changes: 9 additions & 6 deletions src/imitation/scripts/ingredients/expert.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,15 @@
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.
- :code:`ppo` and :code:`sac`: A policy trained with SB3.
Needs a `path` in the `loader_kwargs`.
- :code:`<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 :code:`<organization>/<algo>-<env_name>`.
You can set the organization with the `organization` key in :code:`loader_kwargs`.
The default is `HumanCompatibleAI`.
- :code:`random`: A policy that takes random actions.
- :code:`zero`: A policy that takes zero actions.
"""
import sacred

Expand Down
3 changes: 2 additions & 1 deletion src/imitation/scripts/ingredients/policy_evaluation.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
"""This ingredient performs evaluation of learned policy.
It takes care of the right wrappers, does some rollouts and computes statistics of the rollouts.
It takes care of the right wrappers, does some rollouts
and computes statistics of the rollouts.
"""

from typing import Mapping, Union
Expand Down

0 comments on commit b5cc7b6

Please sign in to comment.