From bcf82146bb229ace4845a1c8c347c7c902d03c7b Mon Sep 17 00:00:00 2001
From: Tim O'Donnell <timodonnell@gmail.com>
Date: Fri, 17 Jan 2020 12:57:09 -0500
Subject: [PATCH] fix

---
 mhcflurry/select_cleavage_models_command.py | 2 +-
 mhcflurry/train_cleavage_models_command.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mhcflurry/select_cleavage_models_command.py b/mhcflurry/select_cleavage_models_command.py
index da4bf649..dfcb4b79 100644
--- a/mhcflurry/select_cleavage_models_command.py
+++ b/mhcflurry/select_cleavage_models_command.py
@@ -273,7 +273,7 @@ def model_select(
             possible_ensemble = list(selected) + [i]
             predictions = predictions_df[possible_ensemble].mean(1)
             auc_score = roc_auc_score(df.hit.values, predictions.values)
-            if auc_score >= best_model_score:
+            if auc_score > best_model_score:
                 best_model = i
                 best_model_score = auc_score
             if not selected:
diff --git a/mhcflurry/train_cleavage_models_command.py b/mhcflurry/train_cleavage_models_command.py
index d72271eb..6dda4a21 100644
--- a/mhcflurry/train_cleavage_models_command.py
+++ b/mhcflurry/train_cleavage_models_command.py
@@ -343,7 +343,7 @@ def train_models(args):
     if results_generator:
         for new_predictor in tqdm.tqdm(results_generator, total=len(work_items)):
             save_start = time.time()
-            (model,) = predictor.models
+            (model,) = new_predictor.models
             pprint.pprint(model.fit_info[-1]['training_info'])
             (new_model_name,) = predictor.add_models(new_predictor.models)
             predictor.save(
-- 
GitLab