sjtu-marl / malib

A parallel framework for population-based multi-agent reinforcement learning.
https://malib.io
MIT License
498 stars 60 forks source link

May be performance issues when redefining lots of remote actors #1

Closed wiljohnhong closed 3 years ago

wiljohnhong commented 3 years ago

https://github.com/sjtu-marl/malib/blob/3982db1185591e6279f988a3ae446b5d86d982c5/malib/manager/rollout_worker_manager.py#L68-L77

It seems each definition of worker_cls will be pickled and exported through Redis.

Ref: https://github.com/ray-project/ray/issues/6240

It would be better put the worker_cls definition out of the for loop:)

KornbergFresnel commented 3 years ago

@wiljohnhong fixed up.