Skip to content

Conversation

@TomAugspurger
Copy link
Member

Seems like some version pynvml switched from returning bytes to str (I can pin down the exact version if needed). This updates our test and type annotations to accomodate either.

Seems like some version pynvml switched from returning bytes to str (I
can pin down the exact version if needed). This updates our test and
type annotations to accomodate either.
@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2025

Unit Test Results

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

    27 files  ±0      27 suites  ±0   11h 31m 13s ⏱️ - 8m 45s
 4 125 tests ±0   3 996 ✅  - 1    125 💤 ±0  4 ❌ +1 
51 690 runs  ±0  49 256 ✅ ±0  2 428 💤  - 1  6 ❌ +1 

For more details on these failures, see this check.

Results for commit d04fdf8. ± Comparison against base commit 26e84a9.

Copy link
Member

@jacobtomlinson jacobtomlinson left a comment

Choose a reason for hiding this comment

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

We've seen this before. There is some history and complexity around the pynvml and nvidia-ml-py dependencies here. @rjzamora may remember better what we expect here.

But overall this PR seems to just coerce things into strings regardless of how they started, so this seems fine to me.

@TomAugspurger
Copy link
Member Author

John pointed me to #8962, which did the coercion. LMK if you and Rick have preferences on whether we should always try to coerce any str | bytes to str. Currently, I've just updated this test mock to match the new behavior (str) and updated the type annotations to match the pynvml version-dependent behavior.

@rjzamora
Copy link
Member

Thanks for taking care of this @TomAugspurger ! Given my experience with the way nvml bindings are generated in nvidia-ml-py, the safest bet is to use ensure_unicode (exactly like you are doing here).

@jacobtomlinson
Copy link
Member

Sounds good, thanks all!

@jacobtomlinson jacobtomlinson merged commit 0657de2 into dask:main Jan 10, 2025
27 of 34 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.

3 participants