Coder Social home page Coder Social logo

Comments (7)

erikbern avatar erikbern commented on May 18, 2024

does it eventually run out of memory and crash? i'm guessing it's just on the python side that the interpreter allocates memory. maybe it doesn't collect it until needed

from annoy.

Jeffrey04 avatar Jeffrey04 commented on May 18, 2024

@erikbern I did not really wait until it crashed in my actual application, as I was running it in a shared server. But the memory usage was maxed out and the server started swapping heavily.

from annoy.

erikbern avatar erikbern commented on May 18, 2024

I think I've been able to repro is using this:

class MemoryLeakTest(TestCase):
    def test_get_item_vector(self):
        f = 10
        i = AnnoyIndex(f, 'euclidean')
        i.add_item(0, [random.gauss(0, 1) for x in xrange(f)])
        for j in xrange(100 * 1000 * 1000):
            i.get_item_vector(0)

from annoy.

erikbern avatar erikbern commented on May 18, 2024

great if you can take a look again

from annoy.

Jeffrey04 avatar Jeffrey04 commented on May 18, 2024

I will check again next week, thanks for the quick response

and HAPPY NEW YEAR #offtopic

from annoy.

Jeffrey04 avatar Jeffrey04 commented on May 18, 2024

oh, it is fixed, thanks (and sorry for taking this long to confirm)

from annoy.

erikbern avatar erikbern commented on May 18, 2024

np (just published 1.7.0 to pypi with this fix in it)

from annoy.

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.