SBU-BMI / wsinfer

🔥 🚀 Blazingly fast pipeline for patch-based classification in whole slide images
https://wsinfer.readthedocs.io
Apache License 2.0
56 stars 10 forks source link

[BUG] saving JSON with weights file of type pathlib.Path raises error #125

Closed kaczmarj closed 1 year ago

kaczmarj commented 1 year ago

The run_metadata*.json file is saved in a corrupted state if one of the values is not json serializable. the type pathlib.Path is one such type that leads to errors...

kaczmarj commented 1 year ago

change near this line:

https://github.com/SBU-BMI/wsinfer/blob/45dfeeaef1853612dcebecd4d362e1c9cdb55e41/wsinfer/cli/infer.py#L151

perhaps add a test too...

else:
    weights_files = str(weights_file)