Skip to content

Commit 2e1fa34

Browse files
committed
Properly dump json files in to the dmcas_fitstat.json, dmcas_roc.json, dmcas_lift.json files in calculate_model_statistics, instead of just in the dict return. #167
1 parent b39c5a5 commit 2e1fa34

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sasctl/pzmm/write_json_files.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -880,9 +880,9 @@ def calculate_model_statistics(
880880
json_dict[2]["data"][j].update(lift_dict[j])
881881

882882
if json_path:
883-
for name in [FITSTAT, ROC, LIFT]:
883+
for i, name in enumerate([FITSTAT, ROC, LIFT]):
884884
with open(Path(json_path) / name, "w") as json_file:
885-
json_file.write(json.dumps(json_dict, indent=4, cls=NpEncoder))
885+
json_file.write(json.dumps(json_dict[i], indent=4, cls=NpEncoder))
886886
if cls.notebook_output:
887887
print(
888888
f"{name} was successfully written and saved to "

0 commit comments

Comments
 (0)