mlangguth89 / downscaling_benchmark

6 stars 0 forks source link

Wrong name of model config file after training #16

Closed epavel1 closed 5 months ago

epavel1 commented 5 months ago

In the training script (main_train.py), the effective set of model hyperparameters (merged default and custom hyperparameters) are saved in the model's output directory. However, the method save_hparams_to_json of the AbstractModelClass uses the modelname-attribute of the model class to construct the json-filename where the final set of hyperparameters are saved. This approach does not comply with the modelnames listed in known_models of the model engine and results into errors in the postprocessing as follows:

FileNotFoundError: Could not find expected configuration file for model 'config_sha_wgan.json' under '../trained_models/sha_wgan_t2m_lean'

The solution is to control the filename via a parsing argument to save_hparams_to_json.