mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 01:18:52 -06:00
BenchmarkRunner.fit: Only iterate through files twice
This commit is contained in:
@@ -58,7 +58,7 @@ def test_learning_solver(
|
||||
assert after_lp.lp_solve.lp_log is not None
|
||||
assert len(after_lp.lp_solve.lp_log) > 100
|
||||
|
||||
solver.fit([instance])
|
||||
solver.fit([instance], n_jobs=4)
|
||||
solver.solve(instance)
|
||||
|
||||
# Assert solver is picklable
|
||||
|
||||
@@ -28,7 +28,7 @@ def test_benchmark() -> None:
|
||||
"Strategy B": LearningSolver(),
|
||||
}
|
||||
benchmark = BenchmarkRunner(test_solvers)
|
||||
benchmark.fit(train_instances) # type: ignore
|
||||
benchmark.fit(train_instances, n_jobs=n_jobs) # type: ignore
|
||||
benchmark.parallel_solve(
|
||||
test_instances, # type: ignore
|
||||
n_jobs=n_jobs,
|
||||
|
||||
Reference in New Issue
Block a user