-
Notifications
You must be signed in to change notification settings - Fork 15
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
two dataframes with different values hitting cache incorrectly #7
Comments
Hi monstrorivas, Thanks for your issue. This was a bug - in order to memorize a pandas dataframe,
So, two dataframes may be considered equal if you merely compare them using To address this issue, I have published a new release v0.3.1. Please run |
ok, that makes sense. What I did as a workaround is to pickle the dataframe before passing it to the memoized function. Then, I have to deserialize it within the function. Would something like that work in your implementation, instead of using Could you give me an example of what to use for the |
Why not assemble all arguments into a single dictionary and |
Are pandas dataframes supported as function arguments in a @cached decorated function?
I tried to simplify this example with a smaller dataframe but @cached does seem to behave as one would expect for smaller dataframes.
However, when I tried the minimal code below with the attached data I ran into a problem where the two clearly different dataframes are being interpreted as identical in the @cached decorated function. Thus, df2 doesn't make it through
which_df
but instead gets the value from the cache since it assumes df2 is equals to df1 (and it is not!)This is the test to replicate. Please use the attached data get the unexpected behavior explained in this issue
memoization_test.zip
The text was updated successfully, but these errors were encountered: