diff --git a/src/transformers/commands/pt_to_tf.py b/src/transformers/commands/pt_to_tf.py index 0185679d48dddc..85382ac5a4f871 100644 --- a/src/transformers/commands/pt_to_tf.py +++ b/src/transformers/commands/pt_to_tf.py @@ -267,6 +267,13 @@ def _get_audio_input(): return pt_input, tf_input 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. if version.parse(huggingface_hub.__version__) < version.parse("0.9.0"): raise ImportError(