Relocatable models do not properly load the weights
Since MaggotUBA-adapter@d89a45c7, trained models are made relocatable with relative paths for config and weight files.
However, the retrained_encoder.pt weight file under element enc_path
in the clf_config.json file should be relative to the location pointed to by element log_dir
in the autoencoder_config.json file. As a consequence this file is not loaded. With DEBUG-level logging, the following message appears:
DEBUG:predict_model: initializing the encoder ([Errno 2] No such file or directory: 'models/test_train_default/models/test_train_default/retrained_encoder.pt')
Although this bug affects the MaggotUBA-adapter repository only, it also affects Docker images of the 0.13
series with MaggotUBA embarked.
The fix will be included from the 0.14
series only, together with other fixes and features related to the same use case.
Note: this bug does not affect the official taggers (e.g. 20230311, 20230311-0, 20230129, etc).