From 343afaeec0e4f0391d5f4d8a5261e386034ded81 Mon Sep 17 00:00:00 2001 From: "Alinson S. Xavier" Date: Wed, 26 May 2021 09:49:58 -0500 Subject: [PATCH] Fix MyPy errors --- miplearn/solvers/learning.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/miplearn/solvers/learning.py b/miplearn/solvers/learning.py index f64b7fb..0f0926c 100644 --- a/miplearn/solvers/learning.py +++ b/miplearn/solvers/learning.py @@ -184,6 +184,7 @@ class LearningSolver: logger.info("Solving root LP relaxation...") lp_stats = self.internal_solver.solve_lp(tee=tee) stats.update(cast(LearningSolveStats, lp_stats.__dict__)) + assert lp_stats.lp_wallclock_time is not None logger.info( "LP relaxation solved in %.2f seconds" % lp_stats.lp_wallclock_time ) @@ -250,6 +251,7 @@ class LearningSolver: user_cut_cb=user_cut_cb, lazy_cb=lazy_cb, ) + assert mip_stats.mip_wallclock_time is not None logger.info("MIP solved in %.2f seconds" % mip_stats.mip_wallclock_time) stats.update(cast(LearningSolveStats, mip_stats.__dict__)) stats["Solver"] = "default"