Commit 3805046
Fix FixedSingleSampleModel dtype/device conversion (#1254)
Summary:
Pull Request resolved: #1254
Sometimes `model.train_inputs[0]` is a tuple instead of a tensor. Instead of assuming the structure of the model's class members, will just cast X on the fly in `forward`. It shouldn't cause any additional runtime if device and dtype align.
Reviewed By: Balandat
Differential Revision: D36976244
fbshipit-source-id: 6bd670e52d155ee5a6215598ce840ec1d6c7ae8c1 parent 4224cd8 commit 3805046
File tree
2 files changed
+5
-5
lines changed- botorch/models
- test/models
2 files changed
+5
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | 218 | | |
222 | 219 | | |
223 | 220 | | |
224 | | - | |
| 221 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | | - | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
0 commit comments