From 0f96284da57ebddeccc5690131c3b97b51e30e51 Mon Sep 17 00:00:00 2001 From: Benjamin Fineran Date: Wed, 19 Jun 2024 16:04:53 -0400 Subject: [PATCH] suppress pydantic warning in legacy quantization modifier (#2340) (#2341) --- src/sparseml/modifiers/quantization_legacy/base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/sparseml/modifiers/quantization_legacy/base.py b/src/sparseml/modifiers/quantization_legacy/base.py index 9b9f1569f09..27856774c00 100644 --- a/src/sparseml/modifiers/quantization_legacy/base.py +++ b/src/sparseml/modifiers/quantization_legacy/base.py @@ -14,6 +14,8 @@ from typing import Any, Dict, List, Optional +from pydantic import ConfigDict + from sparseml.core import Event, Modifier @@ -81,6 +83,8 @@ class LegacyQuantizationModifier(Modifier): post_oneshot_calibration: Optional[bool] = False strict: bool = True + model_config = ConfigDict(protected_namespaces=()) + def __init__(self, **kwargs): super().__init__(**kwargs) if self.model_fuse_fn_kwargs is None: