Skip to content

Commit 09d9d5a

Browse files
committed
exclude hf token from serialization
1 parent 1b6c101 commit 09d9d5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/distilabel/utils/serialization.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ def _model_dump(self, obj: Any, **kwargs: Any) -> Dict[str, Any]:
194194
"""
195195
# Any parameter named api_key will be excluded from the dump (those are supposed to be SecretStr anyway,
196196
# and will remove them afterwards)
197-
dump = obj.model_dump(exclude="api_key", **kwargs)
197+
dump = obj.model_dump(exclude=("api_key", "token"), **kwargs)
198198

199199
# Check if any attribute in value within the `dump` is an `EnumType`,
200200
# as it needs a specific serialization.

0 commit comments

Comments
 (0)