Fix compatibility with dask 2024.3+ - #43
Open
dcolinmorgan wants to merge 1 commit into
Open
Conversation
Modern dask (2024.3+) removed the legacy dataframe implementation in favor of dask-expr query planning. This causes ImportError when trying to import from dask.dataframe.utils. Changes: - Add try/except for dask.dataframe imports - Fallback to dask-expr imports for modern dask versions - Provide graceful error message if neither is available Fixes compatibility with: - dask >= 2024.3.0 - Python 3.11+ - Modern pandas versions Tested with dask 2024.12.0 and pandas 2.2.0
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix compatibility with dask 2024.3+
Problem
Arboreto currently fails to import with modern dask versions (2024.3+):
This is because dask 2024.3+ removed the legacy dataframe implementation in favor of
dask-exprquery planning.Solution
Add compatibility layer that:
dask.dataframe(legacy/older versions)dask-exprimports (modern versions)Testing
Tested with:
Changes
arboreto/core.pyimports onlyRelated Issues
This affects users trying to use arboreto with:
Would appreciate review and merge to unblock users on modern dependency stacks!