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

highs solver fails test in Ubuntu when showing log messages #684

Open
pchtsp opened this issue Sep 24, 2023 · 5 comments
Open

highs solver fails test in Ubuntu when showing log messages #684

pchtsp opened this issue Sep 24, 2023 · 5 comments

Comments

@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.
The test that fails is test_msg_arg. 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'

@tomaszG247
Copy link

I am experiencing the same error message trying to solve a model with HiGHS solver interface

'Highs' object has no attribute 'setLogCallback'
  File "C:\Users\TGi\OneDrive - CSEM S.A\Documents\Code\pentagon\pentagon\pentagon_models.py", line 1730, in solveProblem
    prob.solve(solver=solver)

I am on Windows,
I got highspy == 1.5.3 and pulp = 2.8.0 from Pypi.

I am calling my solver simply as solver = pu.apis.HiGHS( msg=True, )

@pchtsp
Copy link
Collaborator Author

pchtsp commented Mar 21, 2024

I added a comment in highspy repo. Feel free to leave a comment there or create a new issue there: ERGO-Code/HiGHS#1633

@jajhall
Copy link

jajhall commented Mar 21, 2024

The current pypi version of HiGHS is still the rogue v1.5.3 in which setLogCallback was deleted from highspy.

However, v1.7.1.dev1 is now available. This allows the new general callback mechanism to be used.

It would be good if this beta release could be tested

or would you know a way to provide logs without using this functionality?

See https://ergo-code.github.io/HiGHS/dev/interfaces/python/#Logging

@HAHHHD
Copy link

HAHHHD commented Apr 27, 2024

@jajhall I've intalled the lastest v1.7.1.dev1, but when I want to warmstart an LP with an initial basis it shows "AttributeError: 'Highs' object has no attribute 'setBasis'". Is setBasis() still not included in this highspy version?

@jajhall
Copy link

jajhall commented Apr 27, 2024

No, sorry, I discovered yesterday that I forgot to write a binding for setBasis. It's now an issue #1733 on GitHub, so it will certainly be in the next release of highspy

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

No branches or pull requests

4 participants