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
R pkg fit() call finishes but subprocess doesn't terminate #65
Comments
Hi - glad you're enjoying ivis! We've been noticing some weird threading issues that relate to the latest tensorflow 2.1. @Szubie is working on a larger fix to address this via data generators. Meanwhile, could you try downgrading tensorflow to version 1.15 and let us know if that solves your hanging thread issue? Since R wrapper for ivis installs it into a virtualenv, the steps to downgrade would be:
> reticulate::virtualenv_root()
$ source ~/.virtualenvs/ivis/bin/activate
$ python -m pip install tensorflow==1.15 After this restart R and reload the ivis package. |
@idroz thanks for the fix and clear instructions here. It's now working as expected -- I've run a few training iterations and don't see any ongoing weird behavior now. I'm not sure if this is helpful for further diagnosis, but the extent of ongoing resource usage seemed correlated to the overall complexity of the fit() call -- increasing data size or increasing Another observation: before downgrading tensorflow to 1.15 per your suggestion, I'd get this error (You've solved my problem (thanks!) but I'll leave the issue close decision to you, since sounds like it ties to more systematic changes.) |
Glad it worked. The issue you describe most certainly relates to a documented tensorflow problem: tensorflow/tensorflow#35100. Nightly TF build seems to have fixed it, so hoping that the next stable TF release will be able to sort it out. Will ping here when either data generator solves the problem or TF team pushes a working update! |
Hi, we have pushed a new update to ivis here: ecaf4cc This update stops TensorFlow 2.1 from spawning new Threads without closing them. This takes care of the warning error seen on every epoch of training, and should also fix the issue you've been seeing in R with the subprocess not terminating correctly. Please give it a go, hopefully it solves the issues you've been encountering! |
This model consistently feels like a magic trick, thanks for contributing!
Bug
I'm running the ivis R package(v1.7.1) (more system details below). I can get model$fit() and model$transform() working just fine and producing substantive results. However, when the R process finishes and returns the fitted model, I'm seeing continued sky-high system usage. The R process calling ivis is definitely completed and back to a command prompt, but in htop I can see the RStudio GUI process (parent of the rsession process) occupying at least 2 full cores. Some process further down is not stopping when the R process gets the returned value. (Restarting the R session does kill it.)
I don't understand enough of the ivis-through-reticulate toolchain to provide more helpful diagnostics in this first report, but happy to run experiments and document further.
Environment
The text was updated successfully, but these errors were encountered: