Skip to content
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

Add a warning if you're loading a SingleTableMetadata object #2210

Open
npatki opened this issue Sep 9, 2024 · 0 comments · May be fixed by #2186
Open

Add a warning if you're loading a SingleTableMetadata object #2210

npatki opened this issue Sep 9, 2024 · 0 comments · May be fixed by #2186
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Sep 9, 2024

Problem Description

In an upcoming version of SDV, we will be consolidating the Multi and Single table metadata objects into a streamlined Metadata object. Effectively, this object is the same as multi-table. So for single-table, it will start including a table name.

However for backwards compatibility reasons, a user should still be able to load in the SingleTableMetadata object into the new Metadata format. When doing so, we assign a placeholder table name since one was not available in the older object. Currently, this is not transparent to the user -- they do not know this is happening and what the placeholder table name is.

Expected behavior

Throw a warning whenever a SingleTableMetadata object is loaded into the streamlined Metadata format. Explain that a placeholder table name will be supplied, and what the name is.

from sdv.metadata import Metadata

metadata = Metadata.load_from_json(
    filepath='my_single_table_metadata.json'
)
Warning: You are loading an older SingleTableMetadata object. This will be converted
into the new Metadata object with a placeholder table name ('table').
Please save this new object for future usage.
@npatki npatki added the feature request Request for a new feature label Sep 9, 2024
@R-Palazzo R-Palazzo self-assigned this Sep 12, 2024
@R-Palazzo R-Palazzo added this to the 1.17.0 milestone Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Request for a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants