Hipo python docs#3024
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## latest #3024 +/- ##
=======================================
Coverage 72.80% 72.81%
=======================================
Files 417 417
Lines 102150 102150
Branches 16464 16463 -1
=======================================
+ Hits 74372 74376 +4
+ Misses 27502 27498 -4
Partials 276 276 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| @@ -0,0 +1,69 @@ | |||
| # [HiPO in Python](@id hipo-in-python) | |||
|
|
|||
| The HiPO Interior Point Method (IPM) solver currently uses external dependencies to provide enhanced performance for linear and quadratic programming problems. The required dependencies are packaged in the `highspy-extras`. The packaged dependencies have licensing terms different from HiGHS, such as Apache 2.0. Other algorithms may also rely on `highspy_extras` in the future. | |||
There was a problem hiding this comment.
I suppose highspy_extras should be highspy-extras
There was a problem hiding this comment.
Yeah, this is a good point - and is actually a slightly larger issue that's been on my mind.
If we're going to standardize, we probably should choose highspy_extras instead of highspy-extras, since import highspy-extras will give a syntax error.
Python actually treats - and _ in package names as equivalent, that is, it's valid to use pip install highspy-extras and then import highspy_extras. However, users should never have to manually import this package themselves.
Choosing highspy_extras is also consistent with the associated highs_extras library. That said, highspy-extras looks better to me as a package name (I don't know why).
Options:
- keep
highspy-extrasand refer to it everywhere ashighspy-extras(except in advanced examples involvingimport) - rename to
highspy_extrasfor consistency - rename to
highspyextrasand avoid the whole-and_weirdness.
I don't really have a strong preference, though, I'm leaning towards option 1. Thoughts @galabovaa?
There was a problem hiding this comment.
However, users should never have to manually
importthis package themselves.
Is this worth mentioning explicitly in the documentation? I'm not a Python person, so I don't know how likely users are to try importing it, receiving a syntax error.
There was a problem hiding this comment.
It certainly wouldn't hurt to explicitly mention. Possibly under ## Usage?? e.g.,
Usage
When
highspy-extrasis installed, HiGHS can use algorithms that depend on these external libraries. At present this primarily means the HiPO solver. Note thathighspy-extrasis automatically consumed byhighspyand does not need to be imported manually. You can explicitly select HiPO:
or
When
highspy-extrasis installed, HiGHS can enable algorithms that rely on these external libraries, such as the HiPO solver.highspy-extrasis automatically detected and used byhighspy, so no explicit import is required. You can select HiPO:
or something to that effect
|
|
||
| ## Usage | ||
|
|
||
| When `highspy_extras` is installed, HiGHS can use algorithms that depend on these external libraries. At present this primarily means the HiPO solver. You can explicitly select HiPO: |
There was a problem hiding this comment.
I suppose highspy_extras should be highspy-extras
| To use HiPO in Python, the additional `highspy-extras` is required. It contains the HiPO dependencies and is Apache 2.0 licensed. It can be installed with | ||
|
|
||
| ```shell | ||
| $ pip install highspy[hipo] |
There was a problem hiding this comment.
I suppose highspy[hipo] should be highspy[extras]
mathgeekcoder
left a comment
There was a problem hiding this comment.
Looks good! Just want to clarify our highspy-extras vs highspy_extras decision.
| @@ -0,0 +1,69 @@ | |||
| # [HiPO in Python](@id hipo-in-python) | |||
|
|
|||
| The HiPO Interior Point Method (IPM) solver currently uses external dependencies to provide enhanced performance for linear and quadratic programming problems. The required dependencies are packaged in the `highspy-extras`. The packaged dependencies have licensing terms different from HiGHS, such as Apache 2.0. Other algorithms may also rely on `highspy_extras` in the future. | |||
There was a problem hiding this comment.
Yeah, this is a good point - and is actually a slightly larger issue that's been on my mind.
If we're going to standardize, we probably should choose highspy_extras instead of highspy-extras, since import highspy-extras will give a syntax error.
Python actually treats - and _ in package names as equivalent, that is, it's valid to use pip install highspy-extras and then import highspy_extras. However, users should never have to manually import this package themselves.
Choosing highspy_extras is also consistent with the associated highs_extras library. That said, highspy-extras looks better to me as a package name (I don't know why).
Options:
- keep
highspy-extrasand refer to it everywhere ashighspy-extras(except in advanced examples involvingimport) - rename to
highspy_extrasfor consistency - rename to
highspyextrasand avoid the whole-and_weirdness.
I don't really have a strong preference, though, I'm leaning towards option 1. Thoughts @galabovaa?
| To install locally, you will need | ||
|
|
||
| - Python >= 3.8 | ||
| - BLAS library (bundled or system) |
There was a problem hiding this comment.
Just to clarify, for BLAS, the system requirement is only for Apple right? Since we're bundling OpenBLAS.
It is technically correct as written, but users might think they need to install additional libraries.
|
Thank you for your comments! @mathgeekcoder, I agree that
for some reason, seems most visually pleasing. I will make the corresponding updates. I did not realize that for python it does not matter. I guess I assumed that there was a reason we were using both, like the highspy_extras being a small wrapper over the C++ lib and the highspy-extras being the python package, but that seems to not be the case 😅 |
No description provided.