How do make sure I am using the transformer version/code from source?
How do I know whether my jupyter notebook is using the transformer version/code that I cloned from github?My steps:I did fork the transformers repo in my github account then I did:git clone --recursivehttps://github.com/myaccount/transformers.gitcd transformers/conda create -n hf-dev-py380 python=3.8.0conda activate hf-dev-py380git checkout v4.9.2-releasepip install -e “.[dev]”conda install -c conda-forge librosaconda install libgccexport LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/miniconda3/lib/transformers-cli envconda install jupyternohup jupyter notebook --ip=0.0.0.0 --port=myport &When I type in my terminal “python --version”, it appears the same python version that my jupyter notebook prints (v3.8.0). But a different python version (v3.7) and directory appear in my jupyter notebook when I type:import transformersprint(transformers)<module ‘transformers’ from ‘/mypath/miniconda3/lib/python3.7/site-packages/transformers/init.py’>How do I make sure my jupyter notebook is using the transformer code I cloned in my terminal?Thanks!
2021-08-27T04:53:52Z
Just to complement my question, thedocumentationsays thatpip install -e .command would link the folder I cloned the repository to my python library paths. So the python packages would get installed into the directory I used to clone the repo, which is…/transfomers/. But still I don’t see the site-packages folder there.Any idea what do I need to do to link my jupyter notebook to my cloned folder?Thank you!
2021-09-01T19:20:27Z
Hi community!Any idea on this topic? Thanks!
2021-09-04T23:33:52Z
Why don’t you simply try (after importing the library):print(transformers.__version__)and see if it turns out to be the one you are looking for?
2021-09-27T18:05:41Z
Thank you,@shabie. The command is very useful!But how do I make sure my the printed Transformer version (eg. 4.10.3) is using the transformer code I cloned in my terminal? Is there any setting file in transformer code where I can double check about it?Thank you!
2021-09-28T09:51:20Z
What I always use is the following:!rm -r transformers
!git clone https://github.com/huggingface/transformers.git
!cd transformers
!pip install -q ./transformers
2021-10-11T22:40:16Z
Thanks a lot for sharing what you do!