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

Extraneous metadata warning is printed when customizing HMA Synthesizer #2250

Open
npatki opened this issue Oct 2, 2024 · 0 comments · May be fixed by #2251
Open

Extraneous metadata warning is printed when customizing HMA Synthesizer #2250

npatki opened this issue Oct 2, 2024 · 0 comments · May be fixed by #2251
Assignees
Labels
bug Something isn't working data:multi-table Related to multi-table, relational datasets

Comments

@npatki
Copy link
Contributor

npatki commented Oct 2, 2024

Environment Details

  • SDV version: 1.17.0 (latest)
  • Python version: 3.10
  • Operating System: Linux (Colab)

Error Description

I am using HMA and providing the new, streamlined Metadata object for it. If I try to customize the synthesizer (eg. by setting distributions for individual columns), then HMA unnecessarily complains that I am using SingleTableMetadata.

FutureWarning: The 'SingleTableMetadata' is deprecated. Please use the new 'Metadata' class for synthesizers.

I expect that there should be no such warning because I am using the correct Metadata object.

Steps to reproduce

Use the fake_hotels demo dataset to replicate. The download_demo provides the new, streamlined Metadata object so there should be no warning.

from sdv.datasets.demo import download_demo
from sdv.multi_table import HMASynthesizer

real_data, metadata = download_demo(modality='multi_table', dataset_name='fake_hotels')

custom_synthesizer = HMASynthesizer(metadata, verbose=False)
custom_synthesizer.set_table_parameters(
    table_name='hotels',
    table_parameters={ 'default_distribution': 'truncnorm' })
custom_synthesizer.fit(real_data)
FutureWarning: The 'SingleTableMetadata' is deprecated. Please use the new 'Metadata' class for synthesizers.

Additional Context

Note that the warning goes away if I just use the default HMA (i.e. I do not apply set_table_parameters)

default_synthesizer = HMASynthesizer(metadata)
default_synthesizer.fit(data)
@npatki npatki added bug Something isn't working data:multi-table Related to multi-table, relational datasets labels Oct 2, 2024
@pvk-developer pvk-developer self-assigned this Oct 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working data:multi-table Related to multi-table, relational datasets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants