AttributeError: 'str' object has no attribute 'to'
MEMBER
I think you are reporting an issue with the `transformers` library. Note this is the repository of the `datasets` library. I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues

EDIT: I have not the rights to transfer the issue
~~I am transferring your issue to their repository.~~
2024-01-08T09:59:04Z
https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586
https://api.github.com/repos/huggingface/datasets/issues/6567
IC_kwDODunzps5wGQfK
https://api.github.com/repos/huggingface/datasets/issues/comments/1880688586/reactions
2024-01-08T10:02:59Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1880688586
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
NONE
Thanks, I hope someone from transformers library addresses this issue.

On Mon, Jan 8, 2024 at 15:29 Albert Villanova del Moral <
***@***.***> wrote:

> I think you are reporting an issue with the transformers library. Note
> this is the repository of the datasets library. I am transferring your
> issue to their repository.
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/huggingface/datasets/issues/6567#issuecomment-1880688586>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AE4LJNOYMD6WJMXFKPMH6DLYNO7PJAVCNFSM6AAAAABBQ63HWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQOBQGY4DQNJYGY>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

2024-01-08T10:30:07Z
https://github.com/huggingface/datasets/issues/6567#issuecomment-1880738873
https://api.github.com/repos/huggingface/datasets/issues/6567
IC_kwDODunzps5wGcw5
https://api.github.com/repos/huggingface/datasets/issues/comments/1880738873/reactions
2024-01-08T10:30:07Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1880738873
https://avatars.githubusercontent.com/u/20493493?v=4
https://api.github.com/users/andysingal/events{/privacy}
https://api.github.com/users/andysingal/followers
https://api.github.com/users/andysingal/following{/other_user}
https://api.github.com/users/andysingal/gists{/gist_id}
https://github.com/andysingal
andysingal
MDQ6VXNlcjIwNDkzNDkz
https://api.github.com/users/andysingal/orgs
https://api.github.com/users/andysingal/received_events
https://api.github.com/users/andysingal/repos
https://api.github.com/users/andysingal/starred{/owner}{/repo}
https://api.github.com/users/andysingal/subscriptions
User
https://api.github.com/users/andysingal
public
MEMBER
@andysingal, I recommend that you open an issue in their repository: https://github.com/huggingface/transformers/issues
I don't have the rights to transfer this issue to their repo.
2024-01-08T11:56:18Z
https://github.com/huggingface/datasets/issues/6567#issuecomment-1880861379
https://api.github.com/repos/huggingface/datasets/issues/6567
IC_kwDODunzps5wG6rD
https://api.github.com/repos/huggingface/datasets/issues/comments/1880861379/reactions
2024-01-08T11:56:18Z
https://api.github.com/repos/huggingface/datasets/issues/comments/1880861379
https://avatars.githubusercontent.com/u/8515462?v=4
https://api.github.com/users/albertvillanova/events{/privacy}
https://api.github.com/users/albertvillanova/followers
https://api.github.com/users/albertvillanova/following{/other_user}
https://api.github.com/users/albertvillanova/gists{/gist_id}
https://github.com/albertvillanova
albertvillanova
MDQ6VXNlcjg1MTU0NjI=
https://api.github.com/users/albertvillanova/orgs
https://api.github.com/users/albertvillanova/received_events
https://api.github.com/users/albertvillanova/repos
https://api.github.com/users/albertvillanova/starred{/owner}{/repo}
https://api.github.com/users/albertvillanova/subscriptions
User
https://api.github.com/users/albertvillanova
public
### Describe the bug

```
--------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
[<ipython-input-6-80c6086794e8>](https://localhost:8080/#) in <cell line: 10>()
      8 		  report_to="wandb")
      9 
---> 10 trainer = Trainer(
     11     model=model,
     12     args=training_args,

1 frames
[/usr/local/lib/python3.10/dist-packages/transformers/trainer.py](https://localhost:8080/#) in _move_model_to_device(self, model, device)
    688 
    689     def _move_model_to_device(self, model, device):
--> 690         model = model.to(device)
    691         # Moving a model to an XLA device disconnects the tied weights, so we have to retie them.
    692         if self.args.parallel_mode == ParallelMode.TPU and hasattr(model, "tie_weights"):

AttributeError: 'str' object has no attribute 'to'
```

### Steps to reproduce the bug

here is the notebook:
```
https://colab.research.google.com/drive/10JDBNsLlYrQdnI2FWfDK3F5M8wvVUDXG?usp=sharing

```


### Expected behavior

run the Training 

### Environment info

Colab Notebook , T4 