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
Please indicate the following details about the environment in which you found the bug:
SDMetrics version: 0.16.0
Python version: 3.10.15
Operating System: ubuntu-24.04.1-desktop-amd64
Actual version of SDV: 1.17.0
Actual version of SDMetrics: 0.16.0
Actual version of Pomegranate: 1.0.0
PyCharm 2024.2.3 (Professional Edition)
Build #PY-242.23339.19, built on September 25, 2024
Virtual Environment
Error Description
AttributeError: type object 'BayesianNetwork' has no attribute 'from_samples'
Steps to reproduce
bnLikelihood = BNLikelihood.compute(real_data=real_data,synthetic_data=synthetic_data)
print (bnLikelihood,"BNLikelihood on data set (categorical colmuns only considered")
Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.
Traceback (most recent call last):
File "/home/franz/PycharmProjects/SDV_Metrics/Evaluate/evaluate_sdv_metrics.py", line 207, in <module>
bnLikelihood = BNLikelihood.compute(real_data=real_data,synthetic_data=synthetic_data)
File "/home/franz/PycharmProjects/SDV_Metrics/.venv/lib/python3.10/site-packages/sdmetrics/single_table/bayesian_network.py", line 125, in compute
return np.mean(cls._likelihoods(real_data, synthetic_data, metadata, structure))
File "/home/franz/PycharmProjects/SDV_Metrics/.venv/lib/python3.10/site-packages/sdmetrics/single_table/bayesian_network.py", line 43, in _likelihoods
bn = BayesianNetwork.from_samples(real_data[fields].to_numpy(), algorithm='chow-liu')
The text was updated successfully, but these errors were encountered:
Hi @franz3000 I was able to reproduce this issue. It's clear that SDMetrics is calling code from pomegranate that's no longer valid in more recent versions of that library but I also couldn't identify a specific, recent-enough version of pomegranate that would still work with our SDMetrics code.
With all of this in mind, I'm going to open a new issue for the team to determine the best path forward!
Environment Details
Please indicate the following details about the environment in which you found the bug:
Actual version of SDV: 1.17.0
Actual version of SDMetrics: 0.16.0
Actual version of Pomegranate: 1.0.0
PyCharm 2024.2.3 (Professional Edition)
Build #PY-242.23339.19, built on September 25, 2024
Virtual Environment
Error Description
AttributeError: type object 'BayesianNetwork' has no attribute 'from_samples'
Steps to reproduce
bnLikelihood = BNLikelihood.compute(real_data=real_data,synthetic_data=synthetic_data)
print (bnLikelihood,"BNLikelihood on data set (categorical colmuns only considered")
The text was updated successfully, but these errors were encountered: