-
Notifications
You must be signed in to change notification settings - Fork 79
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
Matching #666
Matching #666
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #666 +/- ##
=======================================
- Coverage 85.0% 85.0% -0.0%
=======================================
Files 139 141 +2
Lines 14889 15023 +134
=======================================
+ Hits 12663 12771 +108
- Misses 2226 2252 +26
|
Tests are now added, but pulp installation fails on windows through |
In |
Looks like |
Is this passing locally for you? |
i think it just needs to be wrapped in a tuple |
Yes, but fixing that, I still have fails locally. Will fix. |
One question I had for maintainers: I built the spatial matching framework to be able to do cross-pattern queries. So, something like:
I think this would be good to expose in So, would it be OK to grab |
libpysal/graph/_matching.py
Outdated
summand = pulp.lpSum([match_vars[j, i] for j in range(n_targets)]) | ||
mp += pulp.LpConstraint(summand, sense=-1, rhs=n_matches) | ||
if solver is None: | ||
solver = pulp.COIN(msg=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering if there is way to simply choose the default installed solver without needing to specific (or is this what's happening here with pulp.COIN()
?). Implementing that logic would go a long way over in spopt
>> pysal/spopt#348
cc @gegen07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we need to do this, since pulp.PULP_CBC_CMD()
I think is different from pulp.COIN_CMD()
, and some students could run pulp.GUROBI()
but not pulp.GUROBI_CMD()
.
I think we should really leave it to pulp to deal with this, rather than specifying COIN.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, seems like it would make a nice improvement in spopt
to have the ability to pass in no solver, and then the default one installed is used within the solve()
methods.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think just delegating to the model's solve method will choose a default available solver, if one is configured. We shouldn't intercept this to set a default (imho).
Do you have the most recent |
It is |
OK! Wasn't clear on the differences between ruff check and format. Sorry! I think this is complete. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking very cool.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The large diff in base is just moving stuff around to get alphabetic order of builders?
Can you also add a test for Graph.build_spatial_matches
?
Yes. |
Co-authored-by: Martin Fleischmann <martin@martinfleischmann.net>
I believe I've addressed all comments! |
Hi! could one of the approvers please merge this? |
thank you! |
Hello! Please make sure to check all these boxes before submitting a Pull Request
(PR). Once you have checked the boxes, feel free to remove all text except the
justification in point 5.
pytest
on your changes. Continuous integration will be run on all PRs with GitHub Actions, but it is good practice to test changes locally prior to a making a PR.pysal/main
branch.docstrings and
unittests?
reviewer and added relevant labels
todo:
pulp
to our testing matrix.