ydataai / ydata-synthetic

Synthetic data generators for tabular and time-series data
https://docs.synthetic.ydata.ai
MIT License
1.41k stars 234 forks source link

Error while generating synthetic data from CGAN #268

Open Ahmadshahzad2 opened 1 year ago

Ahmadshahzad2 commented 1 year ago

Describe the bug after training the model I tried t generate the data but I keep on getting the error "'CGAN' object has no attribute 'generator'"

To Reproduce Steps to reproduce the behavior: I am using colab to run the a notebook. Running the following lines of code

muti_class_data_synth = RegularSynthesizer(modelname='cgan', model_parameters=cgan_args)

muti_class_data_synth.load('cgan_multi_model.pkl')

cond_array = pd.DataFrame(100*[1], columns=['label'])

Synthesizer samples are returned in the original format (inverse_transform of internal processing already took place)

sample = muti_class_data_synth.sample(cond_array)

print(sample)

image

fabclmnt commented 1 year ago

Hi @Ahmadshahzad2 ,

thank you for your issue. Can you please confirm me the following info:

Ahmadshahzad2 commented 1 year ago

Hi @fabclmnt,

The environment only has the packages that were installed during installation of ' ydata-synthetic'. I downloaded the latest version "1.1.0".

image

fabclmnt commented 1 year ago

Can you please share the whole code of even a python notebook so we can replicate the behaviour?

thank you for your understanding!