Comments (12)
@dionman
Which version are you using? Could you try the latest version in my fork? RuntimeError: Conditional mismatch. Got inference conditional, without any training conditional
is probably due to a previous bug that the Plugin requires an explicit cond
argument during fit
if you want to generate with a cond
as well, but DDPM automatically sets the labels as the cond
if is_classification=True
. This has already been fixed.
For the second problem, yes the cond
should have a float or int data type for the moment, because otherwise it needs one-hot encoding, while in the diffusion model it is assumed to be 1-dimensional. Perhaps you can also use LabelEncoder
to encode the cond
if it has an object
dtype and provide it to the fit
method as follows.
from synthcity.
I'm using release v0.2.5. Is it fixed at this version of the code?
from synthcity.
I'm using release v0.2.5. Is it fixed at this version of the code?
I checked that commit. Sorry it is not fixed there.
from synthcity.
okay, what workaround should I use at the moment? Import the library from your fork?
from synthcity.
You can replace Line 214-224 in src/synthcity/plugins/generic/plugin_ddpm.py with the following code:
df = self.encoder.fit_transform(df)
if cond is not None:
if type(cond) is str:
cond = df[cond]
cond = pd.Series(cond, index=df.index)
self.expecting_conditional = True
# NOTE: cond may also be included in the dataframe
self.model.fit(df, cond, **kwargs)
self.loss_history = self.model.loss_history
return self
from synthcity.
do you mean lines 218-224?
from synthcity.
do you mean lines 218-224?
No, should be from line 214, starting with else:
.
from synthcity.
https://github.com/TZTsai/synthcity/blob/e336d3cd42516cef27ac4ad60ac0df61bd92f1a6/src/synthcity/plugins/generic/plugin_ddpm.py#L157
self.encoder
also needs to be added earlier in this script
...which implies changing a few more things
from synthcity.
TZTsai/synthcity@
e336d3c
/src/synthcity/plugins/generic/plugin_ddpm.py#L157self.encoder
also needs to be added earlier in this script ...which implies changing a few more things
Sorry I forgot about that. You can comment that line for the moment. Can it run after that?
from synthcity.
Thanks. Is there any cleaner way to enable this after the most recent commits in the main? Can I use any branch in your fork?
from synthcity.
Sorry I just found my last reply wasn't sent out, probably due to internet reasons. In the latest version of the main branch, this should work fine. Have you checked it?
from synthcity.
thanks, yes, this works
from synthcity.
Related Issues (20)
- Add Tutorial for using HyperImpute + SynthCity
- keepalive workflow stopped working
- Suspected coding mistake in PerformanceEvaluator HOT 1
- Keyerror in Plugins.get() HOT 1
- Documentation is not rendering properly
- Fix Tutorial erorrs
- Include new generative plugin: GREAT
- How to add custom plugins? HOT 5
- Add inheritance diagrams to the documentation
- New plugin AIM
- Improve Aim tests
- Integration of STASY
- Implementation of Adversary Instantiation
- Private Synthetic Data for Multitask Learning and Marginal Queries
- Debug release script
- Add a plugin registry
- Include Be_great and arfpy plugins in main code
- Airfoil dataset no longer available from source
- Upgrade PyTorch requirements from ">=1.10.0,<2.0" to "2.0.1" HOT 3
- Plugin decaf load failed HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from synthcity.