Skip to content

Fix CausalAgent input handling issues#22

Open
zaryabmakram wants to merge 6 commits intocausalNLP:refactoringfrom
zaryabmakram:refactoring-fixed
Open

Fix CausalAgent input handling issues#22
zaryabmakram wants to merge 6 commits intocausalNLP:refactoringfrom
zaryabmakram:refactoring-fixed

Conversation

@zaryabmakram
Copy link
Copy Markdown

This PR addresses issues in the refactoring branch related to incorrect input handling.

Key Changes:

  1. Fixed input argument handling in CausalAgent to ensure only valid parameters are passed
  2. Removed invalid input arguments that were previously causing failures
  3. Added per-index result writing to the output file for better traceability and debugging
  4. Implemented a fallback mechanism to use the original data file if data cleaning fails
  5. Added to result objects by storing query_info for additional context and analysis

Copy link
Copy Markdown

@jacobemmerson jacobemmerson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, thanks!

if self.cleaned_dataset_path and remove_cleaned:
if isinstance(self.load_dataset(cleaned=True), pd.DataFrame):
os.remove(self.cleaned_dataset_path)
# os.remove(self.cleaned_dataset_path)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

commenting this out is fine since the user's can manually remove the cleaned files, but we may want to instead save it to a cleaned subset folder for easier removal if we don't want to do it already.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, my mistake for forgetting to update our CLI.

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

Successfully merging this pull request may close these issues.

2 participants