Mercurial > repos > ufz > dfpl_predict
diff json_predict.py @ 0:8956e949d466 draft default tip
planemo upload for repository https://github.com/Helmholtz-UFZ/galaxy-tools/tree/main/tools/dfpl commit 66c6acfeff5441c36fba97787ddc5ee3d6a4a6ec
author | ufz |
---|---|
date | Thu, 19 Dec 2024 12:51:08 +0000 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/json_predict.py Thu Dec 19 12:51:08 2024 +0000 @@ -0,0 +1,22 @@ +import json +from sys import stdin + +d = json.load(stdin) + +# The directory where the full model of the fnn is loaded from. +d["fnnModelDir"] = "" # 'dfpl predict' looks for "model_weights.h5" in this directory +del d["fnn_weights"] + +d["compressFeatures"] = bool(d["compressFeatures"] == "true") + +# The encoder file where it is loaded from, to compress the fingerprints. +d["ecModelDir"] = "" +d["ecWeightsFile"] = "encoder_weights.h5" + +# Output csv file name which will contain one prediction per input line. +# Default: prefix of input file name. +d["outputFile"] = "predictions.csv" + +d["py/object"] = "dfpl.options.Options" + +print(json.dumps(d))