"tests/vscode:/vscode.git/clone" did not exist on "4c9e0f029e55d9f22d1c119d4be018a3e552b0a0"
Unverified Commit 491a33d1 authored by Matthew McDermott's avatar Matthew McDermott Committed by GitHub
Browse files

Adds type checking to PreTrainedConfig. (#20926)

parent 8637316e
......@@ -732,7 +732,7 @@ class PretrainedConfig(PushToHubMixin):
return json.loads(text)
def __eq__(self, other):
return self.__dict__ == other.__dict__
return isinstance(other, PretrainedConfig) and (self.__dict__ == other.__dict__)
def __repr__(self):
return f"{self.__class__.__name__} {self.to_json_string()}"
......
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