Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rank2]: AttributeError: 'Collator' object has no attribute 'tokenizer' #25

Open
lis-kp opened this issue Feb 17, 2025 · 0 comments
Open

Comments

@lis-kp
Copy link

lis-kp commented Feb 17, 2025

hi, nice project, thanks for sharing it!
i have been trying to run the classifier fine-tuning code, but i keep getting this error:

....
[rank2]: Original Traceback (most recent call last):
[rank2]: File "/home/liskanashiro/miniforge3/lib/python3.12/site-packages/torch/utils/data/_utils/worker.py", line 349, in _worker_loop
[rank2]: data = fetcher.fetch(index) # type: ignore[possibly-undefined]
[rank2]: ^^^^^^^^^^^^^^^^^^^^
[rank2]: File "/home/liskanashiro/miniforge3/lib/python3.12/site-packages/torch/utils/data/_utils/fetch.py", line 55, in fetch
[rank2]: return self.collate_fn(data)
[rank2]: ^^^^^^^^^^^^^^^^^^^^^
[rank2]: File "/home/liskanashiro/llava_factory/Mantis/mantis/train/data.py", line 1531, in call
[rank2]: batch_encoding = self._right_pad_inputs_with_attention_mask(model_inputs=batch)
[rank2]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[rank2]: File "/home/liskanashiro/llava_factory/Mantis/mantis/train/data.py", line 1399, in _right_pad_inputs_with_attention_mask
[rank2]: pad_token_id = self.tokenizer.pad_token_id
[rank2]: ^^^^^^^^^^^^^^
[rank2]: AttributeError: 'Collator' object has no attribute 'tokenizer'
...

has anyone else encounter the same? thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant