Skip to content

When saving objects the size generated by the Python API is incorrect #827

Open
@alahiff

Description

@alahiff

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions