Giter Club home page Giter Club logo

Comments (4)

idroz avatar idroz commented on May 18, 2024 1

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!

from ivis.

idroz avatar idroz commented on May 18, 2024

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:

  1. From R REPL find out where your local virtual environments are stored:
> reticulate::virtualenv_root()
  1. Assuming that your venvs are in ~/.virtualenvs, activate the ivis environment from command line:
$ source ~/.virtualenvs/ivis/bin/activate
  1. Finally, downgrade tensorflow to pip:
$ python -m pip install tensorflow==1.15

After this restart R and reload the ivis package.

from ivis.

sheffe avatar sheffe commented on May 18, 2024

@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 ntrees/search_k/n_epochs_without_progress tended to boost the level of after-termination resource consumption. I don't have any good metrics for that correlation, but it seemed consistent over ~200 training sessions. All CPU, no GPU.

Another observation: before downgrading tensorflow to 1.15 per your suggestion, I'd get this error W tensorflow/core/kernels/data/generator_dataset_op.cc:103] Error occurred when finalizing GeneratorDataset iterator: Cancelled: Operation was cancelled with every training epoch. That message has disappeared with the downgrade. Comparing embedding results before/after the downgrade, I can't see any material effect on the output or metrics like training speed.

(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.)

from ivis.

Szubie avatar Szubie commented on May 18, 2024

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!

from ivis.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.