-
Notifications
You must be signed in to change notification settings - Fork 317
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot apply Inequality
constraint on demo dataset's datetime columns
#1203
Labels
Milestone
Comments
npatki
added
bug
Something isn't working
feature:constraints
Related to inputting rules or business logic
labels
Jan 27, 2023
@amontanez24 @pvk-developer I am still having an issue with this feature. While is no longer an issue during Should we reopen this issue or should I file a new one for the Codefrom sdv.datasets.demo import download_demo
from sdv.single_table import GaussianCopulaSynthesizer
real_data, metadata = download_demo(
modality='single_table',
dataset_name='fake_hotel_guests'
)
synthesizer = GaussianCopulaSynthesizer(metadata)
checkin_lessthan_checkout = {
'constraint_class': 'Inequality',
'constraint_parameters': {
'low_column_name': 'checkin_date',
'high_column_name': 'checkout_date'
}
}
synthesizer.add_constraints([
checkin_lessthan_checkout
])
synthesizer.fit(real_data)
synthetic_data = synthesizer.sample(num_rows=500) Stack Trace
|
Seems like this is working now in the Beta release so I'm closing the issue! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Environment Details
Error Description
The
student_placements_pii
demo dataset containsstart_date
andend_date
columns that represent dates. They include some missing values.If I apply an
Inequality
constraint to designate thatstart_date < end_date
, then the synthesizer crashes duringfit
.Steps to reproduce
Notes
Both
start_date
andend_date
columns are being represented asobject
dtypes in pandas. This should be OK.I also tried casting them myself to see if this helps:
If I do this, then the
fit
calls works, but there is still an error duringsample
:The text was updated successfully, but these errors were encountered: