tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

Text transformer tutorial doesn't work with the latest transformer version

Open shamanez opened this issue 1 year ago • 1 comments

🐛 Bug

This text transformer tutorial fails with the transformers==4.31.0 version

and works fine with transformers==4.27.0 and bellow

To Reproduce

Run the notebook

Error: " File "/opt/conda/envs/cb-ml/lib/python3.10/site-packages/torch/autograd/init.py", line 200, in backward Variable._execution_engine.run_backward( # Calls into the C++ engine to run the backward pass RuntimeError: element 0 of tensors does not require grad and does not have a grad_fn Epoch 0: 0%| | 0/32 [00:01<?, ?it/s] "

shamanez avatar Jul 26 '23 00:07 shamanez

Any thoughts on what could be the root of this issue? So far you refer to Torch so not sure how this can be fixed in lightning...

Borda avatar Oct 12 '23 09:10 Borda

the latest build is with transformers==4.43.1 so I believe this was resolved :flamingo: https://github.com/Lightning-AI/tutorials/blob/publication/.notebooks/lightning_examples/text-transformers.yaml

Borda avatar Jul 24 '24 21:07 Borda