ligerfotis / M2CURL

We propose Multimodal Contrastive Unsupervised RL (M2CURL), a method that learns efficient representations from visuotactile data, improving RL convergence speed and performance. M2CURL is versatile, compatible with various RL algorithms, and enhances learning efficiency in manipulation tasks in the Tactile Gym 2 simulator.
GNU General Public License v3.0
3 stars 1 forks source link

TypeError: 'NoneType' object cannot be interpreted as an integer #1

Open yuxwen opened 3 months ago

yuxwen commented 3 months ago

Traceback (most recent call last): File "/home/dell/桌面/M2CURL-master/tactile_gym/sb3_helpers/train_agent.py", line 428, in train_agent( File "/home/dell/桌面/M2CURL-master/tactile_gym/sb3_helpers/train_agent.py", line 242, in train_agent finalevaluation( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/eval_agent_utils.py", line 100, in final_evaluation eval_env = make_evalenv( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/rl_utils.py", line 49, in make_eval_env eval_env = gym.make( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 235, in make return registry.make(id, kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 129, in make env = spec.make(kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/envs/registration.py", line 90, in make env = cls(**kwargs) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/surface_follow_auto/surface_follow_auto_env.py", line 25, in init super(SurfaceFollowAutoEnv, self).init(max_steps, image_size, env_modes, show_gui, showtactile) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/base_surface_env.py", line 83, in init self.setup_actionspace() File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/tactilegym-0.0.1-py3.10.egg/tactile_gym/rl_envs/exploration/surface_follow/base_surface_env.py", line 204, in setup_action_space self.action_space = gym.spaces.Box( File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/gym-0.21.0-py3.10.egg/gym/spaces/box.py", line 54, in init low = np.full(shape, low, dtype=dtype) File "/home/dell/anaconda3/envs/python10/lib/python3.10/site-packages/numpy/core/numeric.py", line 329, in full a = empty(shape, dtype, order) TypeError: 'NoneType' object cannot be interpreted as an integer

Hello, I'm a reinforcement learning novice. I found an error in testing your program, and I'm not sure if it has finished training because there are files generated when the training reaches 100%: save_models/surface_follow_v0/*****/trained_models/best_model_zip, evaluation.npz, final_models.zip, 0.monitor.csv, algo_params.json, learning_curves.png, rl_params.json.

syc-hjy commented 2 months ago

pybullet build time: Apr 17 2024 10:03:01 argv[0]= failed to EGL with glad. pybullet build time: Apr 17 2024 10:03:01 argv[0]= pybullet build time: Apr 17 2024 10:03:01 failed to EGL with glad. argv[0]= pybullet build time: Apr 17 2024 10:03:01 argv[0]= failed to EGL with glad. failed to EGL with glad. pybullet build time: Apr 17 2024 10:03:01 argv[0]= failed to EGL with glad. pybullet build time: Apr 17 2024 10:03:01 argv[0]= Traceback (most recent call last): File "/home/esir/M2CURL/tactile_gym/sb3_helpers/train_agent.py", line 428, in train_agent( File "/home/esir/M2CURL/tactile_gym/sb3_helpers/train_agent.py", line 169, in train_agent env = make_training_envs(env_name, rl_params, save_dir) File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/tactile_gym-0.0.1-py3.10.egg/tactile_gym/sb3_helpers/rl_utils.py", line 17, in make_training_envs env = make_vec_env( File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/stable_baselines3/common/env_util.py", line 108, in make_vec_env return vec_env_cls([make_env(i + start_index) for i in range(n_envs)], **vec_env_kwargs) File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 112, in init observation_space, action_space = self.remotes[0].recv() File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 250, in recv buf = self._recv_bytes() File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 414, in _recv_bytes buf = self._recv(4) File "/home/esir/anaconda3/envs/m2curl/lib/python3.10/multiprocessing/connection.py", line 379, in _recv chunk = read(handle, remaining) ConnectionResetError: [Errno 104] Connection reset by peer I found an error in testing your program, and I'm not sure if it has finished training