Skip to content

Re-encoding live synthesized callables can save another function #793

Description

@datvo06

Follow-up to BasisResearch/RoboTL#576.

When we keep several synthesized loss factories alive and checkpoint them through Encodable, an earlier factory can be saved as a different function. I reproduced this on master with Python 3.14: the live functions return the right values, but some return another function's values after serialization and replay. This breaks evaluation caching and resume.

The synthesized filenames use Python object IDs, which can be recycled after decoding. A later decode can then overwrite the earlier function's cached source. One solution could be giving each synthesized source a unique filename, as we already do for REPL snippets.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions