Diyago/Tabular-data-generation

Dependency issue with ForestDiffusion Generator

sammanan4 opened this issue · 3 comments

After installing the package, there are several import errors like
module ForestDiffusion not found (probably because the directory is named _ForestDiffusion)
module xgboost and catboost not found

TDL77 commented

ModuleNotFoundError Traceback (most recent call last)
/media/veracrypt1/Всероссийский_хакатон_2023/r_TabGan_GauseRank.ipynb Ячейка 15 line 4
2 import numpy as np
3 from tabgan.utils import get_year_mnth_dt_from_date,make_two_digit,collect_dates
----> 4 from tabgan.sampler import OriginalGenerator, GANGenerator
7 train_size = 100
8 train = pd.DataFrame(
9 np.random.randint(-10, 150, size=(train_size, 4)), columns=list("ABCD")
10 )

File ~/mambaforge-pypy3/envs/tabgan/lib/python3.10/site-packages/tabgan/sampler.py:10
8 import numpy as np
9 import pandas as pd
---> 10 from _ForestDiffusion import ForestDiffusionModel
12 from _ctgan.synthesizer import _CTGANSynthesizer as CTGAN
13 from tabgan.abc_sampler import Sampler, SampleData

File ~/mambaforge-pypy3/envs/tabgan/lib/python3.10/site-packages/_ForestDiffusion/init.py:1
----> 1 from ForestDiffusion.diffusion_with_trees_class import ForestDiffusionModel
4 all = (
5 'ForestDiffusionModel'
6 )

ModuleNotFoundError: No module named 'ForestDiffusion'


ModuleNotFoundError Traceback (most recent call last)
in <cell line: 1>()
----> 1 from tabgan.sampler import GANGenerator
2 import pandas as pd
3 import numpy as np
4 from sklearn.model_selection import train_test_split
5

1 frames
/usr/local/lib/python3.10/dist-packages/_ForestDiffusion/init.py in
----> 1 from ForestDiffusion.diffusion_with_trees_class import ForestDiffusionModel
2
3
4 all = (
5 'ForestDiffusionModel'

ModuleNotFoundError: No module named 'ForestDiffusion'

Diyago commented

fixed in the latest version pip install tabgan==2.0.5

Thank you for finding out the error! @sammanan4 @navyashali