Skip to content

Commit

Permalink
deeplc retrain fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurDeclercq committed Oct 9, 2023
1 parent 1751fd6 commit a47fe1a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ms2rescore/feature_generators/deeplc.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,16 +157,17 @@ def add_features(self, psm_list: PSMList) -> None:
self.deeplc_predictor = self.DeepLC(
n_jobs=self.processes,
verbose=self._verbose,
path_model=self.user_model or self.selected_model,
path_model=self.selected_model or self.user_model,
**self.deeplc_kwargs,
)
self.deeplc_predictor.calibrate_preds(
seq_df=self._psm_list_to_deeplc_peprec(psm_list_calibration)
)
# Still calibrate for each run, but do not try out all model options.
# Just use model that was selected based on first run
if not self.user_model and not self.selected_model:
if not self.selected_model:
self.selected_model = list(self.deeplc_predictor.model.keys())
self.deeplc_kwargs["deeplc_retrain"] = False
logger.debug(
f"Selected DeepLC model {self.selected_model} based on "
"calibration of first run. Using this model (after new "
Expand Down

0 comments on commit a47fe1a

Please sign in to comment.