Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a0b9187f6 | ||
|
|
f108a5fc3b |
@@ -27,7 +27,8 @@ author = "huggingface"
|
|||||||
# The short X.Y version
|
# The short X.Y version
|
||||||
version = ""
|
version = ""
|
||||||
# The full version, including alpha/beta/rc tags
|
# The full version, including alpha/beta/rc tags
|
||||||
release = "4.10.2"
|
release = "4.10.3"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
setup.py
2
setup.py
@@ -342,7 +342,7 @@ install_requires = [
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="transformers",
|
name="transformers",
|
||||||
version="4.10.2", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
version="4.10.3", # expected format is one of x.y.z.dev0, or x.y.z.rc1 or x.y.z (no to dashes, yes to dots)
|
||||||
author="Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Sam Shleifer, Patrick von Platen, Sylvain Gugger, Suraj Patil, Stas Bekman, Google AI Language Team Authors, Open AI team Authors, Facebook AI Authors, Carnegie Mellon University Authors",
|
author="Thomas Wolf, Lysandre Debut, Victor Sanh, Julien Chaumond, Sam Shleifer, Patrick von Platen, Sylvain Gugger, Suraj Patil, Stas Bekman, Google AI Language Team Authors, Open AI team Authors, Facebook AI Authors, Carnegie Mellon University Authors",
|
||||||
author_email="thomas@huggingface.co",
|
author_email="thomas@huggingface.co",
|
||||||
description="State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch",
|
description="State-of-the-art Natural Language Processing for TensorFlow 2.0 and PyTorch",
|
||||||
|
|||||||
@@ -22,7 +22,7 @@
|
|||||||
# to defer the actual importing for when the objects are requested. This way `import transformers` provides the names
|
# to defer the actual importing for when the objects are requested. This way `import transformers` provides the names
|
||||||
# in the namespace without actually importing anything (and especially none of the backends).
|
# in the namespace without actually importing anything (and especially none of the backends).
|
||||||
|
|
||||||
__version__ = "4.10.2"
|
__version__ = "4.10.3"
|
||||||
|
|
||||||
# Work around to update TensorFlow's absl.logging threshold which alters the
|
# Work around to update TensorFlow's absl.logging threshold which alters the
|
||||||
# default Python logging output behavior when present.
|
# default Python logging output behavior when present.
|
||||||
|
|||||||
@@ -772,6 +772,8 @@ class TrainingArguments:
|
|||||||
del self_as_dict["per_gpu_train_batch_size"]
|
del self_as_dict["per_gpu_train_batch_size"]
|
||||||
del self_as_dict["per_gpu_eval_batch_size"]
|
del self_as_dict["per_gpu_eval_batch_size"]
|
||||||
|
|
||||||
|
self_as_dict = {k: f"<{k.upper()}>" if k.endswith("_token") else v for k, v in self_as_dict.items()}
|
||||||
|
|
||||||
attrs_as_str = [f"{k}={v},\n" for k, v in sorted(self_as_dict.items())]
|
attrs_as_str = [f"{k}={v},\n" for k, v in sorted(self_as_dict.items())]
|
||||||
return f"{self.__class__.__name__}(\n{''.join(attrs_as_str)})"
|
return f"{self.__class__.__name__}(\n{''.join(attrs_as_str)})"
|
||||||
|
|
||||||
@@ -1081,7 +1083,8 @@ class TrainingArguments:
|
|||||||
|
|
||||||
def to_dict(self):
|
def to_dict(self):
|
||||||
"""
|
"""
|
||||||
Serializes this instance while replace `Enum` by their values (for JSON serialization support).
|
Serializes this instance while replace `Enum` by their values (for JSON serialization support). It obfuscates
|
||||||
|
the token values by removing their value.
|
||||||
"""
|
"""
|
||||||
d = asdict(self)
|
d = asdict(self)
|
||||||
for k, v in d.items():
|
for k, v in d.items():
|
||||||
@@ -1089,6 +1092,8 @@ class TrainingArguments:
|
|||||||
d[k] = v.value
|
d[k] = v.value
|
||||||
if isinstance(v, list) and len(v) > 0 and isinstance(v[0], Enum):
|
if isinstance(v, list) and len(v) > 0 and isinstance(v[0], Enum):
|
||||||
d[k] = [x.value for x in v]
|
d[k] = [x.value for x in v]
|
||||||
|
if k.endswith("_token"):
|
||||||
|
d[k] = f"<{k.upper()}>"
|
||||||
return d
|
return d
|
||||||
|
|
||||||
def to_json_string(self):
|
def to_json_string(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user