From f150c42a08c32c091252884ec0f45f1ba07fda10 Mon Sep 17 00:00:00 2001 From: The gemma Authors Date: Tue, 26 May 2026 12:41:10 -0700 Subject: [PATCH] Flip default freeze to False in konfig.resolve and remove ImmutableDict. PiperOrigin-RevId: 921623842 --- gemma/gm/evals/_sample.py | 5 ----- gemma/gm/text/_tokenizer.py | 5 +---- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/gemma/gm/evals/_sample.py b/gemma/gm/evals/_sample.py index 13959c75..8a91fb80 100644 --- a/gemma/gm/evals/_sample.py +++ b/gemma/gm/evals/_sample.py @@ -28,7 +28,6 @@ import jax from kauldron import kd from kauldron.utils import config_util -from kauldron.utils import immutabledict from kauldron.utils import utils @@ -78,10 +77,6 @@ class SamplerEvaluator(kd.evals.EvaluatorBase): default_factory=dict ) - def __post_init__(self): - super().__post_init__() - immutabledict.freeze_dict_attrs(self, ['losses', 'metrics', 'summaries']) - def evaluate(self, state: kd.train.TrainState, step: int) -> Any: """Run this evaluator then write and optionally return the results.""" self._assert_root_cfg_resolved() diff --git a/gemma/gm/text/_tokenizer.py b/gemma/gm/text/_tokenizer.py index bf351456..a524b4c0 100644 --- a/gemma/gm/text/_tokenizer.py +++ b/gemma/gm/text/_tokenizer.py @@ -30,9 +30,9 @@ from gemma.gm.utils import _file_cache import jax import jax.numpy as jnp -from kauldron.utils import immutabledict import numpy as np + from sentencepiece import sentencepiece_model_pb2 import sentencepiece as spm @@ -196,9 +196,6 @@ class Tokenizer: FORMAT: ClassVar[dialog.Format] = dialog.Format.GEMMA3 FORMAT_TO_CONVERT: ClassVar[dialog.Format | None] = None - def __post_init__(self): - immutabledict.freeze_dict_attrs(self, ['custom_tokens']) - @classmethod def from_version(cls, version: int | str) -> Tokenizer: """Create a tokenizer from a version."""