Open
Description
Description of Bug
When using save_object()
the size reported by the Python API is different to the size actually stored in S3.
Steps To Reproduce
Example code:
from simvue import Run
if __name__ == "__main__":
with Run() as run:
run.init(folder='/tests')
data = {'hello': True}
run.save_object(data, 'input', name='test1', allow_pickle=True)
Expected behavior
The size generated by the Python API (and hence stored in the artifact record in Simvue) should be identical to the size of the object stored in S3.
Actual Behaviour
The size of objects always seems to be incorrect.
Screenshots
Example of difference from the API logs:
2025-07-01 11:19:03,578 INFO [simvue.routers.artifacts] Inconsistent artifact size, user=48, real=15
Setup
- OS: Ubuntu 22.04
- Python version: v3.10.12
- Simvue Python API version: 2.1.1
Additional context
Note that only saving objects is affected. Saving files is fine.
Eventually the Simvue server will stop accepting artifacts with incorrect sizes and give an error.