File "mydir/acodet/run.py", line 70, in main
run_training(**kwargs)
File "mydir/acodet/acodet/train.py", line 334, in run_training
save_model_results(checkpoint_dir, result)
File "mydir/acodet/acodet/funcs.py", line 446, in save_model_results
json.dump(result, f)
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/__init__.py", line 179, in dump
for chunk in iterable:
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/encoder.py", line 432, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/encoder.py", line 406, in _iterencode_dict
yield from chunks
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/encoder.py", line 326, in _iterencode_list
yield from chunks
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/encoder.py", line 439, in _iterencode
o = _default(o)
^^^^^^^^^^^
File "/homedir/.local/share/uv/python/cpython-3.11.14-linux-x86_64-gnu/lib/python3.11/json/encoder.py", line 180, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type ndarray is not JSON serializable
f08472f in acodet/funcs.py around L446 reverted fixes I made in an earlier commit, a436d05. I am now getting this error (and can fix it by reimplementing the
.item()calls).@vskode I assume you made the change because you were getting an error there? What was it?