-
Notifications
You must be signed in to change notification settings - Fork 485
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
improve docs adding "--gym-packages" argument #445
base: master
Are you sure you want to change the base?
Conversation
@@ -4,7 +4,7 @@ | |||
Custom Environment | |||
================== | |||
|
|||
The easiest way to add support for a custom environment is to edit | |||
The easiest way to add support for a custom or external environment is to import it using the ``--gym-packages my_custom_env`` argument or to edit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The easiest way to add support for a custom or external environment is to import it using the ``--gym-packages my_custom_env`` argument or to edit | |
The easiest way to add support for a custom or external environment is to import it using the ``--gym-packages my_package`` argument or to edit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR, but I guess we should deprecate --gym-packages
, see #390 (package:env_id
might already be working)
ENV_NAME = 'gym_environment:gym_environment/GridWorld-v0' # My custom environment
# Works
from gymnasium import make_vec
env = make_vec(ENV_NAME)
# ValueError: gym_environment:gym_environment/GridWorld-v0 not found in gym registry ....
import sys
from rl_zoo3.train import train
sys.argv = ["python", "--algo", "ppo", "--env", ENV_NAME]
train() (You could try using this template for custom env) |
Description
improve doc adding "--gym-packages" argument
source:
rl-baselines3-zoo/rl_zoo3/train.py
Lines 107 to 112 in e06914e
Motivation and Context
Types of changes
Checklist: