mirror of
https://github.com/huggingface/transformers.git
synced 2025-08-02 03:01:07 +06:00
Deprecate TF weight conversion since we have full Safetensors support now (#30786)
This commit is contained in:
parent
d8f8a9cd61
commit
9ef3884046
@ -267,6 +267,13 @@ class PTtoTFCommand(BaseTransformersCLICommand):
|
|||||||
return pt_input, tf_input
|
return pt_input, tf_input
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
|
self._logger.warning(
|
||||||
|
"\n\nConverting PyTorch weights to TensorFlow is deprecated and will be removed in v4.43. "
|
||||||
|
"Instead, we recommend that you convert PyTorch weights to Safetensors, an improved "
|
||||||
|
"format that can be loaded by any framework, including TensorFlow. For more information, "
|
||||||
|
"please see the Safetensors conversion guide: "
|
||||||
|
"https://huggingface.co/docs/safetensors/en/convert-weights\n\n"
|
||||||
|
)
|
||||||
# hub version 0.9.0 introduced the possibility of programmatically opening PRs with normal write tokens.
|
# hub version 0.9.0 introduced the possibility of programmatically opening PRs with normal write tokens.
|
||||||
if version.parse(huggingface_hub.__version__) < version.parse("0.9.0"):
|
if version.parse(huggingface_hub.__version__) < version.parse("0.9.0"):
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
|
Loading…
Reference in New Issue
Block a user