Skip to content

fix: improve Gurobi license detection by probing model size limit - #94

Open
tlambert03 wants to merge 1 commit into
funkelab:mainfrom
tlambert03:new-gurobi-check
Open

tlambert03 wants to merge 1 commit into
funkelab:mainfrom
tlambert03:new-gurobi-check

Conversation

@tlambert03

@tlambert03 tlambert03 commented Nov 12, 2026 •

Copy link
Copy Markdown
Member

hey @ziw-liu ... this is the best I've been able to come up with to fix #93

It uses a magic number (a sufficiently large model) and just tests it out. I don't have a token server license to test with though... would you mind giving it a try?

pip install "git+https://github.com/funkelab/ilpy@refs/pull/94/head"
python -c "from ilpy.solver_backends import _have_gurobi_license; print(_have_gurobi_license())"

and let me know if pip install fails...

edit: fwiw, i tried locally and it works fine with an academic local license, and falls back without.

@codecov

codecov Bot commented Nov 12, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 33.33333% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 71.00%. Comparing base (0fdfae7) to head (d1a8606).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
src/ilpy/solver_backends/__init__.py 33.33% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #94      +/-   ##
==========================================
- Coverage   75.72%   71.00%   -4.73%     
==========================================
  Files          17       12       -5     
  Lines         828     1076     +248     
  Branches      154        0     -154     
==========================================
+ Hits          627      764     +137     
- Misses        136      312     +176     
+ Partials       65        0      -65     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This branch has not been deployed

No deployments
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.

Gurobi detection rejects valid license

1 participant