We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I want to profile method in class with kernprof, but it seems that pickle is not supported. Any help is appreciated.
kernprof version: 4.0.1
Below is the code to reproduce the issue.
import pickle class Data: pass class Test: @profile def a(self): data = Data() pickle.dump(data, open("tmp.pkl", "wb")) Test().a()
If we save the code into test.py and call kernprof -lv test.py, the error is:
test.py
kernprof -lv test.py
_pickle.PicklingError: Can't pickle <class '__main__.Data'>: attribute lookup Data on __main__ failed
It seems that neither pickle.dump() nor pickle.load() is supporrted by line_profile currently.
pickle.dump()
pickle.load()
The text was updated successfully, but these errors were encountered:
Does this work with the older 3.x branch?
Sorry, something went wrong.
Probably related to #191 (actually duplicates #183)
I'm having the same problem where using line_profiler appears to interfere with pickling objects. Not sure how to get around this.
No branches or pull requests
I want to profile method in class with kernprof, but it seems that pickle is not supported. Any help is appreciated.
kernprof version: 4.0.1
Below is the code to reproduce the issue.
If we save the code into
test.py
and callkernprof -lv test.py
, the error is:It seems that neither
pickle.dump()
norpickle.load()
is supporrted by line_profile currently.The text was updated successfully, but these errors were encountered: