Mercurial > repos > goeckslab > ludwig_predict
comparison ludwig_predict.xml @ 0:0a7b83ddda17 draft default tip
planemo upload for repository https://github.com/goeckslab/Galaxy-Ludwig.git commit bdea9430787658783a51cc6c2ae951a01e455bb4
author | goeckslab |
---|---|
date | Tue, 07 Jan 2025 22:45:18 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:0a7b83ddda17 |
---|---|
1 <tool id="ludwig_predict" name="Ludwig Predict" version="@VERSION@" profile="@PROFILE@"> | |
2 <description>loads a pretrained model to do prediction</description> | |
3 <macros> | |
4 <import>ludwig_macros.xml</import> | |
5 </macros> | |
6 <expand macro="python_requirements_gpu" /> | |
7 <expand macro="macro_stdio" /> | |
8 <version_command>echo "@VERSION@"</version_command> | |
9 <command> | |
10 <![CDATA[ | |
11 #import re | |
12 mkdir -p outputs && | |
13 #if $dataset | |
14 #set $sanitized_dataset = re.sub('[^\w\-_\.]', '_', $dataset.element_identifier.strip()) | |
15 ln -sf '$dataset' "./${sanitized_dataset}"; | |
16 #end if | |
17 | |
18 #if $raw_data | |
19 unzip -o -q '$raw_data' -d ./; | |
20 #end if | |
21 | |
22 python '$__tool_directory__/ludwig_predict.py' | |
23 #if $model_path | |
24 --model_path '$model_path.extra_files_path' | |
25 #end if | |
26 #if $dataset | |
27 --dataset "./${sanitized_dataset}" | |
28 #end if | |
29 #if $disable_parallel_threads | |
30 --disable_parallel_threads | |
31 #end if | |
32 --output_directory "./outputs" | |
33 --data_format '$data_format' | |
34 --split '$split' | |
35 --backend local | |
36 --skip_save_unprocessed_output && | |
37 echo "Prediction is done!" | |
38 | |
39 ]]> | |
40 </command> | |
41 <configfiles> | |
42 <inputs name="inputs" /> | |
43 </configfiles> | |
44 <inputs> | |
45 <param name="model_path" type="data" format="ludwig_model" label="Load the pretrained model" /> | |
46 <param name="dataset" type="data" format="tabular,csv,h5,json,txt" label="Input dataset" /> | |
47 <param name="data_format" type="select" label="Data format"> | |
48 <option value="auto" selected="true">auto</option> | |
49 <option value="tsv">tsv</option> | |
50 <option value="csv">csv</option> | |
51 <option value="h5">h5</option> | |
52 <option value="json">json</option> | |
53 </param> | |
54 <param name="split" type="select" label="Select the split portion to test the model on"> | |
55 <option value="training">training</option> | |
56 <option value="validation">validation</option> | |
57 <option value="test">test</option> | |
58 <option value="full" selected="true">full</option> | |
59 </param> | |
60 <param name="batch_size" type="integer" value="128" optional="true" label="Batch size" min="1" max="4096" /> | |
61 <param name="disable_parallel_threads" type="boolean" checked="false" label="Whether to disable parallel threads for reproducibility?" /> | |
62 <param name="raw_data" type="data" format="zip" optional="true" label="Raw data" help="Optional. Needed for images."/> | |
63 </inputs> | |
64 <outputs> | |
65 <collection type="list" name="output_csv" label="${tool.name} CSV on ${on_string}" > | |
66 <discover_datasets pattern="(?P<designation>predictions_parquet\.csv)" format="csv" directory="outputs" /> | |
67 <discover_datasets pattern="(?P<designation>.+)\.json" format="json" directory="outputs" /> | |
68 </collection> | |
69 <!-- <data format="html" name="output_report" from_work_dir="outputs/smart_report.html" label="${tool.name} report on ${on_string}" /> --> | |
70 <!-- <data format="csv" name="output_top_k" label="${tool.name} top K predictions on ${on_string}" /> --> | |
71 </outputs> | |
72 <tests> | |
73 <test> | |
74 <param name="model_path" value="" ftype="ludwig_model"> | |
75 <composite_data value="temp_model01/model_hyperparameters.json" /> | |
76 <composite_data value="temp_model01/model_weights" /> | |
77 <composite_data value="temp_model01/training_set_metadata.json" /> | |
78 <composite_data value="temp_model01/training_progress.json" /> | |
79 </param> | |
80 <param name="dataset" value="temperature_la.csv" ftype="csv" /> | |
81 <param name="split" value="test" /> | |
82 <output_collection name="output_csv"> | |
83 <element name="predictions_parquet.csv"> | |
84 <assert_contents> | |
85 <has_n_columns n="1" /> | |
86 </assert_contents> | |
87 </element> | |
88 </output_collection> | |
89 </test> | |
90 </tests> | |
91 <help> | |
92 <![CDATA[ | |
93 **What it does** | |
94 This tool conducts `ludwig predict`. | |
95 | |
96 | |
97 **Input** | |
98 - a trained ludwig model. | |
99 - dataset to be evaluate. | |
100 | |
101 | |
102 **Output** | |
103 - report in html. | |
104 - a collection of prediction results. | |
105 | |
106 | |
107 | |
108 ]]> | |
109 </help> | |
110 <expand macro="macro_citations" /> | |
111 </tool> |