yandex-research / tab-ddpm

[ICML 2023] The official implementation of the paper "TabDDPM: Modelling Tabular Data with Diffusion Models"
https://arxiv.org/abs/2209.15421
MIT License
397 stars 89 forks source link

issue in running code #9

Closed akashsonowal97 closed 1 year ago

akashsonowal97 commented 1 year ago

Hi team!

I was facing issues in running the code on google colab.

it was not able to read the module inside packages.

rotot0 commented 1 year ago

Hi, Unfortunately, the code was not tested on google colab. And it was not intended to run it there. I may have a look later but I can't say how soon I will solve this problem.

AlbertoCP20 commented 1 year ago

Hello! I have faced the same problem, but a friend of mine and I figured out how to solve it.

First of all, you have to install python 3.9 in Google Collab (in our case python 3.8 was installed). Then you can clone the repository on your Google Collab notebook.

Once you have cloned the repository, instead of using anaconda to set up the environment, install directly the libraries on your notebook with: > !pip install 'libraries'. Then make sure you add the path to the workspace into the environment variable PYTHONPATH: import os os.environ["PYTHONPATH"] += ":/path/to/tab-ddpm" os.environ["PYTHONPATH"] += ":/path/to/tab-ddpm/tab_ddpm"

Finally you should be able to run the code without the problem of reading the module inside packages.

If you want to run this code for example: python scripts/pipeline.py --config exp/churn2/ddpm_cb_best/config.toml --train --sample

You may have some problems with GPU settings and CUDA drivers when you try to run the scripts. If you had this problem go to scripts/train.py and make this change whenever you see 'cuda:1' in the file:

Then go to scripts/pipeline.py make the same change, look for 'cuda:1' and type 'cuda'.

Finally go to your sample config.toml, in this case: _exp/churn2/ddpm_cbbest/config.toml and make the same change. If you want to use a different sample you may have to do this change in every config.toml file of the data directory to avoid this problem.

This worked for us.

Hope this will help you!