diff --git a/README.md b/README.md index d6848ef8558086d11373274e8cdaf3381237c811..6fd0d0b131ef69d74ccc492f6d5fc87cd40e433d 100644 --- a/README.md +++ b/README.md @@ -18,22 +18,22 @@ A Python installation is needed to run the scripts. Install the following Python packages: ``` -import gym -from stable_baselines3 import A2C -from gymnasium.envs.registration import register -from tqdm import tqdm -import matplotlib.pyplot as plt -import wandb -from wandb.integration.sb3 import WandbCallback -from stable_baselines3.common.vec_env import VecVideoRecorder -import dill -import zipfile -import torch -import torch.nn as nn -import torch.optim as optim -from tqdm import tqdm -import numpy as np -from torch.distributions import Categorical +pip install gym +pip install stable_baselines3 +pip install tqdm +pip install wandb +pip install moviepy +pip install huggingface-sb3 +pip install tensorboard +pip install panda-gym +pip install dill +pip install zipfile + +``` +Then run the scrpits in your command prompt: + +``` +python "path_to_your_python_script" ``` @@ -65,7 +65,27 @@ The policy loss follows a decreasing trend, which is coherent to the model learn ### Full workflow with panda-gym -The full training-visualization-sharing workflow is applied to the PandaReachJointsDense environment. The python script used is: ```a2c_sb3_panda_reach.py```.It appears that the PandaReachJointsDense-v3 environment is not known and could not be used (NameNotFound: Environment PandaReachJointsDense doesn't exist.) +The full training-visualization-sharing workflow is applied to the PandaReachJointsDense environment. The python script used is: ```a2c_sb3_panda_reach.py```. It appears that the PandaReachJointsDense-v3 environment is not known and could not be used, as mentionned in the following error: +``` +--------------------------------------------------------------------------- +NameNotFound Traceback (most recent call last) +<ipython-input-5-e21f3cb1d225> in <cell line: 21>() + 19 register(id=env_id, entry_point='gym.envs.classic_control:CartPoleEnv', max_episode_steps=500) + 20 +---> 21 env = gym.make(env_id) + 22 + 23 model = A2C("MlpPolicy", env, verbose=1, tensorboard_log=f"runs/{run.id}") + +2 frames +/usr/local/lib/python3.10/dist-packages/gym/envs/registration.py in _check_name_exists(ns, name) + 210 suggestion_msg = f"Did you mean: `{suggestion[0]}`?" if suggestion else "" + 211 +--> 212 raise error.NameNotFound( + 213 f"Environment {name} doesn't exist{namespace_msg}. {suggestion_msg}" + 214 ) + +NameNotFound: Environment PandaPushJointsDense doesn't exist. +``` ## Contribute