diff keras_model_builder.xml @ 14:624e2afa1313 draft

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/sklearn commit 9981e25b00de29ed881b2229a173a8c812ded9bb
author bgruening
date Wed, 09 Aug 2023 13:26:02 +0000
parents 449a757be9c9
children
line wrap: on
line diff
--- a/keras_model_builder.xml	Thu Aug 11 08:46:52 2022 +0000
+++ b/keras_model_builder.xml	Wed Aug 09 13:26:02 2023 +0000
@@ -1,4 +1,4 @@
-<tool id="keras_model_builder" name="Create deep learning model" version="@KERAS_VERSION@" profile="20.05">
+<tool id="keras_model_builder" name="Create deep learning model" version="@VERSION@" profile="@PROFILE@">
     <description>with an optimizer, loss function and fit parameters</description>
     <macros>
         <import>main_macros.xml</import>
@@ -6,19 +6,14 @@
     </macros>
     <expand macro="python_requirements" />
     <expand macro="macro_stdio" />
-    <version_command>echo "@KERAS_VERSION@"</version_command>
-    <command><![CDATA[
+    <version_command>echo "@VERSION@"</version_command>
+    <command>
+        <![CDATA[
         python '$__tool_directory__/keras_deep_learning.py'
                 --inputs '$inputs'
                 --tool_id 'keras_model_builder'
                 --outfile '$outfile'
                 --model_json '$mode_selection.infile_json'
-                #if $mode_selection.mode_type == 'prefitted'
-                --infile_weights '$mode_selection.infile_weights'
-                    #end if
-                #if $mode_selection.mode_type == 'train_model' and $mode_selection.get_params
-                --outfile_params '$outfile_params'
-                #end if
         ]]>
     </command>
     <configfiles>
@@ -28,7 +23,7 @@
         <conditional name="mode_selection">
             <param name="mode_type" type="select" label="Choose a building mode">
                 <option value="train_model" selected="true">Build a training model</option>
-                <option value="prefitted">Load a pretrained model for prediction</option>
+                <!--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)" />
@@ -37,21 +32,19 @@
                     <option value="KerasGRegressor">KerasGRegressor</option>
                 </param>
                 <expand macro="keras_compile_params_section" />
-                <expand macro="keras_fit_params_section" />
+                <expand macro="keras_fit_params_section">
+                    <param name="validation_split" type="float" value="0.1" optional="true" label="The proportion of training data to set aside as validation set." help="Will be ignored if `validation_data` is set explicitly, such as in `Deep learning training and evaluation` tool." />
+                </expand>
                 <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">
+            <!--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" />
-            </when>
+            </when>-->
         </conditional>
     </inputs>
     <outputs>
-        <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>
+        <data format="h5mlm" name="outfile" label="Keras Model Builder on ${on_string}" />
     </outputs>
     <tests>
         <test>
@@ -62,7 +55,7 @@
                     <param name="epochs" value="100" />
                 </section>
             </conditional>
-            <output name="outfile" file="keras_model01" compare="sim_size" delta="30" />
+            <output name="outfile" file="keras_model01" compare="sim_size" delta="20" />
         </test>
         <test>
             <conditional name="mode_selection">
@@ -76,16 +69,16 @@
                     <param name="epochs" value="100" />
                 </section>
             </conditional>
-            <output name="outfile" file="keras_model02" compare="sim_size" delta="30" />
+            <output name="outfile" file="keras_model02" compare="sim_size" delta="20" />
         </test>
-        <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" />
             </conditional>
-            <output name="outfile" file="keras_prefitted01.zip" compare="sim_size" delta="30" />
-        </test>
+            <output name="outfile" file="keras_prefitted01.zip" compare="sim_size" delta="5" />
+        </test>-->
         <test>
             <conditional name="mode_selection">
                 <param name="infile_json" value="keras04.json" ftype="json" />
@@ -101,14 +94,12 @@
                     <param name="epochs" value="100" />
                 </section>
                 <param name="random_seed" value="42" />
-                <param name="get_params" value="true" />
             </conditional>
-            <output name="outfile" file="keras_model04" compare="sim_size" delta="30" />
-            <output name="outfile_params" file="keras_params04.tabular" />
+            <output name="outfile" file="keras_model04" compare="sim_size" delta="20" />
         </test>
     </tests>
     <help>
-        <![CDATA[
+    <![CDATA[
 **Help**
 
 **What it does**