Skip to content

Fix Bayesian detector device guard - #46

Open
sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix-detector-device-check
Open

sylvesterkaczmarek wants to merge 1 commit into
google-deepmind:mainfrom
sylvesterkaczmarek:fix-detector-device-check

Conversation

@sylvesterkaczmarek

@sylvesterkaczmarek sylvesterkaczmarek commented Aug 15, 2026 •

Copy link
Copy Markdown

Fixes #26.

Summary

Correct the Bayesian detector device guard so CPU execution is rejected as intended while GPU/TPU execution is allowed.

The previous condition was inverted: it raised when the device was CUDA or TPU, even though the accompanying error states that CPU training is unstable and recommends GPU or TPU. This changes the predicate to raise only when the device is neither CUDA nor TPU.

Testing

  • full repository test suite: 18 passed
  • existing PyTorch batching warnings only; no test failures

@google-cla

google-cla Bot commented Aug 15, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@sylvesterkaczmarek
sylvesterkaczmarek marked this pull request as ready for review August 15, 2026 18:32
@sylvesterkaczmarek
sylvesterkaczmarek force-pushed the fix-detector-device-check branch from fc24ed7 to 7e70be1 Compare August 15, 2026 18:47
@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Could a maintainer review the Bayesian-detector device guard and arrange fresh approved CI and security runs? Both previous runs ended without creating any jobs after 30 days, which looks like expired approval.

@sylvesterkaczmarek

Copy link
Copy Markdown
Author

Following up on #46, #53, #50. Could a maintainer take a look when available? Please let me know if any need changes or a different scope.

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.

ValueError in detector_bayesian.train_best_detector due to inverted GPU check

1 participant