diff keras_train_and_eval.py @ 10:a9e0b963b7bb draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 208a8d348e7c7a182cfbe1b6f17868146428a7e2"
author bgruening
date Tue, 13 Apr 2021 22:04:06 +0000
parents ead7adad8d0e
children caf7d2b71a48
line wrap: on
line diff
--- a/keras_train_and_eval.py	Tue Apr 13 18:45:35 2021 +0000
+++ b/keras_train_and_eval.py	Tue Apr 13 22:04:06 2021 +0000
@@ -1,32 +1,32 @@
 import argparse
-import joblib
 import json
-import numpy as np
 import os
-import pandas as pd
 import pickle
 import warnings
 from itertools import chain
-from scipy.io import mmread
-from sklearn.pipeline import Pipeline
-from sklearn.metrics.scorer import _check_multimetric_scoring
-from sklearn.model_selection._validation import _score
-from sklearn.model_selection import _search, _validation
-from sklearn.utils import indexable, safe_indexing
 
+import joblib
+import numpy as np
+import pandas as pd
 from galaxy_ml.externals.selene_sdk.utils import compute_score
-from galaxy_ml.model_validations import train_test_split
 from galaxy_ml.keras_galaxy_models import _predict_generator
+from galaxy_ml.model_validations import train_test_split
 from galaxy_ml.utils import (
-    SafeEval,
+    clean_params,
+    get_main_estimator,
+    get_module,
     get_scoring,
     load_model,
     read_columns,
+    SafeEval,
     try_get_attr,
-    get_module,
-    clean_params,
-    get_main_estimator,
 )
+from scipy.io import mmread
+from sklearn.metrics.scorer import _check_multimetric_scoring
+from sklearn.model_selection import _search, _validation
+from sklearn.model_selection._validation import _score
+from sklearn.pipeline import Pipeline
+from sklearn.utils import indexable, safe_indexing
 
 
 _fit_and_score = try_get_attr("galaxy_ml.model_validations", "_fit_and_score")
@@ -104,7 +104,7 @@
         rval = train_test_split(*new_arrays, **kwargs)
 
     for pos in nones:
-        rval[pos * 2 : 2] = [None, None]
+        rval[pos * 2: 2] = [None, None]
 
     return rval