google-deepmind / google-deepmind/gemma

main branch incompatible with published PyPI versions of kauldron and dialog

Open
#559 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
Python
Stars
5.7k
Forks
1k
Avg merge
10h 33m
Merged PRs (30d)
2

Description

The current main branch references APIs from kauldron and dialog that don't exist in
their latest published PyPI versions (kauldron==1.3.0, dialog==1.0.0). This makes it
impossible to run gemma from source after a fresh install.

Steps to reproduce

git clone https://github.com/google-deepmind/gemma.git
cd gemma
uv sync # or: pip install -e .
python -c "import gemma.gm as gm; gm.nn.Gemma3_4B()"

Errors

1. kauldron — InitTransform not found

Introduced in commit bd0dabf ("Rename AbstractPartialLoader to InitTransform").

File "gemma/gm/ckpts/_checkpoint.py", line 49, in
class LoadCheckpoint(kd.ckpts.InitTransform):
AttributeError: module 'kauldron.checkpoints' has no attribute 'InitTransform'

kauldron==1.3.0 exposes AbstractPartialLoader but not InitTransform.

Affected files:
- gemma/gm/ckpts/_checkpoint.py
- gemma/gm/ckpts/_lora.py
- gemma/gm/ckpts/_policy.py

2. dialog — Format not found

Introduced in commit 1ded5e5 ("Supports tool and dialog in ChatSampler").

File "gemma/gm/text/_tokenizer.py", line 166, in Tokenizer
FORMAT: ClassVar[dialog.Format] = dialog.Format.GEMMA3
AttributeError: module 'dialog' has no attribute 'Format'

dialog==1.0.0 does not have a Format class anywhere in the package.

Affected files:
- gemma/gm/text/_tokenizer.py
- gemma/gm/text/_sampler.py

Environment

- Python 3.13.2
- kauldron 1.3.0 (latest on PyPI)
- dialog 1.0.0 (latest on PyPI)
- macOS / Darwin

Possible fix

Add git source overrides in pyproject.toml so that uv sync / pip install pulls the
compatible versions:

[tool.uv.sources]
kauldron = { git = "https://github.com/google-research/kauldron.git" }
dialog = { git = "https://github.com/google-deepmind/dialog.git" }

Or publish updated versions of kauldron and dialog to PyPI that include InitTransform
and Format.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.