Skip to content

Commit

Permalink
Update hub_mixin.py (#909)
Browse files Browse the repository at this point in the history
Fix the error caused by pop operation on non-existing key in dict.
  • Loading branch information
ytzfhqs authored Aug 23, 2024
1 parent c68fc94 commit f40b6ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion segmentation_models_pytorch/base/hub_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ def save_pretrained(
finally:
# delete the additional attributes
self._del_attrs(["save_directory", "metrics", "dataset"])
self._hub_mixin_config.pop("_model_class")
self._hub_mixin_config.pop("_model_class", None)

return result

Expand Down

0 comments on commit f40b6ed

Please sign in to comment.