Git Product home page Git Product logo

Comments (4)

FabianIsensee avatar FabianIsensee commented on July 17, 2024

Hi,
I agree that there can be a memory leak if you repeatedly delete and re instantiate the multithreaded augmenter. The pin_memory feature is experimental and I added it only last week. I will try to get this fixed as soon as possible. Until then, don't reinstantiate it or use pin_memory=False.

Following the way pytorch does this is very complicated (and a lot of work to integrate into our code) and I think we can try to get it running easier somehow. If you have ideas, please let me know =)

Thanks for pointing this out!
Best,
Fabian

from batchgenerators.

FabianIsensee avatar FabianIsensee commented on July 17, 2024

All workers and the pin memory thread now use an abort_event (multiprocessing.Event) and will exit if it was set. This event can be set from various places, such as crashing workers (which would previously have resulted in the main process waiting for new data indefinitely), crashing other things or calling the destructor of MultiThreadedAugmenter. Please test and see if you still experience memory leaks. If you do, please provide a minimalistic example and I will figure out a way to solve this.
Best,
Fabian

from batchgenerators.

NikolasMorshuis avatar NikolasMorshuis commented on July 17, 2024

Works perfectly now! Thanks for the quick fix!

from batchgenerators.

FabianIsensee avatar FabianIsensee commented on July 17, 2024

No worries, it's always good to get user feedback =) Thanks a lot again for pointing out the issue

from batchgenerators.

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.