[x] I have commented my code, particularly in hard-to-understand areas
[x] My changes generate no new warnings or errors
Types of changes
Please describe the types of changes! (ex. Bugfix, New feature, Documentation, ...)
Bugfix
Test Configuration
OS: mac
Python version: 3.8.12
Additional libraries: vscode-conda
Description
Please describe the details of your contribution
In each asynchronous loop, a different number of steps comes in each time, and now it is reset to "heap["print_stamp"] = 0 " as in the following code.
if heap["print_stamp"] >= config.train.print_period or is_over:
print_signal = True
heap["print_stamp"] = 0 # 50100.25->0, loss 100.25 step
...
if print_signal: # 49899.75 >= 50000 at last loop
try:
manage_sync_queue.get_nowait()
except:
pass
manage_sync_queue.put(agent.sync_out()) # no execution in the last loop.
In fact, if it is updated at heap["print_stamp"]=50100 of 50000 period, it should be updated after an additional 49900 steps.
Currently, while updating heap["print_stamp"]=0, the entire step is finished after the last additional 49900 steps, but a is not updated and the loop does not end.
So, fix it like this:
if heap["print_stamp"] >= config.train.print_period or is_over:
print_signal = True
heap["print_stamp"] -= config.train.print_period # fix
:star2: Hello! Thanks for contributing JORLDY!
Checklist
Please check if you consider the following items.
Types of changes
Please describe the types of changes! (ex. Bugfix, New feature, Documentation, ...) Bugfix
Test Configuration
Description
Please describe the details of your contribution
In each asynchronous loop, a different number of steps comes in each time, and now it is reset to "heap["print_stamp"] = 0 " as in the following code.
In fact, if it is updated at heap["print_stamp"]=50100 of 50000 period, it should be updated after an additional 49900 steps. Currently, while updating heap["print_stamp"]=0, the entire step is finished after the last additional 49900 steps, but a is not updated and the loop does not end.
So, fix it like this: