view json_train.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 source

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))