some fixes
This commit is contained in:
@@ -43,7 +43,10 @@ class ConfigWriter:
|
||||
def write(self, config: RunConfigModel, output_path: Path) -> Path:
|
||||
"""Write run configuration JSON file."""
|
||||
output_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
output_path.write_text(json.dumps(config.to_dict(), indent=2), encoding="utf-8")
|
||||
# allow_nan=False: a stray NaN/Infinity must fail loudly here in Python
|
||||
# rather than serialize to a non-standard token that aborts every C++
|
||||
# consumer at startup with an opaque JSON parse error.
|
||||
output_path.write_text(json.dumps(config.to_dict(), indent=2, allow_nan=False), encoding="utf-8")
|
||||
return output_path
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user