mowl.benchmarks
The mOWL benchmark set.
Benchmarks (dataset + task + evaluation protocol) and the results published for them in
the literature, so that any method of mowl.catalog can be run on a benchmark and
compared against published numbers.
from mowl.benchmarks import list_benchmarks, published_results
for b in list_benchmarks(task="deductive_inference"):
print(b.key, b.name)
for r in published_results(benchmark="box2el-go-inference"):
print(r.method, r.metrics, r.source.key, r.locator)
Listing benchmarks and published results does not need the JVM.
Functions
|
Return the benchmark registered under |
|
Return all benchmarks, optionally only those of one |
|
Return published results, optionally filtered by benchmark, method and subset. |
|
The recipe of |
|
Recipes, optionally filtered by benchmark key, method key, source key and name. |
Classes
|
Evaluation tasks. |
|
A benchmark: dataset, task and protocol. |
|
One published result: a method on a benchmark, as printed in a paper. |
|
How a publication trained a method for a benchmark. |
Class Inheritance Diagram

mowl.benchmarks.runner
Run a method on a benchmark and compare the result with the published numbers.
from mowl.benchmarks.runner import run_benchmark, compare
result = run_benchmark("box2el-galen-prediction", method="box2el",
model_kwargs={"embed_dim": 200}, epochs=1000, seed=0,
device="cuda")
result.save("result.json")
for row in compare(result):
print(row["subset"], row["metric"], row["ours"], row["published"])
The same is available from the command line (python -m mowl.benchmarks). Runs are
deterministic for a given seed on a given device and software stack: Python’s, NumPy’s
and PyTorch’s generators are seeded, and PyTorch’s deterministic algorithms are requested
(warn_only; some CUDA kernels have no deterministic variant).
Functions
|
Add a |
|
Return the |
|
Seed Python, NumPy and PyTorch (CPU and CUDA). |
Package version, git commit and versions of the main dependencies. |
|
|
An instance of |
|
Train a method on a benchmark and evaluate it with the benchmark's protocol. |
|
Settings stated by the publication that differ from (or are absent in) ours, as |
|
Compare a result with the published numbers of its benchmark. |
Classes
The model cannot be run on the benchmark (no family handler applies). |
|
|
Outcome of |
How the runner builds and trains models of one base class. |
|
|
|
Class Inheritance Diagram
