Skip to content

add NaN checks to reward and observation in C# #3221

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

Merged
merged 1 commit into from
Jan 15, 2020

Conversation

chriselion
Copy link
Contributor

Currently we have NaN checks (and set the values to 0) on the python side. However, I think throwing sooner would help the user track down the source of the NaN.

As an example of where this would help make debugging easier: #3214

@@ -83,6 +83,12 @@ void Clear()

void AddFloatObs(float obs)
{
#if DEBUG
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of the Agent.AddVectorObs methods wind up here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could add a flag to bypass the check if the source was an int, bool, or one-hot if that's worth optimizing for...

@chriselion chriselion merged commit a14c15b into master Jan 15, 2020
@delete-merged-branch delete-merged-branch bot deleted the develop-csharp-nan-check branch January 15, 2020 01:47
@chriselion chriselion mentioned this pull request Jan 15, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 17, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants