Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pufferlib/config/atari.ini
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rnn_name = Recurrent

[vec]
num_envs = 128
num_workers = 16
num_workers = auto
batch_size = 64

[train]
Expand Down
2 changes: 1 addition & 1 deletion pufferlib/environments/atari/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def make(name, obs_type='grayscale', frameskip=4,
repeat_action_probability=0.0, render_mode='rgb_array',
buf=None, seed=0):
'''Atari creation function'''
pufferlib.environments.try_import('ale_py', 'AtariEnv')
pufferlib.environments.try_import('ale_py')

ale_render_mode = render_mode
if render_mode == 'human':
Expand Down
3 changes: 2 additions & 1 deletion pufferlib/vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,8 @@ def make(env_creator_or_creators, env_args=None, env_kwargs=None, backend=Puffer

if 'num_workers' in kwargs:
if kwargs['num_workers'] == 'auto':
kwargs['num_workers'] = num_envs
import psutil
kwargs['num_workers'] = min(psutil.cpu_count(logical=False), num_envs)

# TODO: None?
envs_per_worker = num_envs / kwargs['num_workers']
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ avalon = [
atari = [
'gymnasium[accept-rom-license]==0.29.1',
'opencv-python==3.4.17.63',
'ale_py==0.9.0',
'ale_py==0.10.1',
]

box2d = [
Expand Down