Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[cherry-pick] suppress pydantic warning in legacy quantization modifier (#2340) #2341

Merged
merged 1 commit into from
Jun 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/sparseml/modifiers/quantization_legacy/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@

from typing import Any, Dict, List, Optional

from pydantic import ConfigDict

from sparseml.core import Event, Modifier


Expand Down Expand Up @@ -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:
Expand Down
Loading