Skip to content

Commit

Permalink
Add record command to document
Browse files Browse the repository at this point in the history
  • Loading branch information
takuseno committed Jan 31, 2021
1 parent d5055e8 commit 016f075
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions docs/cli.rst
Original file line number Diff line number Diff line change
@@ -64,3 +64,37 @@ example::

$ d3rlpy export d3rlpy_logs/CQL_20201224224314/model_100.pt


record
------

Record evaluation episodes as videos with the saved model::

$ d3rlpy record <path> --env-id <environment id>

.. list-table:: options
:header-rows: 1

* - option
- description
* - ``--env-id``
- Gym environment id.
* - ``--env-header``
- arbitrary Python code to define environment to evaluate.
* - ``--out``
- output directory.
* - ``--params-json``
- explicitly specify params.json
* - ``--n-episodes``
- the number of episodes to record.
* - ``--framerate``
- video frame rate.

example::

# record simple environment
$ d3rlpy record d3rlpy_logs/CQL_20201224224314/model_100.pt --env-id HopperBulletEnv-v0

# record wrapped environment
$ d3rlpy record d3rlpy_logs/Discrete_CQL_20201224224314/model_100.pt \
--env-header 'import gym; from d3rlpy.envs import Atari; env = Atari(gym.make("BreakoutNoFrameskip-v4"), is_eval=True)'

0 comments on commit 016f075

Please sign in to comment.