diff run_jupyter_job.xml @ 0:f4619200cb0a draft

"planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/jupyter_job commit f945b1bff5008ba01da31c7de64e5326579394d6"
author bgruening
date Sat, 11 Dec 2021 17:56:38 +0000
parents
children c93b2676a27d
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/run_jupyter_job.xml	Sat Dec 11 17:56:38 2021 +0000
@@ -0,0 +1,86 @@
+<tool id="run_jupyter_job" name="Run long running jupyterlab script" hidden="true" version="0.0.1" profile="21.09">
+    <description>inside a Docker container</description>
+    <requirements>
+        <container type="docker">docker.io/anupkumar/docker-ml-jupyterlab:galaxy-integration-0.1</container>
+    </requirements>
+    <command detect_errors="aggressive"><![CDATA[
+	    python '${__tool_directory__}/main.py'
+	        --ml_paths '$ml_h5_dataset_paths'
+	    	--loaded_file '$select_file'
+            --working_dir `pwd`
+		    --output_array '$outfile_output_arrays'
+		    --output_zip '$outfile_output_zip'
+		    --ml_h5_files '$ml_h5_datasets'
+]]>
+    </command>
+    <inputs>
+	<param name="ml_h5_dataset_paths" type="text" label="Data paths" optional="true" />
+	<param name="select_file" type="data" label="Load file" format="txt" />
+	<param name="ml_h5_datasets" type="data" label="Input h5 dataset" format="h5" multiple="true" optional="true" />
+    </inputs>
+    <outputs>
+        <data format="h5" name="outfile_output_arrays" label="Saved arrays"></data>
+        <data format="zip" name="outfile_output_zip" label="Zipped files"></data>
+        <collection name="onnx_models" type="list" label="Trained models">
+	        <discover_datasets format="onnx" pattern="__name__" visible="false" directory="model_outputs" />
+        </collection>
+    </outputs>
+    <tests>
+        <test expect_num_outputs="3">
+            <param name="select_file" value="tf-script.py" />
+            <output name="outfile_output_zip" file="zipped_file_tf.zip" ftype="zip" compare="sim_size" delta="50" />
+            <output name="outfile_output_arrays">
+                <assert_contents>
+                    <has_h5_keys keys="loss_history,mnist_images,mnist_labels,tot_loss"/>
+                </assert_contents>
+            </output>
+        </test>
+        <test expect_num_outputs="3">
+            <param name="select_file" value="scikit-script.py" />
+            <output name="outfile_output_zip" file="zipped_file_sk.zip" ftype="zip" compare="sim_size" delta="5" />
+            <output name="outfile_output_arrays">
+                <assert_contents>
+                    <has_h5_keys keys="X,X_test,X_train,loss,y,y_test,y_train" />
+                </assert_contents>
+            </output>
+        </test>
+        <test>
+            <param name="select_file" value="tf-script.py" />
+            <output_collection name="onnx_models" type="list">
+                <element name="onnx_model_mnist_model.onnx" file="onnx_model_mnist_model.onnx" ftype="onnx" compare="sim_size" delta="100" />
+            </output_collection>
+        </test>
+        <test>
+            <param name="select_file" value="scikit-script.py" />
+            <output_collection name="onnx_models" type="list">
+                <element name="onnx_model_clr.onnx" file="onnx_model_clr.onnx" ftype="onnx" compare="sim_size" delta="50" />
+            </output_collection>
+        </test>
+    </tests>
+    <help>
+        <![CDATA[
+**What it does**
+
+**Description**
+
+Runs a long running job on Galaxy's cluster.
+
+-----
+
+**Output file**
+
+Returns a model.
+
+        ]]>
+    </help>
+    <citations>
+        <citation type="bibtex">
+            @ARTICLE{anuprulez_galaxytools,
+                Author = {Anup Kumar and Björn Grüning},
+                keywords = {Galaxy tool},
+                title = {{Tool for long running jobs}},
+                url = {}
+            }
+        </citation>
+    </citations>
+</tool>