Skip to content
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

Bugfix, logging variable mean for an empty agent pop #734

Merged
merged 1 commit into from
Nov 17, 2021

Conversation

Robadob
Copy link
Member

@Robadob Robadob commented Nov 16, 2021

would lead to a result of NaN, which JSON exported as empty string (invalid JSON).

Also adds a simple test which checks the result is 0.

@Robadob Robadob added the bug label Nov 16, 2021
@Robadob Robadob requested a review from ptheywood November 16, 2021 14:29
for (auto& step : sl) { // Check step log doesn't contain NaN
EXPECT_EQ(step.getAgent(AGENT_NAME1).getMean("float_var"), 0.0);
}
}
Copy link
Member Author

Choose a reason for hiding this comment

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

Note, I didn't put test at the end of the file, in hopes of avoiding a conflict with my other logging pr.

Copy link
Member

@ptheywood ptheywood left a comment

Choose a reason for hiding this comment

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

Looks good to me, tests pass under linux.

would lead to a result of NaN, which JSON exported as empty string (invalid JSON).

Also adds a simple test which checks the result is 0.
@Robadob Robadob force-pushed the bugfix_logging_mean_nan branch from f1ea2e7 to 9e401a3 Compare November 17, 2021 09:40
@Robadob
Copy link
Member Author

Robadob commented Nov 17, 2021

Added an explicit flush to CUDAEnsemble progress too, to fix that rather than creating a whole separate commit/PR.

@ptheywood ptheywood added this to the v2.0.0-alpha.2 milestone Nov 17, 2021
@ptheywood ptheywood merged commit 276b922 into master Nov 17, 2021
@ptheywood ptheywood deleted the bugfix_logging_mean_nan branch November 17, 2021 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants