VikParuchuri / tabled

Detect and extract tables to markdown and csv
https://www.datalab.to
GNU General Public License v3.0
467 stars 20 forks source link

How to assign TORCH_DEVICE? #12

Closed JinguangHe closed 6 hours ago

JinguangHe commented 7 hours ago

Is there no parameter to assign TORCH_DEVICE 0 or 1 ?

VikParuchuri commented 6 hours ago

You mean set your cuda device? You can set that with CUDA_VISIBLE_DEVICES . For torch device, like "cuda", "mps", "cpu", you can set via TORCH_DEVICE

JinguangHe commented 5 hours ago

You mean set your cuda device? You can set that with CUDA_VISIBLE_DEVICES . For torch device, like "cuda", "mps", "cpu", you can set via TORCH_DEVICE

I have tried to modify settings.py settings = Settings(CUDA_VISIBLE_DEVICES=1) and created local.env to set "CUDA_VISIBLE_DEVICES=1" But it didn't work, it always used gpu 0, not 1

VikParuchuri commented 5 hours ago

You just export CUDA_VISIBLE_DEVICES=1 on the command line - this is an nvidia env variable, has nothing to do with this repo