diff keras_model_builder.xml @ 8:449a757be9c9 draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit e2a5eade6d0e5ddf3a47630381a0ad90d80e8a04"
author bgruening
date Tue, 13 Apr 2021 18:29:36 +0000
parents 818896cd2213
children 624e2afa1313
line wrap: on
line diff
--- a/keras_model_builder.xml	Thu Oct 01 21:04:39 2020 +0000
+++ b/keras_model_builder.xml	Tue Apr 13 18:29:36 2021 +0000
@@ -1,14 +1,13 @@
-<tool id="keras_model_builder" name="Create deep learning model" version="@KERAS_VERSION@">
+<tool id="keras_model_builder" name="Create deep learning model" version="@KERAS_VERSION@" profile="20.05">
     <description>with an optimizer, loss function and fit parameters</description>
     <macros>
         <import>main_macros.xml</import>
         <import>keras_macros.xml</import>
     </macros>
-    <expand macro="python_requirements"/>
-    <expand macro="macro_stdio"/>
+    <expand macro="python_requirements" />
+    <expand macro="macro_stdio" />
     <version_command>echo "@KERAS_VERSION@"</version_command>
-    <command>
-        <![CDATA[
+    <command><![CDATA[
         python '$__tool_directory__/keras_deep_learning.py'
                 --inputs '$inputs'
                 --tool_id 'keras_model_builder'
@@ -23,7 +22,7 @@
         ]]>
     </command>
     <configfiles>
-        <inputs name="inputs"/>
+        <inputs name="inputs" />
     </configfiles>
     <inputs>
         <conditional name="mode_selection">
@@ -32,24 +31,24 @@
                 <option value="prefitted">Load a pretrained model for prediction</option>
             </param>
             <when value="train_model">
-                <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)"/>
+                <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)" />
                 <param name="learning_type" type="select" label="Do classification or regression?">
                     <option value="KerasGClassifier">KerasGClassifier</option>
                     <option value="KerasGRegressor">KerasGRegressor</option>
                 </param>
-                <expand macro="keras_compile_params_section"/>
-                <expand macro="keras_fit_params_section"/>
-                <param name="random_seed" type="integer" value="" optional="true" label="Random Seed" help="Integer or blank for None. Warning: when random seed is set to an integer, training will be running in single thread mode, which may cause slowness."/>
-                <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Output parameters for searchCV?" help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool."/>
+                <expand macro="keras_compile_params_section" />
+                <expand macro="keras_fit_params_section" />
+                <param name="random_seed" type="integer" value="" optional="true" label="Random Seed" help="Integer or blank for None. Warning: when random seed is set to an integer, training will be running in single thread mode, which may cause slowness." />
+                <param name="get_params" type="boolean" truevalue="booltrue" falsevalue="boolfalse" checked="false" label="Output parameters for searchCV?" help="Optional. Tunable parameters could be obtained through `estimator_attributes` tool." />
             </when>
             <when value="prefitted">
-                <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)"/>
-                <param name="infile_weights" type="data" format="h5" label="Select the dataset containing keras layers weights"/>
+                <param name="infile_json" type="data" format="json" label="Select the dataset containing model configurations (JSON)" />
+                <param name="infile_weights" type="data" format="h5" label="Select the dataset containing keras layers weights" />
             </when>
         </conditional>
     </inputs>
     <outputs>
-        <data format="zip" name="outfile" label="Keras Model Builder    on ${on_string}"/>
+        <data format="zip" name="outfile" label="Keras Model Builder    on ${on_string}" />
         <data format="tabular" name="outfile_params" label="get_params for Keras Model Builder on ${on_string}">
             <filter>mode_selection['mode_type'] == 'train_model' and mode_selection['get_params']</filter>
         </data>
@@ -57,59 +56,59 @@
     <tests>
         <test>
             <conditional name="mode_selection">
-                <param name="infile_json" value="keras01.json" ftype="json"/>
-                <param name="learning_type" value="KerasGRegressor"/>
+                <param name="infile_json" value="keras01.json" ftype="json" />
+                <param name="learning_type" value="KerasGRegressor" />
                 <section name="fit_params">
-                    <param name="epochs" value="100"/>
+                    <param name="epochs" value="100" />
                 </section>
             </conditional>
-            <output name="outfile" file="keras_model01" compare="sim_size" delta="5"/>
+            <output name="outfile" file="keras_model01" compare="sim_size" delta="30" />
         </test>
         <test>
             <conditional name="mode_selection">
-                <param name="infile_json" value="keras02.json" ftype="json"/>
+                <param name="infile_json" value="keras02.json" ftype="json" />
                 <section name="compile_params">
                     <conditional name="optimizer_selection">
-                        <param name="optimizer_type" value="Adam"/>
+                        <param name="optimizer_type" value="Adam" />
                     </conditional>
                 </section>
                 <section name="fit_params">
-                    <param name="epochs" value="100"/>
+                    <param name="epochs" value="100" />
                 </section>
             </conditional>
-            <output name="outfile" file="keras_model02" compare="sim_size" delta="5"/>
+            <output name="outfile" file="keras_model02" compare="sim_size" delta="30" />
         </test>
         <test>
             <conditional name="mode_selection">
-                <param name="mode_type" value="prefitted"/>
-                <param name="infile_json" value="keras03.json" ftype="json"/>
-                <param name="infile_weights" value="keras_save_weights01.h5" ftype="h5"/>
+                <param name="mode_type" value="prefitted" />
+                <param name="infile_json" value="keras03.json" ftype="json" />
+                <param name="infile_weights" value="keras_save_weights01.h5" ftype="h5" />
             </conditional>
-            <output name="outfile" file="keras_prefitted01.zip" compare="sim_size" delta="5"/>
+            <output name="outfile" file="keras_prefitted01.zip" compare="sim_size" delta="30" />
         </test>
         <test>
             <conditional name="mode_selection">
-                <param name="infile_json" value="keras04.json" ftype="json"/>
-                <param name="learning_type" value="KerasGRegressor"/>
+                <param name="infile_json" value="keras04.json" ftype="json" />
+                <param name="learning_type" value="KerasGRegressor" />
                 <section name="compile_params">
                     <conditional name="optimizer_selection">
-                        <param name="optimizer_type" value="Adam"/>
+                        <param name="optimizer_type" value="Adam" />
                     </conditional>
-                    <param name="metrics" value="mse"/>
-                    <param name="loss" value="mean_squared_error"/>
+                    <param name="metrics" value="mse" />
+                    <param name="loss" value="mean_squared_error" />
                 </section>
                 <section name="fit_params">
-                    <param name="epochs" value="100"/>
+                    <param name="epochs" value="100" />
                 </section>
-                <param name="random_seed" value="42"/>
-                <param name="get_params" value="true"/>
+                <param name="random_seed" value="42" />
+                <param name="get_params" value="true" />
             </conditional>
-            <output name="outfile" file="keras_model04" compare="sim_size" delta="1"/>
-            <output name="outfile_params" file="keras_params04.tabular"/>
+            <output name="outfile" file="keras_model04" compare="sim_size" delta="30" />
+            <output name="outfile_params" file="keras_params04.tabular" />
         </test>
     </tests>
     <help>
-    <![CDATA[
+        <![CDATA[
 **Help**
 
 **What it does**
@@ -132,7 +131,7 @@
     ]]>
     </help>
     <citations>
-        <expand macro="keras_citation"/>
-        <expand macro="tensorflow_citation"/>
+        <expand macro="keras_citation" />
+        <expand macro="tensorflow_citation" />
     </citations>
 </tool>