
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Extract information from Gurobi log files and generate pandas DataFrames or Excel worksheets for further processing. Also includes a wrapper for out-of-the-box interactive visualizations using the plotting library Plotly.
[!NOTE] We have renamed the project to
gurobi-logtools
, so please also adapt the import statement accordingly:
import gurobi_logtools as glt
python -m pip install gurobi-logtools
It is recommended to prepend the pip install
command with python -m
to ensure that the package is installed using the correct Python version currently active in your environment.
See CHANGELOG for added, removed or fixed functionality.
First, you need a set of Gurobi log files to compare, e.g.,
You may also use the provided gurobi-logtools.ipynb notebook with the example data set to get started. Additionally, there is a Gurobi TechTalk demonstrating how to use it (YouTube):
parse log files:
import gurobi_logtools as glt
results = glt.parse(["run1/*.log", "run2/*.log"])
summary = results.summary()
nodelog_progress = results.progress("nodelog")
Depending on your requirements, you may need to filter or modify the resulting DataFrames.
draw interactive charts, preferably in a Jupyter Notebook:
glt.plot(summary, type="box")
glt.plot(nodelog_progress, y="Gap", color="Log", type="line")
glt.plot(results.progress("norel"), x="Time", y="Incumbent", color="Log", type="line")
These are just examples using the Plotly Python library - of course, any other plotting library of your choice can be used to work with these DataFrames.
Convert your log files to Excel worksheets right on the command-line:
python -m gurobi_logtools myrun.xlsx data/*.log
List all available options and how to use the command-line tool:
python -m gurobi_logtools --help
The command line tool can also rename log files according to the parameters set and model solved in a given run. This is useful if your log files do not have a consistent naming scheme, or if multiple runs are logged per file and you want to extract the individual runs.
For example:
python -m gurobi_logtools --write-to-dir nicenames summary.xlsx tests/assets/combined/*.log
separates logs for individual runs in the input files and writes copies to the 'nicenames' folder with a consistent naming scheme:
> ls nicenames
912-MIPFocus1-Presolve1-TimeLimit600-glass4-0.log
912-MIPFocus1-Presolve1-TimeLimit600-glass4-1.log
912-MIPFocus1-Presolve1-TimeLimit600-glass4-2.log
912-MIPFocus2-Presolve1-TimeLimit600-glass4-0.log
912-MIPFocus2-Presolve1-TimeLimit600-glass4-1.log
912-MIPFocus2-Presolve1-TimeLimit600-glass4-2.log
912-Presolve1-TimeLimit600-glass4-0.log
912-Presolve1-TimeLimit600-glass4-1.log
912-Presolve1-TimeLimit600-glass4-2.log
FAQs
Gurobi log file tools for parsing and exploring data
We found that gurobi-logtools demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.