Skip to content
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

Support map_partitions ufunc with non data frame output #357

Merged
merged 3 commits into from
Jun 14, 2024

Conversation

smcguire-cmu
Copy link
Contributor

Currently if the user returns a non data frame when calling map_partitions (e.g. returning a series) it uses this as the ddf in another catalog, which causes errors when the catalog expects a ddf but actually gets a series.

This updates the map_partitions method to check that the return type is a data frame. If the return type isn't, the raw dask collection is returned instead of creating the catalog.

Fixes #324

Copy link

github-actions bot commented Jun 11, 2024

Before [73948db] After [42e3993] Ratio Benchmark (Parameter)
6.51±0.4ms 6.92±0.3ms 1.06 benchmarks.time_box_filter_on_partition
15.0±0.7ms 15.3±0.4ms 1.02 benchmarks.time_polygon_search
468±5ms 471±2ms 1.01 benchmarks.time_create_midsize_catalog
48.3±0.7ms 48.9±0.4ms 1.01 benchmarks.time_kdtree_crossmatch
3.16±0.01s 3.17±0.02s 1 benchmarks.time_create_large_catalog

Click here to view all benchmarks.

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.31%. Comparing base (6ac42b6) to head (b329cd4).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #357   +/-   ##
=======================================
  Coverage   98.30%   98.31%           
=======================================
  Files          43       43           
  Lines        1418     1421    +3     
=======================================
+ Hits         1394     1397    +3     
  Misses         24       24           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@smcguire-cmu smcguire-cmu merged commit a621069 into main Jun 14, 2024
12 checks passed
@smcguire-cmu smcguire-cmu deleted the sean/fix-map-parts branch June 14, 2024 18:50
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.

Attribute error when running map_partitions without compute
2 participants