-
-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
experience_replay_interface.py: terminal_actions defined as int, but de-facto float #83
Comments
I tried changing the above line to
I still think Full stack-trace on failure is:
|
There seems to be no problem when using int and |
Warning was: Expected type 'int', got 'float' instead Fixes Linesight-RL#83
Warning was: Expected type 'int', got 'float' instead Fixes Linesight-RL#83
Warning was: Expected type 'int', got 'float' instead
Warning was: Expected type 'int', got 'float' instead
Warning was: Expected type 'int', got 'float' instead Fixes Linesight-RL#83
linesight/trackmania_rl/experience_replay/experience_replay_interface.py
Line 53 in 09d84b5
There is a bit of inconsistency in class Experience in experience_replay/experience_replay_interface.py.
terminal_actions
is defined as int, the documentation says it's int or math.inf (float). And in the code it's only filed by buffer_management.py with this line:terminal_actions = float((n_frames - 1) - i) if "race_time" in rollout_results else math.inf
So de-facto
terminal_actions
is always float, not just when it's math.inf.I tried replacing replacing
float()' with
inf()` and math.inf with sys.maxsize and got some error like "int cannot be converted to C long" or "int to large for C long". Other easy workarounds also failed.The text was updated successfully, but these errors were encountered: