-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Disable deep hashing if memoization is off #2007
Conversation
Simple change that does make sense. |
Unfortunately it breaks some things. I'll have to think more about it. |
a0b4832
to
ac7297f
Compare
Okay figured it out, the |
Sounds like the right fix. That said it might be nice to give the concept a different name than |
How about Other than that, I'm happy to merge once the tests pass (ideally with some new unit tests!) |
42fcf58
to
b17075f
Compare
b17075f
to
0757d8c
Compare
@@ -404,11 +443,11 @@ class PointerXY(LinkedStream): | |||
the plot bounds, the position values are set to None. | |||
""" | |||
|
|||
x = param.ClassSelector(class_=(Number, util.basestring), default=None, | |||
x = param.ClassSelector(class_=(Number, util.basestring, tuple), default=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated change that snuck in. Allows the Pointer stream to work with nested categorical axes so worth keeping (and I can't be bothered to make a new PR).
@@ -101,7 +101,7 @@ def default(self, obj): | |||
elif isinstance(obj, np.ndarray): | |||
return obj.tolist() | |||
if pd and isinstance(obj, (pd.Series, pd.DataFrame)): | |||
return repr(sorted(list(obj.to_dict().items()))) | |||
return obj.to_csv().encode('utf-8') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fair bit faster, although still not great, hence also adding a hashkey.
Ready to merge. |
Looks good. Merging. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Currently
Callable
runs deep hashing on the stream values whether or not memoization is enabled. This PR simply disables it when memoization is off, which has no effect but can be more efficient.