From 7124912d8b1f54ea6303a6ba672842944157e56d Mon Sep 17 00:00:00 2001 From: Thorben Date: Thu, 20 Feb 2025 13:22:23 +0100 Subject: [PATCH 1/3] param test --- example/predictgnn.json | 1 + 1 file changed, 1 insertion(+) diff --git a/example/predictgnn.json b/example/predictgnn.json index e087f8a..c087d7a 100644 --- a/example/predictgnn.json +++ b/example/predictgnn.json @@ -1,4 +1,5 @@ { + "no_cache_mol": true, "py/object": "dfpl.options.GnnOptions", "test_path": "tests/data/smiles.csv", "preds_path": "preds_dmpnn/DMPNN_preds.csv", From ba9e7147b4e3402dc5d0203465d822fb67c941e3 Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Thu, 20 Feb 2025 17:31:48 +0100 Subject: [PATCH 2/3] fix boolean and list inputs --- dfpl/utils.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dfpl/utils.py b/dfpl/utils.py index 0e4c809..be917e3 100644 --- a/dfpl/utils.py +++ b/dfpl/utils.py @@ -95,9 +95,11 @@ def createArgsFromJson(jsonFile: str): value = cli_value # Override JSON value with command-line value # Append the argument and its value to the list - if key == "extra_metrics" and isinstance(value, list): + if isinstance(value, list): arguments.append(cli_arg_key) arguments.extend(value) + elif isinstance(value, bool) and value: + arguments.append(cli_arg_key) else: arguments.extend([cli_arg_key, str(value)]) From d760155fdbceaa8b0de6767fc924c9093a62b6de Mon Sep 17 00:00:00 2001 From: Matthias Bernt Date: Fri, 28 Feb 2025 09:44:01 +0100 Subject: [PATCH 3/3] fix for false as well --- dfpl/utils.py | 6 +++--- example/predictgnn.json | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/dfpl/utils.py b/dfpl/utils.py index be917e3..02ea155 100644 --- a/dfpl/utils.py +++ b/dfpl/utils.py @@ -98,11 +98,11 @@ def createArgsFromJson(jsonFile: str): if isinstance(value, list): arguments.append(cli_arg_key) arguments.extend(value) - elif isinstance(value, bool) and value: - arguments.append(cli_arg_key) + elif isinstance(value, bool): + if value: + arguments.append(cli_arg_key) else: arguments.extend([cli_arg_key, str(value)]) - return arguments diff --git a/example/predictgnn.json b/example/predictgnn.json index c087d7a..1b059bc 100644 --- a/example/predictgnn.json +++ b/example/predictgnn.json @@ -1,5 +1,7 @@ { + "no_cache_mol": true, + "empty_cache": false, "py/object": "dfpl.options.GnnOptions", "test_path": "tests/data/smiles.csv", "preds_path": "preds_dmpnn/DMPNN_preds.csv",