Skip to main content

Who Created Me

banner

What is this?

This is a tool to automatically track which piece of code created your data.

In particular, every time you save a numpy array or a torch tensor, this tool will automatically create a file with metadata about the code that created the data.

.
├── data.npy
└── .data.npy.who
cat .data.npy.who
───────┬─────────────────────────────────────────────────────────────────────
       │ File: .data.npy.who
───────┼─────────────────────────────────────────────────────────────────────
   1   │ Script Path: /path/to/example_numpy.py
   2   │ -------------------------------------------------------
   3   │ Code:
   4   │ -------------------------------------------------------
   5   │ import numpy as np
   6   │ import whocreatedme as wcme
   7   │ wcme.trace(numpy=True)
   8   │
   9   │ np.save("./test.npy", np.random.randn(50, 50))
  10   │ -------------------------------------------------------
───────┴─────────────────────────────────────────────────────────────────────

How to use

You can either use the CLI or the Python API:

CLI

python -m whocreatedme.cli <your-script> [--npsave] [--torchsave]

For example, to trace both numpy and torch save methods for a script script.py, simply run:

python -m whocreatedme.cli script.py --npsave --torchsave

Python API

Alternatively, you can trace the numpy and torch save methods from your code by using the Python API:

import numpy as np
import whocreatedme
whocreatedme.trace()

# this will automatically create a file `.data.npy.who` in the same directory as `data.npy`
np.save("data.npy", np.array([1, 2, 3]))

Install

pip install whocreatedme

Limitations

For now, this lightweight module only supports monkey-patching the .save() methods in numpy and torch.


Images in README created with DALL-E.

Metadata

Release files for whocreatedme 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for whocreatedme 1.0.0
File Size Uploaded Provenance Actions
whocreatedme-1.0.0.tar.gz 4.1 kB Without provenance Details for whocreatedme-1.0.0.tar.gz

Release files / whocreatedme-1.0.0.tar.gz

Download URL whocreatedme-1.0.0.tar.gz
Size 4.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4bc51adaa12e7f2af43761bece8249f11756addc2b6ef3fa795a4e25fc96a2c8
BLAKE2b-256 checksum
How to use checksums
fc2d454e3c706e5d132f7dbadcf1854ebaf0fe1b004530a06c6e09b7ffdce895
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for whocreatedme 1.0.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

1.0.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page