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
import errors and segmentation fault with highspy-1.7.1.dev1 and examples/call_highs_from_python.py #1728
Comments
I've tested
this (on Linux) and it runs fine |
Can I ask what version of Python highspy you are testing this with? I just tried again on a different machine, and still get the initial Is it possible that this is happening because I'm installing highspy from pypi? Do I need to run |
Let me test these on my linux as well. highspy.cb is the callback module, which we have yet to test more extensively. |
I tested this locally and, with the example code from our latest branch and highspy from pypi, I get a different error. It is best to use the examples/ code corresponding to the highspy version you are using. If you want to install highspy from source, it is not necessary to install highs with cmake beforehand. It is enough to call pip install . from the HiGHS/ directory, and this would build highs and the bindings, wrapped up in the highspy package. For call_highs_from_python.py, this example loads a file from the check/ subdir and it should be run from the root dir. Would you please check if the following steps would work? I tested this on my linux and it resolved the issue.
And then, from the root directory, call
|
Aah, I think I see. Yes, what you suggested works. I guess it may be best for me to wait until there is a semi-stable version of highspy before I delve further into using callbacks via PuLP. Thanks :) |
Yes, we are planing to include callbacks in the upcoming release of HiGHS, once we have tested a bit more and with documentation. Closing this for now, until further issues are encountered. |
I'm trying to get callbacks working with PuLP and highspy and in the processing of working out why mip_solution seems to have the wrong dimension, I fell back to
examples/call_highs_from_python.py
. However, this first gave the following issue:I can get around this by changing
import highspy.cb as hscb
tohscb = highspy.cb
but then I getI added some prints, and the segmentation fault happens on
HiGHS/examples/call_highs_from_python.py
Line 91 in 13363c9
Firstly, is my change to
hscb = highspy.cb
correct? Doescall_highs_from_python.py
work as-is for other people (using highspy-1.7.1.dev1)?The text was updated successfully, but these errors were encountered: