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

Merged
merged 18 commits into from
Jan 8, 2025
Merged

Resolve pomegranate import issues #701

merged 18 commits into from
Jan 8, 2025

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.88%. Comparing base (b83bcf9) to head (5d0d033).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #701      +/-   ##
==========================================
+ Coverage   94.44%   94.88%   +0.43%     
==========================================
  Files         106      106              
  Lines        4103     4103              
==========================================
+ Hits         3875     3893      +18     
+ Misses        228      210      -18     
Flag Coverage Δ
integration 78.79% <ø> (+0.38%) ⬆️
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.

tasks.py Outdated
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

Copy link
Contributor

@amontanez24 amontanez24 left a comment

Choose a reason for hiding this comment

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

I think we can follow up with @kveerama to see if we want to make further changes like removing pomegranate completely but the solution LGTM!

@rwedge
Copy link
Contributor Author

rwedge commented Jan 8, 2025

@amontanez24 I can't merge due to integration (macos-13, 3.12) being a required workflow check. Is that an old rule we should remove? I can't edit the required check rules.

@amontanez24
Copy link
Contributor

@amontanez24 I can't merge due to integration (macos-13, 3.12) being a required workflow check. Is that an old rule we should remove? I can't edit the required check rules.

Removed, good catch!

@rwedge rwedge merged commit debf91f into main Jan 8, 2025
47 checks passed
@rwedge rwedge deleted the issue-642-pomegranate branch January 8, 2025 21:09
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