Mercurial > repos > bgruening > sklearn_train_test_eval
diff keras_deep_learning.py @ 5:2b8406e74f9e draft
"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 5b2ac730ec6d3b762faa9034eddd19ad1b347476"
author | bgruening |
---|---|
date | Mon, 16 Dec 2019 05:14:47 -0500 |
parents | cc49634df38f |
children | ead7adad8d0e |
line wrap: on
line diff
--- a/keras_deep_learning.py Thu Nov 07 05:22:04 2019 -0500 +++ b/keras_deep_learning.py Mon Dec 16 05:14:47 2019 -0500 @@ -73,7 +73,7 @@ } """ constraint_type = config['constraint_type'] - if constraint_type == 'None': + if constraint_type in ('None', ''): return None klass = getattr(keras.constraints, constraint_type) @@ -92,7 +92,7 @@ """Access to handle all kinds of parameters """ for key, value in six.iteritems(params): - if value == 'None': + if value in ('None', ''): params[key] = None continue @@ -205,6 +205,9 @@ config : dictionary, galaxy tool parameters loaded by JSON """ generator_type = config.pop('generator_type') + if generator_type == 'none': + return None + klass = try_get_attr('galaxy_ml.preprocessors', generator_type) if generator_type == 'GenomicIntervalBatchGenerator': @@ -240,7 +243,7 @@ json_string = model.to_json() with open(outfile, 'w') as f: - f.write(json_string) + json.dump(json.loads(json_string), f, indent=2) def build_keras_model(inputs, outfile, model_json, infile_weights=None,