You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Pull Request resolved: #3210
Fix code quality issues across multiple files in `botorch/acquisition/`:
**penalized.py:**
1. Rename misleading `pdf` variable to `penalty` in `GaussianPenalty.forward`.
2. Replace `__call__` with `forward` in `L0Approximation`, `L0PenaltyApprox`, and `L0PenaltyApproxObjective`.
3. Fix copy-paste docstring in `PenalizedAcquisitionFunction.__init__`.
4. Remove duplicated line in `PenalizedMCObjective` docstring example.
5. Replace bare `assert` with `ValueError` in `PenalizedMCObjective.forward`.
**fixed_feature.py:**
6. Fix return type annotation: `get_device_of_sequence` returns `torch.device`, not `torch.dtype`.
7. Fix `_is_cuda` to work on multi-GPU: use `value.device.type == "cuda"` instead of comparing against `torch.device("cuda")`.
**objective.py:**
8. Fix typo "Trasform" → "Transform" in comment.
9. Use `isinstance(eta, Tensor)` instead of `type(eta) is not Tensor`.
10. Replace bare `assert` with `ValueError` in `LearnedObjective.__init__`.
**proximal.py:**
11. Fix typos "decrese" → "decrease" and "vaidation" → "validation".
**thompson_sampling.py:**
12. Fix typo "inherting" → "inheriting".
**active_learning.py:**
13. Remove duplicate phrase "points that have" in `X_pending` docstring.
14. Fix return shape docstring: `batch_size` not `batch_size x q`.
**multioutput_acquisition.py:**
15. Fix `MultiOutputPosteriorMean` docstring: lists correct params (`model`, `weights`) instead of `acqfs`.
16. Fix `MultiOutputAcquisitionFunctionWrapper` docstring: says "wrapper" not "base class".
Reviewed By: dme65
Differential Revision: D94963222
fbshipit-source-id: 1a09876ab0aebb00e908cd5d5373dcafdc34723b
0 commit comments