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

Better input validation on HMASynthesizer.sample #1241

Closed
npatki opened this issue Feb 7, 2023 · 0 comments
Closed

Better input validation on HMASynthesizer.sample #1241

npatki opened this issue Feb 7, 2023 · 0 comments
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Feb 7, 2023

Version: SDV 1.0.0 (in progress)

Problem Description

In this version, the HMASynthesizer will have a parameter, scale that controls how large to make the synthetic data. It should only be possible to input floats or integers that are >0.0.

However, we are currently accepting other inputs such as True, False, '1', etc. -- we are actually producing synthetic data for this, even though it's unclear what the parameter value really means.

Expected behavior

Throw an error if the scale parameter is not an integer or float that is >0.0.

>>> synthesizer.sample(scale=True)

SamplingError: Invalid parameter for 'scale' (True). Please provide a number that is >0.0.

Same error should be thrown if the user provides a negative number.

@npatki npatki added the feature request Request for a new feature label Feb 7, 2023
@npatki npatki added this to the 1.0.0 milestone Feb 7, 2023
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

No branches or pull requests

3 participants