pfnet / pfrl

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

Make update_counter multiprocess safe #30

Closed belldandyxtq closed 4 years ago

belldandyxtq commented 4 years ago

This PR changes the type of update_counter from a pure int to a multiprocessing.value. The reason behind this change is that the update_counter is used as the generation id in the grpc mode and is shared with the server process.

A lock is added to secure that no broken model will be shared between the server and learner in grpc mode.

kuenishi commented 4 years ago

/test

pfn-ci-bot commented 4 years ago

Successfully created a job for commit 81b5b56:

belldandyxtq commented 4 years ago

/test

pfn-ci-bot commented 4 years ago

Successfully created a job for commit 5a7056d: