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

Resolve pomegranate import issues #701

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Resolve pomegranate import issues #701

wants to merge 11 commits into from

Conversation

rwedge
Copy link
Contributor

@rwedge rwedge commented Jan 3, 2025

This PR fixes #630 by switching to pomegranate 0.15 and updating the BNLikelihood and BNLogLikelihood metrics to prompt the user to install pomegranate via pip install sdmetrics[pomegranate] instead of pip install pomegranate. pip install pomegranate was installing pomegranate version 1.x which breaks the API we use, as seen in #642.

Copy link

codecov bot commented Jan 3, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.93%. Comparing base (b83bcf9) to head (34326ac).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
+ Coverage   94.44%   94.93%   +0.48%     
==========================================
  Files         106      106              
  Lines        4103     4103              
==========================================
+ Hits         3875     3895      +20     
+ Misses        228      208      -20     
Flag Coverage Δ
integration 78.84% <ø> (+0.43%) ⬆️
unit 81.72% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment on lines +87 to +89
pomegranate_deps = ' '.join(minimum_pomegranate_versions)
c.run(f'python -m pip install {install_deps}')
c.run(f'python -m pip install --force-reinstall --no-cache-dir {pomegranate_deps}')
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

perhaps the pomegranate logic should only be run if minimum_pomegranate_versions isn't empty

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BNLikelihood
3 participants