File tree 2 files changed +16
-0
lines changed
2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -48,3 +48,11 @@ hub definition dictionary is called ``hub_dict`` you would add
48
48
hub_dict[" opt_kwargs" ][" PHoptions" ][" initial_proximal_cut_count" ] = 4
49
49
50
50
before passing ``hub_dict `` to ``spin_the_wheel ``.
51
+
52
+
53
+ subgradient_while_waiting
54
+ -------------------------
55
+
56
+ The Lagrangian spoke has an additional argument, `subgradient_while_waiting `,
57
+ which will compute subgradient steps while it is waiting on new W's from the
58
+ hub.
Original file line number Diff line number Diff line change @@ -58,6 +58,7 @@ def main(self):
58
58
if hasattr (self .opt , 'rho_setter' ):
59
59
rho_setter = self .opt .rho_setter
60
60
extensions = self .opt .extensions is not None
61
+ verbose = self .opt .options ['verbose' ]
61
62
62
63
self .lagrangian_prep ()
63
64
@@ -86,3 +87,10 @@ def main(self):
86
87
if extensions :
87
88
self .opt .extobject .enditer_after_sync ()
88
89
self .dk_iter += 1
90
+ elif self .opt .options .get ("subgradient_while_waiting" , False ):
91
+ # compute a subgradient step
92
+ self .opt .Compute_Xbar (verbose )
93
+ self .opt .Update_W (verbose )
94
+ bound = self .lagrangian ()
95
+ if bound is not None :
96
+ self .bound = bound
You can’t perform that action at this time.
0 commit comments