diff json_train.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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/json_train.py	Thu Dec 19 12:51:21 2024 +0000
@@ -0,0 +1,14 @@
+import json
+from sys import stdin
+
+d = json.load(stdin)
+
+d["py/object"] = "dfpl.options.Options"
+d["outputDir"] = "./model/"
+d["ecModelDir"] = "./autoencoder/"
+
+# <select> tags provide string values -> parse to boolean
+d["trainAC"] = bool(d["trainAC"] == "true")
+d["compressFeatures"] = bool(d["compressFeatures"] == "true")
+
+print(json.dumps(d))