matchms / ms2deepscore

Deep learning similarity measure for comparing MS/MS spectra with respect to their chemical similarity
Apache License 2.0
48 stars 22 forks source link

Move training functions into model classes #203

Open florian-huber opened 4 months ago

florian-huber commented 4 months ago

This refers to the pytorch version currently being developed. We should probably move the training functions into a train() method of each respective model class, for clarity.

niekdejonge commented 4 months ago

@florian-huber I am implementing this now. We have a few settings that are now stored in SettingsMS2Deepscore (e.g. settings.evaluator_num_filters), but others have to be provided separately and are therefore not stored when saving the model (like mini_batch_size). I understand the separation, the first ones are necessary to run the model, while the others are only relevant during training. But I would prefer to store all training settings when saving a model, to make it easy for us (and other developers) to check which settings were used during training. Shall I add these settings to init as well, to ensure that these are saved as well?

niekdejonge commented 4 months ago

And if we want to add them, shall I add them all to SettingsMS2Deepscore or shall I make a new Class EmbeddingsEvaluationModelSettings, or just add them as separate parameters in init of EmbeddingsEvaluator