System Info
Python 3.14
PyTorch 2.9.1
OS: Any
Reproduction
See:
#1795 (comment)
huggingface/trl#4225 (comment)
Expected behavior
We would like to guard our usage of torch.compile so that users on platforms where it is not supported (e.g. Python 3.14 and torch < 2.10) do not have an issue when a custom op is imported.