pfnet / pfrl

PFRL: a PyTorch-based deep reinforcement learning library
MIT License
1.2k stars 157 forks source link

[BUGFIX] use functools.partial instead of lambda #157

Closed zhouzypaul closed 3 years ago

zhouzypaul commented 3 years ago

so there's no lazy execution issue when assigning env seeds

zhouzypaul commented 3 years ago

see issue #156

muupan commented 3 years ago

/test

pfn-ci-bot commented 3 years ago

Successfully created a job for commit f8a561a:

muupan commented 3 years ago

Thanks for your PR! Now it looks fine (compared with https://github.com/pfnet/pfrl/issues/156#issuecomment-914225388):

python examples/atari/train_ppo_ale.py --gpu -1
Output files are saved in results/f8a561ae627d31138ac6fe975e06bfbfe20ee345-1c0dd107-67bc6343
make_env called with idx: 0
make_env called with idx: 1
make_env called with idx: 2
make_env called with idx: 3
make_env called with idx: 4
make_env called with idx: 5
make_env called with idx: 6
make_env called with idx: 7
Observation space Box(4, 84, 84)
Action space Discrete(4)
make_env called with idx: 0
make_env called with idx: 1
make_env called with idx: 2
make_env called with idx: 3
make_env called with idx: 4
make_env called with idx: 5
make_env called with idx: 6
make_env called with idx: 7
make_env called with idx: 0
make_env called with idx: 1
make_env called with idx: 2
make_env called with idx: 3
make_env called with idx: 4
make_env called with idx: 5
make_env called with idx: 6
make_env called with idx: 7
muupan commented 3 years ago

pfrl/tests/wrappers_tests/test_monitor.py failed in pfn-public-ci/pfrl.cpu, but this must be unrelated (https://github.com/pfnet/pfrl/issues/158) to the PR so I'll merge.