(self, device_dtype: torch.device | str | None = None)
| 36 | self._disable_tqdm = settings.DISABLE_TQDM |
| 37 | |
| 38 | def to(self, device_dtype: torch.device | str | None = None): |
| 39 | if hasattr(self, "model") and self.model: |
| 40 | self.model.to(device_dtype) |
| 41 | return |
| 42 | # Predictors that don't own a torch model (e.g. VLM-backed predictors that |
| 43 | # rely on an external server) treat .to() as a no-op. |
| 44 | if hasattr(self, "manager") and self.manager is not None: |
| 45 | return |
| 46 | raise ValueError("Model not loaded") |
| 47 | |
| 48 | def get_batch_size(self): |
| 49 | batch_size = self.batch_size |
no outgoing calls
no test coverage detected