-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix benchmarks * Don't ignore png * Remove JOSS * Commit benchmark manifest * Remove Pkg business * Fix paths
- Loading branch information
Showing
18 changed files
with
151 additions
and
139 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,5 +23,4 @@ scratchpad.jl | |
/docs/src/index.md | ||
/docs/src/examples/*.md | ||
|
||
*.png | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
using Pkg | ||
Pkg.activate(joinpath(@__DIR__, "..")) | ||
Pkg.develop(; path=joinpath(@__DIR__, "..", "..", "..")) | ||
Pkg.develop(; path=joinpath(@__DIR__, "..", "..", "HMMBenchmark")) | ||
|
||
@assert Base.Threads.nthreads() == 1 | ||
|
||
# see https://superfastpython.com/numpy-number-blas-threads/ | ||
ENV["MKL_NUM_THREADS"] = 1 | ||
ENV["NUMEXPR_NUM_THREADS"] = 1 | ||
ENV["OMP_NUM_THREADS"] = 1 | ||
ENV["OPENBLAS_NUM_THREADS"] = 1 | ||
ENV["VECLIB_MAXIMUM_THREADS"] = 1 | ||
|
||
# see https://github.com/google/jax/issues/743 | ||
ENV["XLA_FLAGS"] = "--xla_cpu_multi_thread_eigen=false intra_op_parallelism_threads=1" | ||
|
||
using BenchmarkTools | ||
using LinearAlgebra | ||
using PythonCall # Python process starts now | ||
using StableRNGs | ||
using HMMComparison | ||
|
||
# see https://pytorch.org/docs/stable/generated/torch.set_num_threads.html | ||
pyimport("torch").set_num_threads(1) | ||
|
||
rng = StableRNG(63) | ||
|
||
print_julia_setup(joinpath(@__DIR__, "results", "julia_setup.txt")) | ||
print_python_setup(joinpath(@__DIR__, "results", "python_setup.txt")) | ||
|
||
implems = [ | ||
HiddenMarkovModelsImplem(), # | ||
HMMBaseImplem(), # | ||
hmmlearnImplem(), # | ||
pomegranateImplem(), # | ||
dynamaxImplem(), # | ||
] | ||
|
||
algos = ["forward", "viterbi", "forward_backward", "baum_welch"] | ||
|
||
instances = Instance[] | ||
|
||
for nb_states in 2:2:16 | ||
push!( | ||
instances, | ||
Instance(; | ||
custom_dist=true, | ||
sparse=false, | ||
nb_states=nb_states, | ||
obs_dim=1, | ||
seq_length=200, | ||
nb_seqs=100, | ||
bw_iter=5, | ||
), | ||
) | ||
end | ||
|
||
SUITE = define_suite(rng, implems; instances, algos) | ||
|
||
results = BenchmarkTools.run(SUITE; verbose=true) | ||
data = parse_results(results; path=joinpath(@__DIR__, "results", "results.csv")) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Oops, something went wrong.