Skip to main content

Parse MIP/LP solver log files (Gurobi, Xpress, SCIP, HiGHS, COPT, …) into a unified, serde-serializable schema.

Project description

miplog

Parse MIP/LP solver log files into a unified, machine-readable format.

Every solver writes its log differently — different column names, different ways to say "optimal", different units. miplog reads any supported solver's log and gives you back the same shape, so you can analyze runs across solvers without writing one parser per format.

Supported solvers: SCIP 10–11, Gurobi 11–13, Xpress 9, HiGHS 1.12–14, CPLEX 12.7–12.8, CBC 2.9, COPT 8.0, OptVerse 2.0, Mosek 11.0.

Python

pip install miplog
import miplog

log = miplog.parse_file("run.log.gz")   # plain or gzipped, solver auto-detected
print(log["solver"], log["termination"]["status"])
print(f"obj = {log['bounds']['primal']}, gap = {log['bounds']['gap']}")

# B&B progress is stored columnar — drop straight into pandas/numpy
import pandas as pd
df = pd.DataFrame(log["progress"])

Available functions: parse_file(path, solver=None), parse_text(text), split_concatenated(text) for Mittelmann-style bundled runs.

Command line

Requires the Rust toolchain (install via rustup.rs):

cargo install miplog
miplog run.log                    # human-readable summary
miplog run.log --format json      # machine-readable JSON
miplog run.log -o run.json.gz     # compressed archive (extension-inferred)
cat run.log | miplog -            # stdin works too

Sample summary output:

solver: scip 11.0.0
problem: p0201
status: optimal in 0.55s
obj: 7615
sols: 13
presolve: 133→107 rows, 201→183 cols
convergence: ██▄▄▄▄▂▂▂▂▂▂▂▂▁▁▁▁▁▁

Rust

use miplog::{autodetect, input};

let text = input::read_file("run.log.gz")?;  // plain or gzipped
let log = autodetect(&text)?;                // solver auto-detected
println!("{log}");
# Ok::<(), Box<dyn std::error::Error>>(())

Full API reference: docs.rs/miplog.

License

MIT OR Apache-2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

miplog-0.1.0.tar.gz (153.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

miplog-0.1.0-cp38-abi3-win_amd64.whl (991.3 kB view details)

Uploaded CPython 3.8+Windows x86-64

miplog-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ x86-64

miplog-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (1.2 MB view details)

Uploaded CPython 3.8+manylinux: glibc 2.17+ ARM64

miplog-0.1.0-cp38-abi3-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.8+macOS 11.0+ ARM64

miplog-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.8+macOS 10.12+ x86-64

File details

Details for the file miplog-0.1.0.tar.gz.

File metadata

  • Download URL: miplog-0.1.0.tar.gz
  • Upload date:
  • Size: 153.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miplog-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6a953cb0203ed2e637a9a6338ac320b3157a59649da9c8d7193346d06a7b7e73
MD5 0331d073a35227c0e9bf86c2a75ec929
BLAKE2b-256 8ed7e312c211dde33796c03ce65a88c63a49dd5f1844b0fbaf0a516f67e1cbb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0.tar.gz:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miplog-0.1.0-cp38-abi3-win_amd64.whl.

File metadata

  • Download URL: miplog-0.1.0-cp38-abi3-win_amd64.whl
  • Upload date:
  • Size: 991.3 kB
  • Tags: CPython 3.8+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for miplog-0.1.0-cp38-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 577719c0e076e5d4e6386add255c2f85662f88a02f1f7b99baf65e2c66a1ba83
MD5 9c6a03147775ebfe704f587487546816
BLAKE2b-256 f4e28f134f9c25c35c8cc32b9f5eb630bb62ab332b9ecf203ae3d2d85a6a2cd4

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0-cp38-abi3-win_amd64.whl:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miplog-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miplog-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 708ef900de5a6e2ba7845f25f638cf5c5bceab62ce82da9130e3a3dbd2c53f4e
MD5 74930d2964ea1e15658eda91bc9bd8f7
BLAKE2b-256 29615636cc9bca522c74149b6a76add718776f4f40df9ebf0409dbdff404bdb5

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miplog-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for miplog-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 51dbd80603355d6945729e1187d6ada9f156d698def216f7f00fa27634c5cc8c
MD5 0faf4e46775355cfd92411dad45cf7bd
BLAKE2b-256 17e97b0d2d1911f48103bc835c6e72929cff21a506411b8f25d5bce6738ccd28

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miplog-0.1.0-cp38-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for miplog-0.1.0-cp38-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 6fdb0001a54fb44244e8f267bf43fd7096e5ddbcb8af292c71d0e3261eaed301
MD5 dbc001ad57408fa0ad61032f716bc768
BLAKE2b-256 07da408f8b040276a98527aefec3a0382475520c8e4c5d1c0e2697feef039e01

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0-cp38-abi3-macosx_11_0_arm64.whl:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file miplog-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for miplog-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 f365e42f780f4771b17cbc751641c42437593014907089ce9bcd73502225ec62
MD5 0895bf6a9e664e713c9104c340d6601d
BLAKE2b-256 cec8a8c7b6b81d1dff1c2878d0e92a68a05e65136f63e0e02c84898f9126df9a

See more details on using hashes here.

Provenance

The following attestation bundles were made for miplog-0.1.0-cp38-abi3-macosx_10_12_x86_64.whl:

Publisher: wheels.yml on mmghannam/miplog

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page