-
Notifications
You must be signed in to change notification settings - Fork 320
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
Use metadata over singletablemetadata #2144
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@@ -254,7 +254,7 @@ def _validate_metadata_specific_to_constraint(metadata, **kwargs): | |||
invalid_columns = [] | |||
column_names = kwargs.get('column_names') | |||
for column in column_names: | |||
if metadata.columns[column]['sdtype'] not in ['boolean', 'categorical']: | |||
if metadata.get_columns()[column]['sdtype'] not in ['boolean', 'categorical']: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't be backwards compatible. SingleTableMetadata
does not have get_columns()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it backwards compatible by making sure all metadata is converted and also convert it the synthesizer metadata on load
.
Also added an integration test for backward compatibility.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm 👍
Co-authored-by: gsheni <gvsheni@gmail.com>
Closing as we landed #2140 instead |
resolves #2128
CU-86b19amxa
Made metadata work with single table synthesizers by converting
SingleTableMetadata
toMetadata
before inserting into the synthesizers. Write a wrapper method so that all single table synthesizers can use Metadata when there is only one table.Wrote unit tests and update tests to use the methods instead of directly accessing
SingleTableMetadata
attributes.