view run_jupyter_job.xml @ 2:bf2963c9bcdc draft default tip

planemo upload for repository https://github.com/bgruening/galaxytools/tree/master/tools/jupyter_job commit c21261bb8373090c26cf5195134b30538b5bc714
author bgruening
date Fri, 20 Jan 2023 10:49:03 +0000
parents c93b2676a27d
children
line wrap: on
line source

<tool id="run_jupyter_job" name="Run long running jupyterlab script" hidden="true" version="0.0.1" profile="22.01">
    <description>inside a Docker container</description>
    <requirements>
        <container type="docker">docker.io/anupkumar/docker-ml-jupyterlab:galaxy-integration-0.2</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>