You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OS version: WIN11
Python version: 3.12
The current version of pandasai being used: 2.3.0
🐛 Describe the bug
In retrying correction framework, the code changes in import dependencies, not reflected in the code running environment.
The issue is in execute method of code_execution.py,
at line 71 in execution method, self._additional_dependencies only been assigned value here and never been changed: self._additional_dependencies = self.context.get("additional_dependencies", [])
thus in the susequent while loop, at line 83, even it refreshed code runing environment, but since self._additional_dependencies not change, the enviroment not change.
......
while retry_count <= self.context.config.max_retries:
try:
result = self.execute_code(code_to_run, code_context)
......
This is a bug to be fixed.
The text was updated successfully, but these errors were encountered:
The issue you're encountering is that the self._additional_dependencies variable is not updated during the retry process in the execute method, which means that any changes in import dependencies are not reflected in the code running environment. This is because self._additional_dependencies is only set once at the beginning and not updated in subsequent retries.
To address this, you would need to ensure that self._additional_dependencies is updated with any new dependencies before each retry. This could involve re-fetching the dependencies from the context or modifying the retry logic to account for changes in dependencies. Unfortunately, the current implementation does not include a mechanism to update self._additional_dependencies during retries, which is why the environment does not change as expected [1].
System Info
OS version: WIN11
Python version: 3.12
The current version of pandasai being used: 2.3.0
🐛 Describe the bug
In retrying correction framework, the code changes in import dependencies, not reflected in the code running environment.
The issue is in execute method of code_execution.py,
at line 71 in execution method, self._additional_dependencies only been assigned value here and never been changed:
self._additional_dependencies = self.context.get("additional_dependencies", [])
thus in the susequent while loop, at line 83, even it refreshed code runing environment, but since self._additional_dependencies not change, the enviroment not change.
This is a bug to be fixed.
The text was updated successfully, but these errors were encountered: