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

Add back highspy test, with numpy included #683

Merged
merged 3 commits into from
Sep 24, 2023
Merged

Conversation

aphi
Copy link
Contributor

@aphi aphi commented Sep 24, 2023

Right now we're not testing the highs api solver. It was removed from the test script because it was failing because Highspy depends on Numpy under the hood. (E.g. inside pybind11 within highs_bindings.cpp)

This PR adds it back, including numpy, which resolves the issue.

The HiGHS documentation recommends numpy as a likely dependency here: https://github.com/ERGO-Code/HiGHS/blob/master/docs/src/interfaces/python/index.md

@aphi aphi changed the title Add back highspy test, with numpy included #677 Add back highspy test, with numpy included Sep 24, 2023
@pchtsp
Copy link
Collaborator

pchtsp commented Sep 24, 2023

Unfortunately it seems that the high solver keeps having some errors in Ubuntu... I will approve this PR as it's not the cause. But it would be nice to see a way to solve it.

@pchtsp
Copy link
Collaborator

pchtsp commented Sep 24, 2023

Maybe @siwy knows about this since it was him who brought the changes with setLogCallback in 6a8e463. It only fails in Ubuntu, not in mac:

Traceback (most recent call last):
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pulp/tests/test_pulp.py", line 842, in test_msg_arg
    pulpTestCheck(
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pulp/tests/test_pulp.py", line 1556, in pulpTestCheck
    status = prob.solve(solver, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pulp/pulp.py", line 1920, in solve
    status = solver.actualSolve(self, **kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pulp/apis/highs_api.py", line 394, in actualSolve
    self.createAndConfigureSolver(lp)
  File "/opt/hostedtoolcache/Python/3.11.5/x64/lib/python3.11/site-packages/pulp/apis/highs_api.py", line 301, in createAndConfigureSolver
    lp.solverModel.setLogCallback(*callbackTuple)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Highs' object has no attribute 'setLogCallback'

@pchtsp pchtsp merged commit a061554 into coin-or:master Sep 24, 2023
8 of 16 checks passed
@siwy
Copy link
Contributor

siwy commented Sep 25, 2023

@pchtsp - I think it's the same issue as in #678. Highspy removed the setLogCallback API, but plan on adding it back: ERGO-Code/HiGHS#1379

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.

3 participants