Python Memory

Open-source Python projects categorized as Memory

Top 23 Python Memory Projects

  • memray

    Memray is a memory profiler for Python

    Project mention: Memray – A Memory Profiler for Python | news.ycombinator.com | 2024-02-10

    I collected a list of profilers (also memory profilers, also specifically for Python) here: https://github.com/albertz/wiki/blob/master/profiling.md

    Currently I actually need a Python memory profiler, because I want to figure out whether there is some memory leak in my application (PyTorch based training script), and where exactly (in this case, it's not a problem of GPU memory, but CPU memory).

    I tried Scalene (https://github.com/plasma-umass/scalene), which seems to be powerful, but somehow the output it gives me is not useful at all? It doesn't really give me a flamegraph, or a list of the top lines with memory allocations, but instead it gives me a listing of all source code lines, and prints some (very sparse) information on each line. So I need to search through that listing now by hand to find the spots? Maybe I just don't know how to use it properly.

    I tried Memray, but first ran into an issue (https://github.com/bloomberg/memray/issues/212), but after using some workaround, it worked now. I get a flamegraph out, but it doesn't really seem accurate? After a while, there don't seem to be any new memory allocations at all anymore, and I don't quite trust that this is correct.

    There is also Austin (https://github.com/P403n1x87/austin), which I also wanted to try (have not yet).

    Somehow this experience so far was very disappointing.

    (Side node, I debugged some very strange memory allocation behavior of Python before, where all local variables were kept around after an exception, even though I made sure there is no reference anymore to the exception object, to the traceback, etc, and I even called frame.clear() for all frames to really clear it. It turns out, frame.f_locals will create another copy of all the local variables, and the exception object and all the locals in the other frame still stay alive until you access frame.f_locals again. At that point, it will sync the f_locals again with the real (fast) locals, and then it can finally free everything. It was quite annoying to find the source of this problem and to find workarounds for it. https://github.com/python/cpython/issues/113939)

  • Scout Monitoring

    Free Django app performance insights with Scout Monitoring. Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.

    Scout Monitoring logo
  • psutil

    Cross-platform lib for process and system monitoring in Python

  • volatility

    An advanced memory forensics framework

  • volatility3

    Volatility 3.0 development

  • rpmalloc

    Public domain cross platform lock free thread caching 16-byte aligned memory allocator implemented in C

  • promnesia

    Another piece of your extended mind

    Project mention: Imagining a Personal Data Pipeline | news.ycombinator.com | 2024-08-10

    This is a horrible use case for Windows Recall. Even if we ignore all the privacy implications of having a third party screenshot you every 30 seconds and making the files world readable, it's a bad idea.

    Recall has lost a ton of useful metadata you already have - both URL visits and streaming are clearly discernible actions, both at the network stack level, and from your browser history. Throwing that away to trust an LLM to re-infer the same data is both reducing data fidelity and significantly increasing processing cost.

    If you want to see this done reasonably well, I'd suggest looking at e.g https://beepb00p.xyz/promnesia.html (which not surprisingly bears a strong similarity to what the article discusses)

    LLMs don't add much value here, outside of tightly locked down systems where screenshots are the only way of exporting.

  • ps_mem

    A utility to accurately report the in core memory usage for a program

    Project mention: ps_mem: A Lightweight Tool for Accurate Memory Usage Reporting | dev.to | 2024-09-16

    For detailed information on script functionality, refer to the commit history: https://github.com/pixelb/ps_mem

  • InfluxDB

    Purpose built for real-time analytics at any scale. InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards.

    InfluxDB logo
  • pointers.py

    Bringing the hell of pointers to Python.

  • memorizing-transformers-pytorch

    Implementation of Memorizing Transformers (ICLR 2022), attention net augmented with indexing and retrieval of memories using approximate nearest neighbors, in Pytorch

    Project mention: HMT: Hierarchical Memory Transformer for Long Context Language Processing | news.ycombinator.com | 2024-05-17

    Code: https://github.com/OswaldHe/HMT-pytorch

    This looks really interesting. I've the paper to my reading list and look forward to playing with the code. I'm curious to see what kinds of improvements we can get by agumenting Transformers and other generative language/sequence models with this and other mechanisms implementing hierarchical memory.[a]

    We sure live in interesting times!

    ---

    [a] In the past, I experimented a little with transformers that had access to external memory using https://github.com/lucidrains/memorizing-transformers-pytorc... and also using routed queries with https://github.com/glassroom/heinsen_routing . Both approaches seemed to work, but I never attempted to build any kind of hierarchy with those approaches.

  • MalConfScan

    Volatility plugin for extracts configuration data of known malware

  • recurrent-memory-transformer-pytorch

    Implementation of Recurrent Memory Transformer, Neurips 2022 paper, in Pytorch

  • theine

    high performance in-memory cache

  • gpt-voice-conversation-chatbot

    Allows you to have an engaging and safely emotive spoken / CLI conversation with the AI ChatGPT / GPT-4 while giving you the option to let it remember things discussed.

  • block-recurrent-transformer-pytorch

    Implementation of Block Recurrent Transformer - Pytorch

  • Proxmox-load-balancer

    Designed to constantly maintain the Proxmox cluster in balance

  • M.I.L.E.S

    M.I.L.E.S, a GPT-4-Turbo voice assistant, self-adapts its prompts and AI model, can play any Spotify song, adjusts system and Spotify volume, performs calculations, browses the web and internet, searches global weather, delivers date and time, autonomously chooses and retains long-term memories. Available for macOS and Windows.

    Project mention: Show HN: I made M.I.L.E.S, the worlds best voice assistant | news.ycombinator.com | 2024-01-06
  • honcho

    Platform for building personalized AI applications (by plastic-labs)

    Project mention: Ask HN: Who is hiring? (September 2024) | news.ycombinator.com | 2024-09-02
  • memprof

    A memory profiler for Python. As easy as adding a decorator!

  • checkmate

    Training neural networks in TensorFlow 2.0 with 5x less memory (by parasj)

  • OpenSSH-Session-Key-Recovery

    Project containing several tools/ scripts to recover the OpenSSH session keys used to encrypt/ decrypt SSH traffic.

  • HTM-pytorch

    Implementation of Hierarchical Transformer Memory (HTM) for Pytorch

  • PyMemoryEditor

    :floppy_disk: Multi-platform library developed with ctypes for reading, writing and searching process memory, in a simple and friendly way with Python 3. The package supports Windows and Linux (32-bit and 64-bit).

    Project mention: Library for Memory Scanning for Python 3 (with a GUI application) | /r/Python | 2023-11-29

    The code is on my GitHub->JeanExtreme002/PyMemoryEditor. I would also appreciate if you left a ⭐️ on the repository page if you like the project and want to see more updates!

  • cacheme

    Asyncio cache framework for Python

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Python Memory discussion

Log in or Post with

Python Memory related posts

  • ps_mem: A Lightweight Tool for Accurate Memory Usage Reporting

    1 project | dev.to | 16 Sep 2024
  • Show HN: I've Created the First Artificial Memory (and It's Open-Source)

    1 project | news.ycombinator.com | 26 May 2024
  • RemindAI: Revolutionize Your Note-Taking and Digital Memory

    2 projects | news.ycombinator.com | 26 May 2024
  • Memary is a cutting-edge long-term memory system based on a knowledge graph

    2 projects | news.ycombinator.com | 29 Apr 2024
  • Memray – A Memory Profiler for Python

    10 projects | news.ycombinator.com | 10 Feb 2024
  • Open source alternative to ChatGPT and ChatPDF-like AI tools

    6 projects | news.ycombinator.com | 9 Dec 2023
  • Why is it using that much ram? Is that a trojan? Is that a feature of the linux-tkg kernel? (nothing else is running in the background)

    1 project | /r/linuxmasterrace | 1 Jul 2023
  • A note from our sponsor - InfluxDB
    www.influxdata.com | 16 Sep 2024
    InfluxDB Platform is powered by columnar analytics, optimized for cost-efficient storage, and built with open data standards. Learn more →

Index

What are some of the best open-source Memory projects in Python? This list will help you:

Project Stars
1 memray 13,122
2 psutil 10,182
3 volatility 7,174
4 volatility3 2,529
5 rpmalloc 2,104
6 promnesia 1,734
7 ps_mem 1,530
8 pointers.py 914
9 memorizing-transformers-pytorch 620
10 MalConfScan 480
11 recurrent-memory-transformer-pytorch 391
12 theine 349
13 gpt-voice-conversation-chatbot 298
14 block-recurrent-transformer-pytorch 208
15 Proxmox-load-balancer 178
16 M.I.L.E.S 156
17 honcho 130
18 memprof 127
19 checkmate 127
20 OpenSSH-Session-Key-Recovery 77
21 HTM-pytorch 73
22 PyMemoryEditor 53
23 cacheme 43

Sponsored
Free Django app performance insights with Scout Monitoring
Get Scout setup in minutes, and let us sweat the small stuff. A couple lines in settings.py is all you need to start monitoring your apps. Sign up for our free tier today.
www.scoutapm.com

Did you konow that Python is
the 1st most popular programming language
based on number of metions?