-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ImportError: cannot import name 'SFTConfig' from 'trl' #1639
Comments
Hi @brand17 I also encountered this error, I think in deployment and delivering phase have problem. But after i install from source, it works fine. |
@brand17 I also encountered this error, but @BaoLocPham's comment seems to work. |
pip install from source works for me also |
I installed trl 0.8.6 and tried the example from here https://huggingface.co/docs/trl/main/en/sft_trainer.
I am getting the error in line
from trl import SFTConfig, SFTTrainer
:Exception has occurred: ImportError (note: full exception trace is shown but execution is paused at: _run_module_as_main) cannot import name 'SFTConfig' from 'trl' (c:\Users\brand17\Documents\Software\python\.env\Lib\site-packages\trl\__init__.py) File "H:\My Drive\Colab_Notebooks\CallCenter\simple.py", line 2, in <module> from trl import SFTConfig, SFTTrainer, TrainingArguments File "C:\Users\brand17\AppData\Local\Programs\Python\Python311\Lib\runpy.py", line 88, in _run_code exec(code, run_globals) File "C:\Users\brand17\AppData\Local\Programs\Python\Python311\Lib\runpy.py", line 198, in _run_module_as_main (Current frame) return _run_code(code, main_globals, None, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ImportError: cannot import name 'SFTConfig' from 'trl' (c:\Users\brand17\Documents\Software\python\.env\Lib\site-packages\trl\__init__.py)
I work on Windows 10 Pro 22H2 build 19045.4291, python 3.11.4.
The text was updated successfully, but these errors were encountered: