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

Kbit_device_map import error. DPO #1319

Closed
sankydesai opened this issue Feb 6, 2024 · 5 comments
Closed

Kbit_device_map import error. DPO #1319

sankydesai opened this issue Feb 6, 2024 · 5 comments

Comments

@sankydesai
Copy link

from trl import get_kbit_device_map

ImportError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from trl import get_kbit_device_map

ImportError: cannot import name 'get_kbit_device_map' from 'trl' (/usr/local/lib/python3.10/dist-packages/trl/init.py)

Also Tried from trl.trainer.utils
Still Got:

ImportError
Traceback (most recent call last)

----> 1 from trl.trainer.utils import get_kbit_device_map

ImportError: cannot import name 'get_kbit_device_map' from 'trl.trainer.utils' (/usr/local/lib/python3.10/dist-packages/trl/trainer/utils.py)

@younesbelkada
Copy link
Contributor

hi @sankydesai
Can you update TRL? pip install -U trl and let me know if you still face the issue

@sankydesai
Copy link
Author

Nope. The issue is very simple. I went to colab, did pip install -U trl and then imported from trl import get_kbit_device_map. It fails. Please check.

@younesbelkada
Copy link
Contributor

Hi @sankydesai
Sorry for the confusion, as #1176 is not included in the pypi release, you need to install TRL from source

pip install -U git+https://github.com/huggingface/trl

Copy link

github-actions bot commented Mar 7, 2024

This issue has been automatically marked as stale because it has not had recent activity. If you think this still needs to be addressed please comment on this thread.

@younesbelkada
Copy link
Contributor

closing as we made a recent release

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

2 participants