-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Removing cache initialization during post_init as it is going to be d… #1622
base: main
Are you sure you want to change the base?
Conversation
…one in initialize() with the correct value from config.enable_cache
#1621 Issue fix |
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.
👍 Looks good to me! Reviewed everything up to b387f10 in 54 seconds
More details
- Looked at
15
lines of code in1
files - Skipped
0
files when reviewing. - Skipped posting
3
drafted comments based on config settings.
1. pandasai/agent/state.py:45
- Draft comment:
Ensure removal of cache initialization from post_init doesn't leave AgentState without a cache when initialize() isn't called. Consider adding a comment noting that cache initialization has intentionally moved to initialize() to prevent confusion. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
2. pandasai/agent/state.py:68
- Draft comment:
Verify that unit tests cover cache initialization via initialize() (i.e., when config.enable_cache is True) since the behavior from post_init has been removed. - Reason this comment was not posted:
Comment was not on a location in the diff, so it can't be submitted as a review comment.
3. pandasai/agent/state.py:47
- Draft comment:
Removed duplicate cache init in post_init—now handled in initialize() based on config.enable_cache. Ensure that users call initialize() to properly set up the cache, and consider documenting that a custom cache passed via the constructor will be overridden. - Reason this comment was not posted:
Marked as duplicate.
Workflow ID: wflow_yCHJ2qnqIiQ3D9gE
You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet
mode, and more.
@gventuri We need this to be merged for our startup project, can you please expedite the release process? Thanks in Advance! |
Hi @Andromeda227799 this does not seem to solve the issue, but rather it seem not initialize the cache at all. Unfortunately we cannot merge it like this. Please, feel free to address the actual issue and we'll be happy to merge it! |
@gventuri Isn't the Agent state supposed to be initialized in the initialize() function based on the flags https://github.com/sinaptik-ai/pandas-ai/blob/main/pandasai/agent/state.py (Line 72) |
@Andromeda227799 good point, putting @ArslanSaleem in the loop, he's the most experience in the agent state |
37c739b
to
b387f10
Compare
Hey @gventuri @ArslanSaleem any update on this? |
@gventuri @ArslanSaleem Was facing the same exact issue. Please can we get it merged ASAP! |
@ArslanSaleem I was facing the same issue while deploying in our servers. Mostly we have read only permissions, this really should be fixed quickly. |
…one in initialize() with the correct value from config.enable_cache
Important
Removes cache initialization from
__post_init__
and moves it toinitialize()
instate.py
, usingconfig.enable_cache
.__post_init__
instate.py
.initialize()
instate.py
, usingconfig.enable_cache
to determine if cache should be created.initialize()
function.This description was created by
for b387f10. It will automatically update as commits are pushed.