Skip to content

Commit 1f55efc

Browse files
committed
Refactor typing ignore + remove unnecessary
1 parent f944bc3 commit 1f55efc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

autointent/modules/scoring/_ptuning/ptuning.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,6 @@ class PTuningScorer(BaseScorer):
4444
"""
4545

4646
name = "ptuning"
47-
_multilabel: bool
48-
_model: Any
49-
_tokenizer: Any
50-
_n_classes: int
5147
supports_multiclass = True
5248
supports_multilabel = True
5349

@@ -58,7 +54,7 @@ def __init__(
5854
batch_size: int = 8,
5955
learning_rate: float = 5e-5,
6056
seed: int = 0,
61-
report_to: REPORTERS_NAMES | None = None, # type: ignore # noqa: PGH003
57+
report_to: REPORTERS_NAMES | None = None, # type: ignore[valid-type]
6258
**ptuning_kwargs: dict[str, Any],
6359
) -> None:
6460
self.base_model_config = HFModelConfig.from_search_config(base_model_config)
@@ -67,8 +63,8 @@ def __init__(
6763
self.learning_rate = learning_rate
6864
self.seed = seed
6965
self.report_to = report_to
70-
self._model = None
71-
self._tokenizer = None
66+
self._model: Any = None
67+
self._tokenizer: Any = None
7268
self._ptuning_config = PromptEncoderConfig(**ptuning_kwargs) # type: ignore[arg-type]
7369

7470
@classmethod

0 commit comments

Comments
 (0)