SDV icon indicating copy to clipboard operation
SDV copied to clipboard

Multiple error messages while running single table notebook in sdv binder and in AWS Sagemaker notebook instance

Open raptorsdigital opened this issue 5 years ago • 4 comments

Environment Details

Please indicate the following details about the environment in which you found the bug:

  • SDV version: 0.12.0
  • Python version: 3.7.10
  • Operating System: system='Linux', node='jupyter-sdv-2ddev-2dsdv-2dmxgrbp2w', release='5.4.109+', version='#1 SMP Wed Jun 16 20:00:10 PDT 2021', machine='x86_64', processor='x86_64'

Error Description

I am executing the single table tutorial in the sdv binder and receive many error messages while fitting and evaluating the data. The datasets are the built-in student_placements and student_placements_pii.

/*************************************************************/ Errors while fitting data:

/srv/conda/envs/notebook/lib/python3.7/site-packages/scipy/stats/_continuous_distns.py:5320: RuntimeWarning: divide by zero encountered in true_divide return c2 / (c2 - n**2) /srv/conda/envs/notebook/lib/python3.7/site-packages/scipy/stats/_distn_infrastructure.py:2606: RuntimeWarning: invalid value encountered in double_scalars Lhat = muhat - Shatmu /srv/conda/envs/notebook/lib/python3.7/site-packages/scipy/stats/_continuous_distns.py:639: RuntimeWarning: invalid value encountered in sqrt sk = 2(b-a)np.sqrt(a + b + 1) / (a + b + 2) / np.sqrt(ab) /srv/conda/envs/notebook/lib/python3.7/site-packages/scipy/optimize/minpack.py:175: RuntimeWarning: The iteration is not making good progress, as measured by the improvement from the last ten iterations. warnings.warn(msg, RuntimeWarning) // // Errors while evaluating data /srv/conda/envs/notebook/lib/python3.7/site-packages/sklearn/mixture/_base.py:269: ConvergenceWarning: Initialization 1 did not converge. Try different init parameters, or increase max_iter, tol or check for degenerate data. % (init + 1), ConvergenceWarning) /srv/conda/envs/notebook/lib/python3.7/site-packages/sklearn/mixture/_base.py:269: ConvergenceWarning: Initialization 1 did not converge. Try different init parameters, or increase max_iter, tol or check for degenerate data. % (init + 1), ConvergenceWarning) /srv/conda/envs/notebook/lib/python3.7/site-packages/sdmetrics/base.py:97: RuntimeWarning: overflow encountered in exp score = 1 / (1 + np.exp(-raw_score)) /srv/conda/envs/notebook/lib/python3.7/site-packages/sdmetrics/column_pairs/statistical/kl_divergence.py:51: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy real_data[pd.isnull(real_data)] = 0.0 /srv/conda/envs/notebook/lib/python3.7/site-packages/pandas/core/frame.py:3093: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy self._where(-key, value, inplace=True) /srv/conda/envs/notebook/lib/python3.7/site-packages/sdmetrics/column_pairs/statistical/kl_divergence.py:52: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy synthetic_data[pd.isnull(synthetic_data)] = 0.0 /srv/conda/envs/notebook/lib/python3.7/site-packages/sdmetrics/utils.py:62: UserWarning: Unexpected value Pandas(high_spec='Arts', degree_type='Sci&Tech') in synthetic data. warnings.warn(f'Unexpected value {value} in synthetic data.') /*************************************************************/

Steps to reproduce

Please execute the attached notebook. This notebook is from the sdv getting started binder available at: https://github.com/sdv-dev/SDV

01_GaussianCopula_Model.pdf

raptorsdigital avatar Sep 29 '21 14:09 raptorsdigital

CopulaGan_Fitting_Errors.pptx Similar fitting errors with CopulaGan in the binder notebok

raptorsdigital avatar Sep 29 '21 14:09 raptorsdigital

Any news on this issue? I get the same when running it on Google Colab.

JeroenVerboom avatar Dec 21 '21 19:12 JeroenVerboom

Hi @raptorsdigital, thanks for your question.

These logs are warnings issued by third party libraries, such as scikit and sklearn. They are usually seen even if the fitting process was successful, so you can safely ignore them.

If you want to silence them, you can to add these two lines in your code (or notebook) before running the model:

import warnings

warnings.filterwarnings('ignore')

katxiao avatar Dec 22 '21 21:12 katxiao

Hi everyone, I'm closing off this issue since it seems like the question has been answered. Please feel free to reopen if there's more to discuss.

(BTW in the later versions of the SDV, we have silenced a few of these warnings that do not affect the end use or quality of synthetic data.)

npatki avatar Jun 27 '22 23:06 npatki