comparison json_predict.py @ 0:e0bb949eac45 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:21 +0000
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:e0bb949eac45
1 import json
2 from sys import stdin
3
4 d = json.load(stdin)
5
6 # The directory where the full model of the fnn is loaded from.
7 d["fnnModelDir"] = "" # 'dfpl predict' looks for "model_weights.h5" in this directory
8 del d["fnn_weights"]
9
10 d["compressFeatures"] = bool(d["compressFeatures"] == "true")
11
12 # The encoder file where it is loaded from, to compress the fingerprints.
13 d["ecModelDir"] = ""
14 d["ecWeightsFile"] = "encoder_weights.h5"
15
16 # Output csv file name which will contain one prediction per input line.
17 # Default: prefix of input file name.
18 d["outputFile"] = "predictions.csv"
19
20 d["py/object"] = "dfpl.options.Options"
21
22 print(json.dumps(d))