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

Build is unstable #23

Closed
TommyJones opened this issue Jun 28, 2020 · 3 comments
Closed

Build is unstable #23

TommyJones opened this issue Jun 28, 2020 · 3 comments

Comments

@TommyJones
Copy link
Owner

R CMD check fails randomly across platforms. Usually the failure is due to negative probabilities in the gibbs sampler. Current build passes tests when testing but not running full CMD check. But then the issue crops up in CMD check when running examples or tests. Same code, same data.

Need a build that

  1. Is stable
  2. Uses thread safe containers
@TommyJones
Copy link
Owner Author

I think the instability is just a continuation of the negative probabilities problem.

Managed to trace it back to the iterator for documents, d. If I initialize d = 0 in the main loop over documents, somehow Cd, Cv, Ck, Zd, and docs get out of sync. When d isn't initialized at 0, I'm not sure why there isn't a segfault. But there isn't, however the model calculates total junk. That junk then creates situations that cause CMD check to fail when checking examples or running unit tests.

Bottom line, I think I need to refactor the code entirely.

@TommyJones
Copy link
Owner Author

TommyJones commented Jun 30, 2020

dba358d has fixed the core issue. But we aren't out of the woods yet: Note this AppVeyor build

Issue was pass by reference vs. pass by value. I was passing by value when I thought I was passing by reference.

Keeping the issue open to do more checks and optimizations/cleanup of code.

@TommyJones
Copy link
Owner Author

As of b4a0fd8 I'm willing to say the build is stable. However the Gibbs sampler is about 3X slower than the one I have in {textmineR}. Opening another issue to address that. :-|

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant