@@ -93,8 +93,6 @@ class SettingsMS2Deepscore:
9393 If True the model will do separate pair sampling for training for each ionmode.
9494 This gives better balance over the ionmodes. Initial results showed a decrease in pos-pos prediction
9595 accuracy. Which you can find in the notebook model_benchmarking/Compare balanced cross ion moe sampling.ipynb
96- additional_metadata:
97- Additional metadata that should be used in training the model. e.g. precursor_mz
9896 dropout_rate:
9997 The dropout rate that should be used during training
10098 learning_rate:
@@ -272,8 +270,6 @@ def __init__(self, validate_settings=True, **settings):
272270 np .random .seed (self .random_seed )
273271
274272 if self .spectrum_file_path is not None :
275- if not os .path .isfile (self .spectrum_file_path ):
276- raise ValueError ("The spectrum file specified is not an existing file" )
277273 root_dir = os .path .dirname (self .spectrum_file_path )
278274 spectrum_file_name = os .path .basename (self .spectrum_file_path )
279275
@@ -304,7 +300,10 @@ def validate_settings(self):
304300 validate_bin_order (self .same_prob_bins )
305301 if self .balanced_sampling_across_ionmodes and self .ionisation_mode != "both" :
306302 raise ValueError ("Balanced sampling across ionmodes only works if you train on both ionmodes" )
307-
303+ if self .spectrum_file_path is not None :
304+ if not os .path .isfile (self .spectrum_file_path ):
305+ raise ValueError ("The spectrum file specified is not an existing file" )
306+
308307 def create_model_directory_name (self ):
309308 """Creates a directory name using metadata, it will contain the metadata, the binned spectra and final model"""
310309 binning_file_label = ""
0 commit comments