Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions ml/train_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,12 @@ def build_lume_model(
]

if model_type == "GP":
# Clear prediction_strategy on each sub-GP before moving to CPU.
# It is set during training call and holds cached CUDA
# tensors (e.g. Cholesky factors) that are plain Python attributes, so
# .cpu() / _apply() won't reach them.
for sub_gp in model.models:
sub_gp.prediction_strategy = None
return GPModel(
model=model.cpu(),
input_variables=input_vars,
Expand Down
Loading