“async” is a reserved word in Python 3.7 and greater
See original GitHub issueUsing async as a function parameter is a syntax error in Python >= 3.7. Other modules like PyTouch and Cuda have shifted to using non_blocking instead of async.
flake8 testing of https://github.com/hill-a/stable-baselines on Python 3.7.0
$ flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
./stable_baselines/acktr/acktr_cont.py:83:68: E999 SyntaxError: invalid syntax
epsilon=1e-2, stats_decay=0.99, async=1, cold_iter=1,
^
./stable_baselines/acktr/value_functions.py:39:40: E999 SyntaxError: invalid syntax
async=1, kfac_update=2, cold_iter=50,
^
./stable_baselines/acktr/acktr_disc.py:174:87: E999 SyntaxError: invalid syntax
stats_decay=0.99, async=1, cold_iter=10,
^
./stable_baselines/acktr/kfac.py:15:74: E999 SyntaxError: invalid syntax
full_stats_init=False, cold_iter=100, cold_lr=None, async=False, async_stats=False, epsilon=1e-2,
^
4 E999 SyntaxError: invalid syntax
4
Issue Analytics
- State:
- Created 5 years ago
- Comments:10 (1 by maintainers)
Top Results From Across the Web
What's New In Python 3.7 — Python 3.11.1 documentation
This article explains the new features in Python 3.7, compared to 3.6. Python 3.7 was released on June 27, ... async and await...
Read more >python - Calling cuda() with async results in SyntaxError
async is a reserved keyword in python which cannot be used in that way, that is why you get the SyntaxError. cuda() no...
Read more >Asyncio in Python 3.7
Let's dive in. New Reserved Keywords. The async and await keywords are now reserved. This was needed in order to cement the asynchronous ......
Read more >Python 3.7: Cool New Features for You to Try
The Order of Dictionaries Is Guaranteed; “async” and “await” Are Keywords; “asyncio” Face Lift; Context Variables; Importing Data Files With ...
Read more >SyntaxError regarding async when attempting to run ...
Yes, the issue is occurring because async was added as a reserved keyword in Python 3.7. When you import pexpect , it's importing...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey,
async_
can work, but considering most of the issues are from ACKTR, theasync
means asynchronous eigen decomposition, might as well call itasync_eigen_decomp
.@geeksambhu Unless you already started, I plan to fix that issue tomorrow 😉.