I have installed trl using pip.
!pip show trl
and its showing packages info properly,
!pip show trl
Name: trl
Version: 0.7.10
Summary: Train transformer language models with reinforcement learning.
Home-page:
Author: Leandro von Werra
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/lib/python3.10/dist-packages
Requires: accelerate, datasets, numpy, torch, transformers, tyro
Required-by:
However, when I am importing in Notebook its showing error:
import trl
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[9], line 1
----> 1 import trl
ModuleNotFoundError: No module named 'trl'
Why this discrepancy? How to resolve it?
I have installed trl using pip.
!pip show trl
and its showing packages info properly,
!pip show trl
Name: trl
Version: 0.7.10
Summary: Train transformer language models with reinforcement learning.
Home-page: https://github/huggingface/trl
Author: Leandro von Werra
Author-email: [email protected]
License: Apache 2.0
Location: /usr/local/lib/python3.10/dist-packages
Requires: accelerate, datasets, numpy, torch, transformers, tyro
Required-by:
However, when I am importing in Notebook its showing error:
import trl
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
Cell In[9], line 1
----> 1 import trl
ModuleNotFoundError: No module named 'trl'
Why this discrepancy? How to resolve it?
Share Improve this question asked Nov 20, 2024 at 5:34 Sazzad Hissain KhanSazzad Hissain Khan 40.3k41 gold badges209 silver badges299 bronze badges1 Answer
Reset to default 0The problem was solved when I installed from direct source using,
pip install git+https://github/huggingface/trl.git