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

Failed to import cdt on a machine without GPU. #40

Closed
yishilin14 opened this issue Sep 23, 2019 · 3 comments
Closed

Failed to import cdt on a machine without GPU. #40

yishilin14 opened this issue Sep 23, 2019 · 3 comments
Labels

Comments

@yishilin14
Copy link

I am using Windows 7 and I don't have a GPU.

I create a fresh conda environment as follows.

conda create --prefix venv python=3.7
conda activate ./venv
# Note that I don't have a GPU. https://pytorch.org/get-started/locally/ 
conda install pytorch torchvision cpuonly -c pytorch
conda install pip
pip install cdt

Packages:

  • pytorch: 1.2.0
  • torchversion: 0.4.0
  • cdt: 0.5.8
  • ...

Executing import cdt failed.
image

The following lines caused the problem. https://github.com/Diviyan-Kalainathan/CausalDiscoveryToolbox/blob/6df55f4ec0800a377cb4688b7eaedb2b1f75f3fe/cdt/utils/Settings.py#L161-L163

My workaround is executing os.environ["CUDA_VISIBLE_DEVICES"]="[]" before executing import cdt.

@diviyank
Copy link
Collaborator

Thanks for the feedback ; this must be an incompatibility issue between GPUtils and Windows, I'll try to add another safeguard, to avoid workarounds :)

@diviyank
Copy link
Collaborator

It should be done; Please try to update your package and check if the error is still there !

@yishilin14
Copy link
Author

It works now! Thank you so much! Your package is awesome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants