Disable precompilation

dev
Alinson S. Xavier 10 months ago
parent 20a7cfb42d
commit 672bb220c1

@ -37,48 +37,48 @@ include("Cuts/Cuts.jl")
# Precompilation # Precompilation
# ============================================================================= # =============================================================================
function __precompile_cuts__() # function __precompile_cuts__()
function build_model(mps_filename) # function build_model(mps_filename)
model = read_from_file(mps_filename) # model = read_from_file(mps_filename)
set_optimizer(model, SCIP.Optimizer) # set_optimizer(model, SCIP.Optimizer)
return JumpModel(model) # return JumpModel(model)
end # end
BASEDIR = dirname(@__FILE__) # BASEDIR = dirname(@__FILE__)
mps_filename = "$BASEDIR/../test/fixtures/bell5.mps.gz" # mps_filename = "$BASEDIR/../test/fixtures/bell5.mps.gz"
h5_filename = "$BASEDIR/../test/fixtures/bell5.h5" # h5_filename = "$BASEDIR/../test/fixtures/bell5.h5"
collect_gmi_dual( # collect_gmi_dual(
mps_filename; # mps_filename;
optimizer=HiGHS.Optimizer, # optimizer=HiGHS.Optimizer,
max_rounds = 10, # max_rounds = 10,
max_cuts_per_round = 500, # max_cuts_per_round = 500,
) # )
knn = KnnDualGmiComponent( # knn = KnnDualGmiComponent(
extractor = H5FieldsExtractor(instance_fields = ["static_var_obj_coeffs"]), # extractor = H5FieldsExtractor(instance_fields = ["static_var_obj_coeffs"]),
k = 2, # k = 2,
) # )
knn.fit([h5_filename, h5_filename]) # knn.fit([h5_filename, h5_filename])
solver = LearningSolver( # solver = LearningSolver(
components = [ # components = [
ExpertPrimalComponent(action = SetWarmStart()), # ExpertPrimalComponent(action = SetWarmStart()),
knn, # knn,
], # ],
skip_lp = true, # skip_lp = true,
) # )
solver.optimize(mps_filename, build_model) # solver.optimize(mps_filename, build_model)
end # end
@setup_workload begin # @setup_workload begin
using SCIP # using SCIP
using HiGHS # using HiGHS
using MIPLearn.Cuts # using MIPLearn.Cuts
using PrecompileTools: @setup_workload, @compile_workload # using PrecompileTools: @setup_workload, @compile_workload
__init__() # __init__()
Cuts.__init__() # Cuts.__init__()
@compile_workload begin # @compile_workload begin
__precompile_cuts__() # __precompile_cuts__()
end # end
end # end
end # module end # module

Loading…
Cancel
Save