You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I accidentally try to sample some synthetic data before fitting my synthesizer, I currently get an error message that is not helpful in diagnosing the problem. SDV synthesizers should be able to identify that the synthesizer has not yet been fit to raise a more appropriate error message and description.
Current error message: This error indicates that sampling has been attempted.
NotFittedError:
During handling of the above exception, another exception occurred:
NotFittedError Traceback (most recent call last)
[/usr/local/lib/python3.10/dist-packages/sdv/single_table/utils.py](https://localhost:8080/#) in handle_sampling_error(is_tmp_file, output_file_path, sampling_error)
110
111 if error_msg:
--> 112 raise type(sampling_error)(error_msg + '\n' + str(sampling_error))
113
114 raise sampling_error
NotFittedError: Error: Sampling terminated. Partial results are stored in a temporary file: .sample.csv.temp. This file will be overridden the next time you sample. Please rename the file if you wish to save these results.
Expected behavior
Instead of attempting to sample, the single table synthesizer should check first whether the synthesizer has been fitted. If it has not been fitted, we should proactively show a SamplingError explaining to the user what they must do.
Problem Description
If I accidentally try to sample some synthetic data before fitting my synthesizer, I currently get an error message that is not helpful in diagnosing the problem. SDV synthesizers should be able to identify that the synthesizer has not yet been fit to raise a more appropriate error message and description.
Current error message: This error indicates that sampling has been attempted.
Expected behavior
Instead of attempting to sample, the single table synthesizer should check first whether the synthesizer has been fitted. If it has not been fitted, we should proactively show a
SamplingError
explaining to the user what they must do.Additional context
This issue is meant for single-table synthesizers that require fitting -- so it applies to: GaussianCopula, CTGAN, CopulaGAN, and TVAE
The text was updated successfully, but these errors were encountered: