szc19990412 / TransMIL

TransMIL: Transformer based Correlated Multiple Instance Learning for Whole Slide Image Classification
325 stars 72 forks source link

exact environment??? #41

Open homadnmr opened 6 months ago

homadnmr commented 6 months ago

what are the exact environmental packages? you mentioned 2 different settings and both show error messages!! related to pytorch lightning, amp,.... CAN anyone assist me?

tage384 commented 4 months ago

请问你的问题解决了吗,我现在遇到了同样的问题

gjlhhh commented 3 months ago

@tage384 @homadnmr May I ask if you have solved this problem, I am experiencing the same problem. 请问你是否已经解决了这个问题,我也遇到了同样的问题。

homadnmr commented 3 months ago

Hi, this is TransMIL environment: absl-py==1.1.0 antlr4-python3-runtime==4.9.3 anyio==3.6.1 appdirs==1.4.4 argon2-cffi==21.3.0 argon2-cffi-bindings==21.2.0 asttokens==2.0.5 attrs==21.4.0 Babel==2.10.3 backcall==0.2.0 beautifulsoup4==4.11.1 bleach==5.0.0 brotlipy==0.7.0 cachetools==5.2.0 certifi==2021.5.30 conda==4.10.3 conda-package-handling debugpy==1.6.0 decorator==5.1.1 defusedxml==0.7.1 docker-pycreds==0.4.0 einops==0.7.0 entrypoints==0.4 executing==0.8.3 fastjsonschema==2.15.3 filelock==3.13.1 fonttools==4.33.3 fsspec==2023.12.2 gitdb==4.0.11 GitPython==3.1.40 google-auth==2.8.0 google-auth-oauthlib==0.4.6 grpcio==1.46.3 hydra-core==1.3.2 importlib-metadata==4.11.4 importlib-resources==5.8.0 ipykernel==6.15.0 ipython==8.4.0 ipython-genutils==0.2.0 ipywidgets==7.7.0 jedi==0.18.1 Jinja2==3.1.2 json5==0.9.8 jsonschema==4.6.0 jupyter-client==7.3.4 jupyter-core==4.10.0 jupyter-server==1.17.1 jupyterlab==3.4.3 jupyterlab-language-pack-zh-CN==3.4.post1 jupyterlab-pygments==0.2.2 jupyterlab-server==2.14.0 jupyterlab-widgets==1.1.0 kiwisolver==1.4.3 Markdown==3.3.7 MarkupSafe==2.1.1 matplotlib==3.5.2 matplotlib-inline==0.1.3 mistune==0.8.4 mpmath==1.3.0 nbclassic==0.3.7 nbclient==0.6.4 nbconvert==6.5.0 nbformat==5.4.0 nest-asyncio==1.5.5 networkx==3.1 notebook==6.4.12 notebook-shim==0.1.0 numpy==1.22.4 omegaconf==2.3.0 packaging==21.3 pandas==2.0.3 pandocfilters==1.5.0 parso==0.8.3 pathtools==0.1.2 pexpect==4.8.0 pickleshare==0.7.5 Pillow==9.1.1 prometheus-client==0.14.1 prompt-toolkit==3.0.29 protobuf==3.19.4 psutil==5.9.1 ptyprocess==0.7.0 pure-eval==0.2.2 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycosat==0.6.3 PyYAML==6.0.1 pyzmq==23.2.0 requests @ file:///tmp/build/80754af9/requests_1608241421344/work requests-oauthlib==1.3.1

tensorboard==2.9.1 tensorboard-data-server==0.6.1 tensorboard-plugin-wit==1.8.1 terminado==0.15.0 tinycss2==1.1.1 torch==2.1.2 torchvision @ https://protect-domain=download.pytorch.org tqdm @ file:///tmp/build/80754af9/tqdm_1625563689033/work urllib3==1.26.18 wandb==0.15.12 wcwidth==0.2.5 webencodings==0.5.1 websocket-client==1.3.3 Werkzeug==2.1.2 widgetsnbextension==3.6.0 zipp==3.8.0


From: 桂嘿嘿 @.> Sent: Monday, 1 April 2024 10:49 PM To: szc19990412/TransMIL @.> Cc: Homay Danaei Mehr @.>; Mention @.> Subject: Re: [szc19990412/TransMIL] exact environment??? (Issue #41)

@tage384https://github.com/tage384 @homadnmrhttps://github.com/homadnmr May I ask if you have solved this problem, I am experiencing the same problem. 请问你是否已经解决了这个问题,我也遇到了同样的问题。

— Reply to this email directly, view it on GitHubhttps://github.com/szc19990412/TransMIL/issues/41#issuecomment-2029638000, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BAMCKVVTWSXD2SNXUY2XX5LY3FCTBAVCNFSM6AAAAABBPGSK4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMRZGYZTQMBQGA. You are receiving this because you were mentioned.Message ID: @.***>

gjlhhh commented 3 months ago

Thanks!

tymsoncyferki commented 3 months ago

For me it did not work and gave a lot of errors. This is how I have created my envoirnment which is working perfectly fine:

I created env from scratch running

conda create -n transmil python=3.7 -y
conda activate transmil
conda install pytorch==1.7.1 torchvision==0.8.2 torchaudio==0.7.2 cudatoolkit=11.0 -c pytorch

In requirements.txt I deleted omegaconf and added pytorch-toolbelt, torchmetrics in these versions:

addict==2.2.1
albumentations==0.4.3
einops==0.3.0
matplotlib==3.5.1
numpy==1.20.3
nystrom-attention==0.0.9
opencv-python==4.2.0.34
opencv-python-headless==4.2.0.34
pandas==1.2.3
Pillow==8.4.0
pytorch-lightning==1.2.3
pytorch-toolbelt==0.4.0
torchmetrics==0.4.1

and ran pip install -r requirements.txt

Then as stated in other issue I modified q *= self.scale to q = q * self.scal in nystrom_attention.py.