From 69db74bfdde6b9700103b4e85c3f5282449ef84a Mon Sep 17 00:00:00 2001 From: Patrick Armstrong Date: Thu, 13 May 2021 21:58:33 -0500 Subject: [PATCH] Added check to abort on train mode with PerfectClassifier, UnityClassifier, and FitProbClassifier --- pippin/classifiers/classifier.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pippin/classifiers/classifier.py b/pippin/classifiers/classifier.py index b2db7a40..448256b3 100644 --- a/pippin/classifiers/classifier.py +++ b/pippin/classifiers/classifier.py @@ -162,6 +162,10 @@ def get_num_ranseed(sim_task, lcfit_task): else: mode = Classifier.PREDICT + # Validate that train is not used on certain classifiers + if mode == Classifier.TRAIN: + assert name not in ["PerfectClassifier", "UnityClassifier", "FitProbClassifier"], f"Can not use train mode with {name}" + needs_sim, needs_lc = cls.get_requirements(options) runs = []