Skip to content

Commit e8d0c8e

Browse files
committed
Merge branch 'vector_pred_compat' of github.com:ppdebreuck/modnet
2 parents 4c50516 + 62c4825 commit e8d0c8e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modnet/models/vanilla.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,11 @@ def _restore_model(self):
846846
fill_value=-1,
847847
).fit(np.zeros((1, self.n_feat))),
848848
)
849+
if not hasattr(self, "targets_groups"):
850+
self.targets_groups = [x for subl in self.targets for x in subl]
851+
LOG.warning(
852+
"Installed modnet version (v>=0.4.0) does not match loaded model (v<0.4.0) and may result in errors. Please retrain or change your modnet version !"
853+
)
849854

850855
def save(self, filename: str) -> None:
851856
"""Save the `MODNetModel` to filename:

0 commit comments

Comments
 (0)