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

Warn the user if they are trying to save an unfit synthesizer #1961

Closed
npatki opened this issue Apr 24, 2024 · 0 comments · Fixed by #2147
Closed

Warn the user if they are trying to save an unfit synthesizer #1961

npatki opened this issue Apr 24, 2024 · 0 comments · Fixed by #2147
Assignees
Labels
feature request Request for a new feature
Milestone

Comments

@npatki
Copy link
Contributor

npatki commented Apr 24, 2024

Problem Description

Inspired by the discussion in CTGAN #361, a user may accidentally save their synthesizer before fitting it. If this happens, then you will not be able to re-load and sample from the synthesizer, as the saved synthesizer has not been fit.

Expected behavior

If, for any synthesizer, the user calls save and the synthesizer has not yet been fit, show a warning:

Warning: You are saving a synthesizer that has not yet been fit. You will not be able 
to sample synthetic data without fitting. We recommend fitting the synthesizer first 
and then saving.

Additional context

Should this be an error instead? No because maybe there is a legitimate reason for saving it before fitting. For example, user has added constraints, updated transformers, etc. and wants to save the progress.

@npatki npatki added the feature request Request for a new feature label Apr 24, 2024
@fealho fealho self-assigned this Jul 29, 2024
@fealho fealho added this to the 1.15.1 milestone Jul 29, 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