-
Notifications
You must be signed in to change notification settings - Fork 1
Ensure pickled table pandas compatibility #484
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
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideBroadens the exception handling when loading pickled tables so that any error during pickle loading falls back to alternative formats like PARQUET or CSV, improving compatibility across different pandas versions. Sequence diagram for loading a table with pickle fallbacksequenceDiagram
participant UserCode
participant Table
participant PickleLoader as _load_pickled
participant FallbackLoader as load_parquet_or_csv
UserCode->>Table: load(pkl_file, pickled=True)
activate Table
Table->>PickleLoader: _load_pickled(pkl_file)
activate PickleLoader
PickleLoader-->>Table: raise Exception
deactivate PickleLoader
Note over Table: Any Exception triggers fallback
Table->>FallbackLoader: try PARQUET or CSV
activate FallbackLoader
FallbackLoader-->>Table: table_data
deactivate FallbackLoader
Table-->>UserCode: loaded table
deactivate Table
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey - I've left some high level feedback:
- Catching a broad
Exceptionhere may mask unexpected issues unrelated to pickle/pandas compatibility; consider either narrowing the set of caught exceptions or checking the exception type/message before falling back to PARQUET/CSV.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Catching a broad `Exception` here may mask unexpected issues unrelated to pickle/pandas compatibility; consider either narrowing the set of caught exceptions or checking the exception type/message before falling back to PARQUET/CSV.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files
🚀 New features to boost your workflow:
|
Closes #483
Ensure we except all possible errors when loading a table from pickle as storing/loading with different
pandasversions might result in a variety of different errors.Summary by Sourcery
Bug Fixes: