Skip to content
New issue

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

joblib warnings on persisting input arguments #49

Open
alexdesiqueira opened this issue Jun 8, 2020 · 2 comments
Open

joblib warnings on persisting input arguments #49

alexdesiqueira opened this issue Jun 8, 2020 · 2 comments

Comments

@alexdesiqueira
Copy link
Member

I'm receiving joblib warnings on "persisting input arguments"

pipeline.py:184: UserWarning: Persisting input arguments took 0.92s to run.
If this happens often in your code, it can cause performance problems 
(results will be correct in all cases). 
The reason for this is probably some large input arguments for a wrapped
 function (e.g. large strings).
THIS IS A JOBLIB ISSUE. If you can, kindly provide the joblib's team with an
 example so that they can fix the problem.
  T_space, top_ruler = ruler_detection.main(image_rgb, axes)

pipeline.py:187: UserWarning: Persisting input arguments took 0.86s to run.
If this happens often in your code, it can cause performance problems 
(results will be correct in all cases). 
The reason for this is probably some large input arguments for a wrapped
 function (e.g. large strings).
THIS IS A JOBLIB ISSUE. If you can, kindly provide the joblib's team with an
 example so that they can fix the problem.
  bfly_rgb, bfly_bin = binarization.main(image_rgb, top_ruler, args.grabcut, axes)

Should we worry about that? Thank you!

@stefanv
Copy link
Contributor

stefanv commented Jun 9, 2020

I presume this is because we pass in large NumPy arrays. Why would they say this is a joblib issue? It takes time to checksum a large array. Maybe check with the joblib folks?

@alexdesiqueira
Copy link
Member Author

There are issues opened in joblib in the same fashion, the most recent one from eight days ago. @AdamGleave suggests a workaround in this one:

As a workaround I am currently using np.set_printoptions to reduce the verbosity of repr(x) on a NumPy array x. We could potentially use the same trick in _persist_input (restoring the original options with a {get,set}_printoptions pair), but this does not feel very satisfactory.

Maybe it suits us...? I'll have to check the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants