Mamo
Your friendly neighborhood persistent memoization library.
Getting started
pip install mamo
Design
Code changes drive data changes. Especially, with big data, it is highly likely that different calls return different data.
Mamo fingerprints data by hashing it when unavoidable and by fingerprinting the computational graph (as far as known to Mamo) otherwise.
As future extension, Mamo will support different fingerprints for the same value, but in common use-cases detecting code changes is more impactful.
It assumes functions are pure, which allows for ignoring stochasticity. Otherwise anything using a random number generator would constantly be marked as stale.
More details
Mamo has concepts: value identity and fingerprints. Fingerprints are used to determine whether a stored computed value is stale: If an argument value to the function that computes a value is different (different fingerprints) from the one that was used originally, we mark the value as stale.
Value identity is about when two values have the same identity. (If every value was unique, there would never be stale values.) This is only an important concept for computed values: the result of a function with the same arguments (argument identity) has the same value identity as the stored result for a previous call.
Assumptions
The biggest assumption for the current design is:
Values are unlikely to ever be the same.
This means that we can use hashing for checking equality checks, and that different computational graphs imply unequal values.
Thus, Mamo does not implement perfect memoization at the moment but only a heuristic that does not try to actually match arguments fully.
Metadata
Release files for mamo 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| mamo-0.1.3.tar.gz | 24.1 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mamo-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 57.5 kB
Release files / mamo-0.1.3.tar.gz
| Download URL | mamo-0.1.3.tar.gz |
|---|---|
| Size | 24.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fe4fb6e611a3e65b37827d326adae887fa232acb7d4c5b212d6110260ab44859
|
|
BLAKE2b-256 checksum How to use checksums |
96a23c6e3b7b4fc84d1baa00c1778bf760c3f8737a8de43c4064ecb8ab8c0d13
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.6
|
Release files / mamo-0.1.3-py3-none-any.whl
| Download URL | mamo-0.1.3-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d68703b3ec3584a03c1fc7d9ce5f8366a2126b90908536fd9178a76c61a2bf34
|
|
BLAKE2b-256 checksum How to use checksums |
de6a63166e59ead4f1d112e6b9c9460d9e97b3a4466aa280ebf1a0b8f9f7eb25
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/45.1.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.6
|
Security for mamo 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.