Unverified Commit f11518a5 authored by YQ's avatar YQ Committed by GitHub
Browse files

add __repr__ to the BitsAndBytesConfig class (#25517)

add __repr__
parent 7a94ea4c
...@@ -272,6 +272,10 @@ class BitsAndBytesConfig(QuantizationConfigMixin): ...@@ -272,6 +272,10 @@ class BitsAndBytesConfig(QuantizationConfigMixin):
return output return output
def __repr__(self):
config_dict = self.to_dict()
return f"{self.__class__.__name__} {json.dumps(config_dict, indent=2, sort_keys=True)}\n"
def to_diff_dict(self) -> Dict[str, Any]: def to_diff_dict(self) -> Dict[str, Any]:
""" """
Removes all attributes from config which correspond to the default config attributes for better readability and Removes all attributes from config which correspond to the default config attributes for better readability and
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment