import dpsynth fails because mbi.Dataset is registered as a JAX dataclass twice
Maintainers usually reply within 2 days
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
Research direction
The issue is in dpsynth/checkpoint.py where mbi.Dataset is registered as a JAX dataclass a second time. Look at the mbi source to confirm its registration, then remove the duplicate registration in checkpoint.py. Test by importing dpsynth in a fresh environment to ensure no ValueError occurs. A regression test for the import should be added to prevent recurrence.
Written by the indexing model from the issue text.
Description
A fresh minimal installation from main succeeds, but importing DPSynth fails.
Environment:
- WSL2 Linux x86_64
- CPython 3.12.3
- pip 26.2.1
- dpsynth 0.4.0 (
ba212434752f67a128c962e3ca3e2be5b53d2253) - mbi 2.0.0 (
025b76f84f40256529732e98d93c1139fb2153d8) - jax/jaxlib 0.11.0
Installation:
pip install "dpsynth @ git+https://github.com/google/dpsynth.git"
installation completes successfully, but:
python -c "import dpsynth; print(dpsynth.__version__)"
fails with:
ValueError: Duplicate custom dataclass PyTreeDef type registration for
<class 'mbi.dataset.Dataset'>.
MBI already registers Dataset:
@jax.tree_util.register_dataclass
@dataclasses.dataclass(frozen=True, eq=False)
class Dataset:
DPSynth registers it again in dpsynth/checkpoint.py:
jax.tree_util.register_dataclass(
mbi.Dataset,
data_fields=["data", "weights"],
meta_fields=["domain"],
)
The DPSynth-side registration should likely be removed now that MBI owns the
registration. A clean-environment regression test for import dpsynth would
also prevent this from recurring.
- Dominant language
- Python
- Stars
- 32
- Forks
- 13
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 21
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/dpsynth
-
Clarify installation requirements in quickstart.ipynbPossibly taken @hanzalaareeb claimed this 7 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google/dpsynth#194 · 1 comment ·
Maintainers usually reply within 2 days
-
`IndependentConfig` synthesis raises "Cliques must be unique."May be free again A pull request for this issue was closed without being merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 2 days
-
Windows install of pylock.toml fails on the pipeline extra due to missing Windows wheel for python-dpPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 72/100
Maintainers usually reply within 2 days
-
Add an option to control the maximum marginal degree in AIM workload constructionPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 3/5 1-2 days Newbie friendliness 65/100
google/dpsynth#199 · 3 comments ·
Maintainers usually reply within 2 days
-
Lazy-load TensorFlow for TFRecord-specific pipeline pathsPossibly taken @hanzalaareeb claimed this 47 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
google/dpsynth#151 · 2 comments ·
Maintainers usually reply within 2 days
Similar issues
-
needs-human needs-triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
gke-labs/kube-agents#2400 · 1 comment ·
Maintainers usually reply within 1 day
-
Device Details tables: FS/SF columns contradict each other (nfet_01v8 Vt row, pfet_01v8 Idsat row)Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
google/skywater-pdk#450 ·
-
Drained trajectory arrays are overwritten when the sequence buffer is reusedPossibly taken @sylvesterkaczmarek claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
google-deepmind/bsuite#56 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
LearningCircuit/local-deep-research#7206 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
chingu-voyages/V62-tier3-team-33#285 ·
Maintainers usually reply within 1 day