Skip to main content

chart

MIT Travis PyPI Downloads

About

mummify makes model prototyping faster. The package automagically takes care of git and logging for your machine learning project so that you can focus on what's important.

Functions

mummify is one function and two command line tools:

  • log - to automatically log and commit model changes
  • mummify history - to view those changes
  • mummify switch - to go back to a different version of your model

Usage

mummify is simple to use. Just add import mummify at the top and mummify.log(<string>) at the bottom of your model:

import mummify

from sklearn.datasets import load_wine
from sklearn.model_selection import train_test_split
from sklearn.neighbors import KNeighborsClassifier

data = load_wine()
y = data.target
X = data.data

X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42)

model = KNeighborsClassifier()
model.fit(X_train, y_train)
accuracy = model.score(X_test, y_test)

mummify.log(f'Test accuracy: {accuracy:.3f}')

When you run your model (python model.py) for the first time mummify will create a protected .mummify git folder and will start to log messages to a mummify.log file.

When you make changes and run everything again:

...
model = LogisticRegression()
model.fit(X_train, y_train)
accuracy = model.score(X_test, y_test)

mummify.log(f'Test accuracy: {accuracy:.3f}')

mummify will update the mummify.log file and save a snapshot of your working directory.

To view the history of your model, just run mummify history from the command line:

max$ mummify history

*  HEAD mummify-3d15c7c2
*  mummify-2d234a8a
*  mummify-1fad5388
*  mummify-root

And to go back to a previous snapshot of your model just grab the mummify id from the mummify.log file and run mummify switch <id> from the command line:

max$ mummify switch mummify-2d234a8a

mummify will preserve all state history during and after a switch and keep the mummify.log file intact.

Installation

pip install mummify

Contribute

For feature requests or bug reports, please use Github Issues

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mummify-1.0.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file mummify-1.0.tar.gz.

File metadata

  • Download URL: mummify-1.0.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.15.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.1

File hashes

Hashes for mummify-1.0.tar.gz
Algorithm Hash digest
SHA256 ef8093a3b07f309970e9e0820f445c72cee98c2f03c35c08418619bac23ee592
MD5 d8c833277a1f983e645e69df2a11a994
BLAKE2b-256 9920e7755e48fa5d622b338c6d76b4219359ab91ec95380b488bc7a016433b93

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page