Skip to content

Commit 525b482

Browse files
chore: replace type checking with isinstance
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent f991b6b commit 525b482

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

torchTextClassifiers/torchTextClassifiers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -697,7 +697,7 @@ def load(cls, path: Union[str, Path], device: str = "auto") -> "torchTextClassif
697697

698698
# Reconstruct model_config
699699
model_config = ModelConfig.from_dict(metadata["model_config"])
700-
if type(model_config.label_attention_config) is dict:
700+
if isinstance(model_config.label_attention_config, dict):
701701
model_config.label_attention_config = LabelAttentionConfig(
702702
**model_config.label_attention_config
703703
)

0 commit comments

Comments
 (0)