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

requirements for running the demo notebook #102

Open
roy651 opened this issue Dec 28, 2023 · 2 comments
Open

requirements for running the demo notebook #102

roy651 opened this issue Dec 28, 2023 · 2 comments

Comments

@roy651
Copy link

roy651 commented Dec 28, 2023

I tried running the demo notebook but apparently the requirements are not sorted out properly. The model and weights are roughly from 2021/2022 and torch and other libraries have evolved since.
So FWIW this setup worked for me. I had to use Python 3.8:

torch==1.10.2
torchvision==0.11.3
tokenizers==0.11.6
transformers==4.16.2
timm==0.5.4
@Lopa07
Copy link

Lopa07 commented Mar 25, 2024

This is helpful. Thank you!

pip3 install --upgrade --force-reinstall tokenizers==0.10.3 transformers==4.5.1 timm==0.5.4
pip install --upgrade --force-reinstall torch==1.7.1+cu110 torchvision==0.8.2+cu110 -f https://download.pytorch.org/whl/torch_stable.html

export CUBLAS_WORKSPACE_CONFIG=:4096:8
python -m torch.distributed.launch --nproc_per_node=8 --use_env main.py --dataset_config configs/pretrain.json --ema

The tokenizer version that is installed is 0.10.3. In the transformers package, the version requirement for tokenizers is >=0.10.1,<0.11. Still, this was giving the error packaging.version.InvalidVersion: Invalid version: '0.10.1,<0.11'. So changed the tokenizers version requirement in lib/python3.8/site-packages/transformers/dependency_versions_table.py from tokenizers>=0.10.1,<0.11 to tokenizers>=0.10.1. This worked.

@Amaia-CARDIEL
Copy link

Following earlier comments, I could make the model work in a virtual environment (not on colab but on my own GPU) by doing the following instal:

conda create -n mdetr_env_4 python=3.10.12
conda activate mdetr_env_4
pip3 install torch==1.10.2+cu113 torchvision==0.11.3+cu113 torchaudio==0.10.2+cu113 -f https://download.pytorch.org/whl/cu113/torch_stable.html
pip install tokenizers==0.11.6
pip install transformers==4.16.2
pip install timm==0.5.4
pip install scipy
pip install matplotlib
pip install scikit-image

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

3 participants