From 393f2368f2f8cf4d2d9ce3cc036e5a0e63835ed4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Flores=20Garc=C3=ADa?= Date: Mon, 2 Aug 2021 10:52:41 -0400 Subject: [PATCH] Fix null-custom report bug when no custom-report is passed to gp --- src/propeller/gp.cljc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/propeller/gp.cljc b/src/propeller/gp.cljc index e5dccf6..302d8db 100755 --- a/src/propeller/gp.cljc +++ b/src/propeller/gp.cljc @@ -31,7 +31,7 @@ (defn gp "Main GP loop." [{:keys [population-size max-generations error-function instructions - max-initial-plushy-size custom-report] + max-initial-plushy-size] :as argmap}] ;; (prn {:starting-args (update (update argmap :error-function str) :instructions str)}) @@ -49,8 +49,8 @@ (partial error-function argmap (:training-data argmap)) population)) best-individual (first evaluated-pop)] - (if (custom-report argmap) - ((custom-report argmap) evaluated-pop generation argmap) + (if (:custom-report argmap) + ((:custom-report argmap) evaluated-pop generation argmap) (report evaluated-pop generation argmap)) (cond ;; Success on training cases is verified on testing cases