System Info
transformers:4.53.0
torch:2.5.1+cpu
Who can help?
@FightingZhen
Information
Tasks
Reproduction
i met an import error using Ascend
Here is the minimal reproducible code.
if is_torch_flex_attn_available(): from torch._dynamo._trace_wrapped_higher_order_op import TransformGetItemToIndex from torch.nn.attention.flex_attention import BlockMask, create_block_mask
Exception log
File "/home/tiger/new_verl/transformers/src/transformers/masking_utils.py", line 29, in <module> from torch._dynamo._trace_wrapped_higher_order_op import TransformGetItemToIndex ImportError: cannot import name 'TransformGetItemToIndex' from 'torch._dynamo._trace_wrapped_higher_order_op' (/home/tiger/.local/lib/python3.10/site-packages/torch/_dynamo/_trace_wrapped_higher_order_op.py)
Expected behavior
working