cloudpipe / cloudpipe/cloudpickle
Random class_tracker_id for dynamic class
- Dominant language
- Python
- Stars
- 1.9k
- Forks
- 195
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 1
Description
cloudpickle generates random uuids to track dynamic classes, and those random uuids are added to outputs. For example, if there is a class serialized by value, the following lines are found with pickletools.dis
```
571: s SETITEM
572: \x8c SHORT_BINUNICODE 'fa5abda803d644e0bdcfdffec5c8f8d6'
606: \x94 MEMOIZE (as 56)
```
This string comes from `class_tracker_id` in cloudpickle and makes binary outputs different even though there is no code change.
Can random ids be replaced with deterministic ids, say a sequential number, for `class_tracker_id`?
This could be part of existing https://github.com/cloudpipe/cloudpickle/issues/453
Contributor guide
No contributing guide indexed for this repository
Research direction
Read issue 453 alongside the class_tracker_id generation path, then reproduce the example by serializing a dynamic class and inspecting the result with pickletools.dis. Compare repeated outputs and define whether deterministic IDs must remain stable across runs; done means equivalent serializations no longer contain random tracker IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100