mirror of
https://github.com/ANL-CEEESA/MIPLearn.git
synced 2025-12-06 09:28:51 -06:00
Increase training time limit
This commit is contained in:
@@ -27,12 +27,14 @@ logging.basicConfig(format='%(asctime)s %(levelname).1s %(name)s: %(message)12s'
|
|||||||
datefmt='%H:%M:%S',
|
datefmt='%H:%M:%S',
|
||||||
level=logging.INFO,
|
level=logging.INFO,
|
||||||
stream=sys.stdout)
|
stream=sys.stdout)
|
||||||
|
logging.getLogger('gurobipy').setLevel(logging.ERROR)
|
||||||
logging.getLogger('pyomo.core').setLevel(logging.ERROR)
|
logging.getLogger('pyomo.core').setLevel(logging.ERROR)
|
||||||
logging.getLogger('miplearn').setLevel(logging.INFO)
|
logging.getLogger('miplearn').setLevel(logging.INFO)
|
||||||
logger = logging.getLogger("benchmark")
|
logger = logging.getLogger("benchmark")
|
||||||
|
|
||||||
n_jobs = 10
|
n_jobs = 10
|
||||||
time_limit = 900
|
test_time_limit = 3600
|
||||||
|
train_time_limit = 900
|
||||||
internal_solver = "gurobi"
|
internal_solver = "gurobi"
|
||||||
|
|
||||||
args = docopt(__doc__)
|
args = docopt(__doc__)
|
||||||
@@ -58,7 +60,7 @@ def train():
|
|||||||
challenge = getattr(pkg, challenge_name)()
|
challenge = getattr(pkg, challenge_name)()
|
||||||
train_instances = challenge.training_instances
|
train_instances = challenge.training_instances
|
||||||
test_instances = challenge.test_instances
|
test_instances = challenge.test_instances
|
||||||
solver = LearningSolver(time_limit=time_limit,
|
solver = LearningSolver(time_limit=train_time_limit,
|
||||||
solver=internal_solver,
|
solver=internal_solver,
|
||||||
components={})
|
components={})
|
||||||
solver.parallel_solve(train_instances, n_jobs=n_jobs)
|
solver.parallel_solve(train_instances, n_jobs=n_jobs)
|
||||||
@@ -70,7 +72,7 @@ def test_baseline():
|
|||||||
test_instances = load("%s/test_instances.bin" % basepath)
|
test_instances = load("%s/test_instances.bin" % basepath)
|
||||||
solvers = {
|
solvers = {
|
||||||
"baseline": LearningSolver(
|
"baseline": LearningSolver(
|
||||||
time_limit=time_limit,
|
time_limit=test_time_limit,
|
||||||
solver=internal_solver,
|
solver=internal_solver,
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
@@ -85,11 +87,11 @@ def test_ml():
|
|||||||
test_instances = load("%s/test_instances.bin" % basepath)
|
test_instances = load("%s/test_instances.bin" % basepath)
|
||||||
solvers = {
|
solvers = {
|
||||||
"ml-exact": LearningSolver(
|
"ml-exact": LearningSolver(
|
||||||
time_limit=time_limit,
|
time_limit=test_time_limit,
|
||||||
solver=internal_solver,
|
solver=internal_solver,
|
||||||
),
|
),
|
||||||
"ml-heuristic": LearningSolver(
|
"ml-heuristic": LearningSolver(
|
||||||
time_limit=time_limit,
|
time_limit=test_time_limit,
|
||||||
solver=internal_solver,
|
solver=internal_solver,
|
||||||
mode="heuristic",
|
mode="heuristic",
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user