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)

  • psutil

    Cross-platform lib for process and system monitoring in Python

    Project mention: Single Window Mode when Firefox is already launched with -profile "my_profile" parameter | /r/firefox | 2023-04-20

    fyi: python + https://github.com/giampaolo/psutil is pretty portable

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

  • volatility

    An advanced memory forensics framework

    Project mention: What is the appropriate uncompressed kernel ELF to use with dwarf2json? [ 5.19.0-42-generic #43~22.04.1-Ubuntu ], in order to create generate a custom symbols table to conduct linux memory forensics on Ubuntu 22.04? | /r/computerforensics | 2023-05-28

    I need this to create generate a custom symbols table (using dwarf2json), in order to run a memory dump acquired by Ubuntu 22.04, as Ubuntu 22.04 kernel does not work anymore with volatility 2 (Issue here: volatilityfoundation/volatility#828)

  • volatility3

    Volatility 3.0 development

    Project mention: Volatility 3 2.4.1 - New Linux and Windows plugins | /r/blueteamsec | 2023-04-22
  • promnesia

    Another piece of your extended mind

    Project mention: Mozilla "MemoryCache" Local AI | news.ycombinator.com | 2023-12-12

    In term of automatically saving everything, There is heyday.xyz, polished but quite expensive. Or https://github.com/karlicoss/promnesia, a more experimental take.

  • ps_mem

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

    Project mention: 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) | /r/linuxmasterrace | 2023-07-01

    I use a script I call memtop10.sh that uses a combination of ps and ps_mem.py which you can find here: https://github.com/pixelb/ps_mem/blob/master/ps_mem.py

  • pointers.py

    Bringing the hell of pointers to Python.

    Project mention: Literally everyone here | /r/ProgrammerHumor | 2023-04-24
  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

  • memorizing-transformers-pytorch

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

  • MalConfScan

    Volatility plugin for extracts configuration data of known malware

  • recurrent-memory-transformer-pytorch

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

    Project mention: The race is on | /r/LocalLLaMA | 2023-04-24

    Of course, lucidrains already has an empty repo up. So that's worth keeping an eye on.

  • theine

    high performance in-memory cache

    Project mention: Astral, the company behind Ruff | /r/Python | 2023-04-19

    Rust is good, but when you need a double linked list(my Theine cache package uses that a lot) everything changes. Actually I would recommend Go if you want an alternative.

  • 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

    Project mention: From Deep to Long Learning | news.ycombinator.com | 2023-04-09

    that line of research is still going. https://github.com/lucidrains/block-recurrent-transformer-py... i think it is worth continuing research on both fronts.

  • Proxmox-load-balancer

    Designed to constantly maintain the Proxmox cluster in balance

  • 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)

  • HTM-pytorch

    Implementation of Hierarchical Transformer Memory (HTM) for Pytorch

  • 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
  • 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

  • pyheap

    A heap dumper and analyzer for CPython based on GDB

  • memory-hammer

    An always-on Anki review system.

    Project mention: Memory Hammer: An e-ink, always-on, OSS spaced repetition system | news.ycombinator.com | 2023-04-12
  • dask-memusage

    A low-impact profiler to figure out how much memory each task in Dask is using

  • SaaSHub

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

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). The latest post mention was on 2024-02-10.

Python Memory related posts

Index

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

Project Stars
1 memray 12,401
2 psutil 9,881
3 volatility 6,859
4 volatility3 2,154
5 promnesia 1,687
6 ps_mem 1,473
7 pointers.py 857
8 memorizing-transformers-pytorch 601
9 MalConfScan 466
10 recurrent-memory-transformer-pytorch 376
11 theine 280
12 gpt-voice-conversation-chatbot 277
13 block-recurrent-transformer-pytorch 201
14 Proxmox-load-balancer 147
15 memprof 128
16 checkmate 123
17 HTM-pytorch 71
18 M.I.L.E.S 53
19 PyMemoryEditor 46
20 cacheme 38
21 pyheap 30
22 memory-hammer 28
23 dask-memusage 24
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com