Giter Site home page Giter Site logo

Comments (4)

ncullen93 avatar ncullen93 commented on July 20, 2024 1

fixed thanks @recastrodiaz

from torchsample.

recastrodiaz avatar recastrodiaz commented on July 20, 2024

I'm not sure why this happens but I'd love to get this fixed too. In my case, I don't need to KeyboardInterrupt the training. Just letting it complete and running it again seems to cause the issue (not always). In some cases, if I run the previous 2 cells, the loader loads fine. But once it happens, only a kernel restart seems to fix it.

This issue is on TQDM's tracker too:

from torchsample.

recastrodiaz avatar recastrodiaz commented on July 20, 2024

This race condition might be related: tqdm/tqdm#348

from torchsample.

recastrodiaz avatar recastrodiaz commented on July 20, 2024

I've figured out the second issue. Running fit_loader several times adds multiple instances of TQDM to self._callbacks, printing N times over the same row, corrupting the progress bar:

https://github.com/ncullen93/torchsample/blob/2154d789ef0d79debe2cc522751ae7072e8b22dc/torchsample/modules/super_module.py#L155

The code should be instead:

        progressbar = []
        if verbose > 0:
            progressbar += [TQDM()]
        callbacks = CallbackModule(self._callbacks + progressbar)

From:

        if verbose > 0:
            self._callbacks += [TQDM()]
        callbacks = CallbackModule(self._callbacks)

As for the first issue (KeyboardInterrupt) a with statement should suffice. Trying that out as I type this.

from torchsample.

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.