Thanks for the follow-up.
I’ve missed the change in this attribute and get the undesired behavior.
Register the condition as a BoolTensor and it should work:
self.calculate_running = torch.tensor(calculate_running, dtype=torch.bool)