Skip to content

[BUG] Creating synthetic data via CGAN #331

@MatteoFenu

Description

@MatteoFenu

Describe the bug
I tried to create synthetic data with CGAN, but an exception is thrown. I tried running your example file and the same error occurs.

  File "D:\Program Files\JetBrains\PyCharm 2023.3.4\plugins\python\helpers\pydev\pydevd.py", line 1534, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "D:\Program Files\JetBrains\PyCharm 2023.3.4\plugins\python\helpers\pydev\_pydev_imps\_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "D:\Users\Matteo\Documents\GitHub\Artificial-Intelligence-Applications-for-Healthcare\prova.py", line 69, in <module>
    synth = RegularSynthesizer(modelname='cgan', model_parameters=gan_args)
  File "C:\Users\matte\AppData\Roaming\Python\Python310\site-packages\ydata_synthetic\synthesizers\regular\model.py", line 56, in __new__
    model=Model(modelname).function(model_parameters, **kwargs)
  File "C:\Users\matte\AppData\Roaming\Python\Python310\site-packages\ydata_synthetic\synthesizers\regular\cgan\model.py", line 32, in __init__
    super().__init__(model_parameters)
TypeError: object.__init__() takes exactly one argument (the instance to initialize)

To Reproduce
Run the file https://github.com/ydataai/ydata-synthetic/blob/dev/examples/regular/models/creditcard_cgan.py
(the dataset link is no longer available, download it locally)

Desktop (please complete the following information):

  • OS: Windows
  • Python: 3.10.14
  • ydata-synthetic: 1.3.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions