Skip to content
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

python run_baseline_parallel_fast.py #196

Open
sunflower330 opened this issue Dec 10, 2024 · 1 comment
Open

python run_baseline_parallel_fast.py #196

sunflower330 opened this issue Dec 10, 2024 · 1 comment

Comments

@sunflower330
Copy link

Why does this code stop with an error when the ep_1ength reaches the set 20480?

step: 20479 event: 4.00 level: 8.00 heal: 3.66 op_lvl: 0.00 dead: -0.40 badge: 0.00 explore: 29.76 sum: 45.02Process ForkServerProcess-1:
Traceback (most recent call last):
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/multiprocessing/process.py", line 315, in _bootstrap
self.run()
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/multiprocessing/process.py", line 108, in run
self._target(*self._args, **self._kwargs)
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 59, in _worker
remote.send(getattr(env, data))
AttributeError: 'RedGymEnv' object has no attribute 'explore_map'
Traceback (most recent call last):
File "/home/qing/PokemonRedExperiments/baselines/run_baseline_parallel_fast.py", line 82, in
model.learn(total_timesteps=(ep_length)num_cpu10, callback=CallbackList(callbacks))
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/ppo/ppo.py", line 308, in learn
return super().learn(
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/on_policy_algorithm.py", line 259, in learn
continue_training = self.collect_rollouts(self.env, callback, self.rollout_buffer, n_rollout_steps=self.n_steps)
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/on_policy_algorithm.py", line 184, in collect_rollouts
if callback.on_step() is False:
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/callbacks.py", line 104, in on_step
return self._on_step()
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/callbacks.py", line 208, in _on_step
continue_training = callback.on_step() and continue_training
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/callbacks.py", line 104, in on_step
return self._on_step()
File "/home/qing/PokemonRedExperiments/baselines/tensorboard_callback.py", line 58, in _on_step
explore_map = np.array(self.training_env.get_attr("explore_map"))
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/vec_env/base_vec_env.py", line 367, in get_attr
return self.venv.get_attr(attr_name, indices)
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 173, in get_attr
return [remote.recv() for remote in target_remotes]
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/site-packages/stable_baselines3/common/vec_env/subproc_vec_env.py", line 173, in
return [remote.recv() for remote in target_remotes]
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/multiprocessing/connection.py", line 255, in recv
buf = self._recv_bytes()
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/multiprocessing/connection.py", line 419, in _recv_bytes
buf = self._recv(4)
File "/home/qing/anaconda3/envs/pokey/lib/python3.10/multiprocessing/connection.py", line 388, in _recv
raise EOFError
EOFError

@PWhiddy
Copy link
Owner

PWhiddy commented Dec 12, 2024

Hey!

I see:

AttributeError: 'RedGymEnv' object has no attribute 'explore_map'

have you made any modifications to the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants