diff --git a/mhcflurry/regression_target.py b/mhcflurry/regression_target.py index d1189178c54df06d32ae1b45b2ee23efeed9306e..3c9ed6a741805646123fa12a7c8e94b605596115 100644 --- a/mhcflurry/regression_target.py +++ b/mhcflurry/regression_target.py @@ -14,7 +14,7 @@ def from_ic50(ic50, max_ic50=50000.0): numpy.array of float """ - x = 1.0 - (numpy.log(ic50) / numpy.log(max_ic50)) + x = 1.0 - (numpy.log(numpy.maximum(ic50, 1e-12)) / numpy.log(max_ic50)) return numpy.minimum( 1.0, numpy.maximum(0.0, x)) diff --git a/mhcflurry/train_pan_allele_models_command.py b/mhcflurry/train_pan_allele_models_command.py index 1d67f00386ad8c19a500bb665e2f7fb56eb70028..ae5bb8d8e261bf2c1a92973ad914814a0d975d3a 100644 --- a/mhcflurry/train_pan_allele_models_command.py +++ b/mhcflurry/train_pan_allele_models_command.py @@ -336,6 +336,7 @@ def main(args): start = time.time() worker_pool = worker_pool_with_gpu_assignments_from_args(args) + print("Worker pool", worker_pool) if worker_pool: print("Processing %d work items in parallel." % len(work_items)) diff --git a/test/test_train_pan_allele_models_command.py b/test/test_train_pan_allele_models_command.py index d422ea897bf4e64d4d319027c1476a10a9a6091d..397ccee6498496037251471799ece305bb6e2e00 100644 --- a/test/test_train_pan_allele_models_command.py +++ b/test/test_train_pan_allele_models_command.py @@ -136,3 +136,10 @@ if os.environ.get("KERAS_BACKEND") != "theano": def test_run_serial(): run_and_check(n_jobs=1) + +if __name__ == "__main__": + test_run_serial() + #for (name, value) in list(globals().items()): + # if name.startswith("test_"): + # print("Running test", name) + # value() \ No newline at end of file