We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab63cd0 commit 55b3dd6Copy full SHA for 55b3dd6
autointent/modules/prediction/_adaptive.py
@@ -144,9 +144,13 @@ def load(self, path: str) -> None:
144
with (dump_dir / self.metadata_dict_name).open() as file:
145
metadata: AdaptivePredictorDumpMetadata = json.load(file)
146
147
+ if metadata["tags"] is not None and isinstance(metadata["tags"], list):
148
+ self.tags = [Tag(**tag) for tag in metadata["tags"]] # type: ignore[arg-type]
149
+ else:
150
+ self.tags = None
151
+
152
self._r = metadata["r"]
153
self.n_classes = metadata["n_classes"]
- self.tags = [Tag(**tag) for tag in metadata["tags"] if metadata["tags"] and isinstance(metadata["tags"], list)] # type: ignore[arg-type, union-attr]
154
self.metadata = metadata
155
156
0 commit comments