facebookresearch / ELF

An End-To-End, Lightweight and Flexible Platform for Game Research
Other
2.09k stars 284 forks source link

fix async for usage with python 3.7 #134

Closed douglasrizzo closed 5 years ago

douglasrizzo commented 5 years ago

In Python 3.7, async is a reserved word, so I changed it (there were only a few occurrences) to asynch. This has only affected .py files.

facebook-github-bot commented 5 years ago

Hi douglasrizzo! Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file.In order for us to review and merge your code, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks!

facebook-github-bot commented 5 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

facebook-github-bot commented 5 years ago

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

douglasrizzo commented 5 years ago

I just tested it (without GPU) on Python 3.7 and everything works fine. I believe this fixes #124 and #127.

douglasrizzo commented 5 years ago

OK, my fix didn't work when using the GPU.

I took a look at the documentation for the pytorch.Tensor object and, apparently, the async argument is not even used in the copy_ and cuda methods (which are the ones used in ELF), so I just deleted them. Now everything works.

douglasrizzo commented 5 years ago

I had a problem on my side by pushing from my master branch. I created a new PR #135 from a new branch now