From b7f90fe6b75f6553810c8f4d58a2c281a1027d5a Mon Sep 17 00:00:00 2001 From: Contramundum Date: Mon, 14 Aug 2023 17:22:37 +0900 Subject: [PATCH] mypy --- optuna_dashboard/preferential/samplers/_gp.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/optuna_dashboard/preferential/samplers/_gp.py b/optuna_dashboard/preferential/samplers/_gp.py index 86192a78..d6d4caff 100644 --- a/optuna_dashboard/preferential/samplers/_gp.py +++ b/optuna_dashboard/preferential/samplers/_gp.py @@ -298,7 +298,7 @@ class PreferentialGPSampler(optuna.samplers.BaseSampler): ) self.device = device or torch.device("cpu") - self._gp: PreferentialGPSampler | None = None + self._gp: _PreferentialGP | None = None def reseed_rng(self) -> None: self._rng.seed() @@ -338,9 +338,9 @@ class PreferentialGPSampler(optuna.samplers.BaseSampler): noise_constraint=gpytorch.constraints.Positive(), ) - ids = {} - params = [] - pref_ids = [] + ids: dict[int, int] = {} + params: list[torch.Tensor] = [] + pref_ids: list[tuple[int, int]] = [] for better, worse in preferences: for t in (better, worse):