garage icon indicating copy to clipboard operation
garage copied to clipboard

When pickling torch algorithms, move torch modules to CPU before pickling

Open avnishn opened this issue 3 years ago • 0 comments

Our current behavior is to pickle policies and value/q-functions so that they are pickled in their exact state, whether they are on gpu or not. This is bad because it forces users to use work-arounds to open torch pkled experiments on cpu only devices. A good example of this is when a user trains their policy on a server, but wants to see the policy in action, and they open it on their laptop, but their laptop doesn't have a gpu.

avnishn avatar Sep 24 '20 18:09 avnishn