Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Base python script used to profile memory usage of joblib dump/load functions
import numpy as np
import joblib
obj = [np.ones((5000, 5000)), np.random.random((5000, 5000))]
joblib.dump(obj, '/tmp/test.pkl', compress=True)
joblib.load('/tmp/test.pkl')
Owner

aabadie commented May 17, 2016

How to use this script

  1. Add @profile decorator to joblib dump and load functions in joblib/numpy_pickle.py
  2. Run the following command in a console:
$ mprof run profile_memory.py && mprof plot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment