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

Improve error message for incorrect columns order in meta information #11393

Merged
merged 2 commits into from
Sep 26, 2024

Conversation

dbalabka
Copy link
Contributor

@GPUtester
Copy link
Collaborator

Can one of the admins verify this patch?

Admins can comment ok to test to allow this one PR to run or add to allowlist to allow all future PRs from the same author to run.

Copy link
Contributor

github-actions bot commented Sep 17, 2024

Unit Test Results

See test report for an extended history of previous test failures. This is useful for diagnosing flaky tests.

     13 files  ±0       13 suites  ±0   3h 6m 59s ⏱️ 3m 11s
 13 213 tests ±0   12 157 ✅ ±0   1 056 💤 ±0  0 ❌ ±0 
137 811 runs  ±0  118 784 ✅  - 2  19 027 💤 2  0 ❌ ±0 

Results for commit 6447bf1. ± Comparison against base commit e71d436.

♻️ This comment has been updated with latest results.

Copy link
Member

@jrbourbeau jrbourbeau left a comment

Choose a reason for hiding this comment

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

Thanks @dbalabka. This looks really close -- just one small question below

Comment on lines 439 to 440
f"\nActual: { { c: str(t) for c, t in meta.dtypes.items() } }"
f"\nExpected: { { c: str(t) for c, t in actual.dtypes.items() } }"
Copy link
Member

Choose a reason for hiding this comment

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

Why include dtype info here and not just the order of the columns? Seems irrelevant for the error being raised

Copy link
Contributor Author

@dbalabka dbalabka Sep 24, 2024

Choose a reason for hiding this comment

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

Good question. I like to see the function's output types for sanity check purposes. Futhermore, I can copy and paste the entire dict into the meta parameter if needed.

Also, I probably don't understand the purpose of this exception. If we know the order of the columns, why not simply reorder the columns?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@jrbourbeau, let's convert dict to list if you think it makes more sense.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, let's do that. I think just listing the columns in order makes the most sense here.

@jrbourbeau jrbourbeau merged commit 2306451 into dask:main Sep 26, 2024
23 checks passed
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.

"Order of columns does not match" error should give an extra info about expected order
3 participants