Unverified Commit 9ef38840 authored by Matt's avatar Matt Committed by GitHub
Browse files

Deprecate TF weight conversion since we have full Safetensors support now (#30786)

parent d8f8a9cd
...@@ -267,6 +267,13 @@ class PTtoTFCommand(BaseTransformersCLICommand): ...@@ -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(
......
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