Open mgagvani opened 10 months ago
For an (almost) up to date tutorial, please take a look at https://m.youtube.com/playlist?list=PL42jkf1t1F7dFXE7f0VTeFLhW0ZEQ4XJV
I appreciate it. I've been following the tutorial but I'm stuck at the part where you use the RL Baselines Zoo for training:
(donkeysim) PS F:\Projects\donkey\rl-baselines3-zoo> python train.py --algo tqc --env donkey-mountain-track-v0 --eval-freq -1 --save-freq 20000 ========== donkey-mountain-track-v0 ========== Seed: 3690327169 Default hyperparameters for environment (ones being tuned will be overridden): OrderedDict([('batch_size', 256), ('buffer_size', 10000), ('callback', [{'utils.callbacks.ParallelTrainCallback': {'gradient_steps': 200}}]), ('ent_coef', 'auto'), ('gamma', 0.99), ('gradient_steps', 256), ('learning_rate', 0.00073), ('n_timesteps', 2000000.0), ('policy', 'CnnPolicy'), ('tau', 0.02), ('train_freq', 200)]) Using 1 environments Traceback (most recent call last): File "F:\Projects\donkey\rl-baselines3-zoo\train.py", line 220, in <module> model = exp_manager.setup_experiment() File "F:\Projects\donkey\rl-baselines3-zoo\utils\exp_manager.py", line 173, in setup_experiment env = self.create_envs(n_envs, no_log=False) File "F:\Projects\donkey\rl-baselines3-zoo\utils\exp_manager.py", line 522, in create_envs env = make_vec_env( File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\stable_baselines3\common\env_util.py", line 125, in make_vec_env vec_env = vec_env_cls([make_env(i + start_index) for i in range(n_envs)], **vec_env_kwargs) File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\stable_baselines3\common\vec_env\dummy_vec_env.py", line 30, in __init__ self.envs = [_patch_env(fn()) for fn in env_fns] File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\stable_baselines3\common\vec_env\dummy_vec_env.py", line 30, in <listcomp> self.envs = [_patch_env(fn()) for fn in env_fns] File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\stable_baselines3\common\env_util.py", line 94, in _init env = gym.make(env_id, **kwargs) # type: ignore[arg-type] File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\gymnasium\envs\registration.py", line 741, in make env_spec = _find_spec(id) File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\gymnasium\envs\registration.py", line 527, in _find_spec _check_version_exists(ns, name, version) File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\gymnasium\envs\registration.py", line 393, in _check_version_exists _check_name_exists(ns, name) File "C:\Users\mgagv\anaconda3\envs\donkeysim\lib\site-packages\gymnasium\envs\registration.py", line 370, in _check_name_exists raise error.NameNotFound( gymnasium.error.NameNotFound: Environment
donkey-mountain-trackdoesn't exist.
I'm not sure what I need to do to register the env with Gymnasium. Also, it says "donkey-mountain-track", omitting the v0, this might be the problem.
Hello, gym donkey car doesn't support gymnasium yet (but a PR is welcome). In the meantime, you can downgrade to gym 0.21 and SB3 1.x (with the corresponding rl zoo version).
See https://github.com/openai/gym/issues/3176#issuecomment-1560026649
I was trying to run Learning to Drive in 5 minutes but the Stable Baselines version is dependent on TensorFlow 1 which can't be installed on later Python versions. Thus, I went back to this repo however I don't see a script to run the reinforcement learning. Where can I find the script used in this video: https://www.youtube.com/watch?v=iiuKh0yDyKE?
Thank you in advance.