-
Notifications
You must be signed in to change notification settings - Fork 86
Open
Description
Description
Running bundled tutorial tutorial4_time_series.ipynb raises an error at the synthesis step.
How to Reproduce
Run notebook tutorial4_time_series.ipynb. This step gives an error: syn_model.generate(count=100).dataframe()
System Information
- OS: Ubuntu
- OS Version: 24.04 LTS
- Language Version: Python 3.10, Torch 2.10
Additional Context
Torch 2.10 is not recommended but using torch version < 2.4 the gives an import error related torch nn missing.
Error
AttributeError Traceback (most recent call last)
Cell In[7], [line 1](vscode-notebook-cell:?execution_count=7&line=1)
----> [1](vscode-notebook-cell:?execution_count=7&line=1) syn_model.generate(count=100).dataframe()
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:56, in validate_arguments.<locals>.validate.<locals>.wrapper_function(*args, **kwargs)
54 @wraps(_func)
55 def wrapper_function(*args: Any, **kwargs: Any) -> Any:
---> [56](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:56) return vd.call(*args, **kwargs)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:151, in ValidatedFunction.call(self, *args, **kwargs)
149 def call(self, *args: Any, **kwargs: Any) -> Any:
150 m = self.init_model_instance(*args, **kwargs)
--> [151](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:151) return self.execute(m)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:227, in ValidatedFunction.execute(self, m)
225 return self.raw_function(*args_, **kwargs, **var_kwargs)
226 else:
--> [227](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:227) return self.raw_function(**d, **var_kwargs)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/core/plugin.py:349, in Plugin.generate(self, count, constraints, random_state, **kwargs)
345 gen_constraints = gen_constraints.extend(constraints)
347 syn_schema = Schema.from_constraints(gen_constraints)
--> [349](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/core/plugin.py:349) X_syn = self._generate(count=count, syn_schema=syn_schema, **kwargs)
351 if X_syn.is_tabular():
352 if self.compress_dataset:
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/time_series/plugin_timegan.py:437, in TimeGANPlugin._generate(self, count, syn_schema, **kwargs)
434 else:
435 raise RuntimeError("unknow data type")
--> [437](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/time_series/plugin_timegan.py:437) return self._safe_generate_time_series(_sample, count, syn_schema)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:56, in validate_arguments.<locals>.validate.<locals>.wrapper_function(*args, **kwargs)
54 @wraps(_func)
55 def wrapper_function(*args: Any, **kwargs: Any) -> Any:
---> [56](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:56) return vd.call(*args, **kwargs)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:150, in ValidatedFunction.call(self, *args, **kwargs)
149 def call(self, *args: Any, **kwargs: Any) -> Any:
--> [150](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:150) m = self.init_model_instance(*args, **kwargs)
151 return self.execute(m)
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:147, in ValidatedFunction.init_model_instance(self, *args, **kwargs)
145 def init_model_instance(self, *args: Any, **kwargs: Any) -> BaseModel:
146 values = self.build_values(args, kwargs)
--> [147](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/pydantic/deprecated/decorator.py:147) return self.model(**values)
[... skipping hidden 1 frame]
File ~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/core/schema.py:71, in Schema.initialize_domain(cls, model)
68 @model_validator(mode="after")
69 def initialize_domain(cls, model: "Schema") -> "Schema":
70 if model.data is not None:
---> [71](https://vscode-remote+ssh-002dremote-002bneau-002dgpu-002d1.vscode-resource.vscode-cdn.net/home/atul/git/synthcity/tutorials/~/miniconda3/envs/syncity/lib/python3.10/site-packages/synthcity/plugins/core/schema.py:71) X = model.data.dataframe()
72 model.domain = model._infer_domain(
73 X,
74 sampling_strategy=model.sampling_strategy,
75 random_state=model.random_state,
76 )
77 # Remove 'data' attribute from the model
AttributeError: 'dict' object has no attribute 'dataframe'
woznicak
Metadata
Metadata
Assignees
Labels
No labels