File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change 1
1
name = " ApplicationDrivenLearning"
2
2
uuid = " 0856f1c8-ef17-4e14-9230-2773e47a789e"
3
3
authors = [" Giovanni Amorim" , " Joaquim Garcia" ]
4
- version = " 0.1.2 "
4
+ version = " 0.1.3 "
5
5
6
6
[deps ]
7
7
BilevelJuMP = " 485130c0-026e-11ea-0f1a-6992cd14145c"
Original file line number Diff line number Diff line change @@ -72,7 +72,8 @@ function train_with_gradient!(
72
72
# store and print cost
73
73
trace[epoch] = C
74
74
if verbose
75
- println (" Epoch $epoch | Cost = $(round (C, digits= 2 )) " )
75
+ dtime = time () - start_time
76
+ println (" Epoch $epoch | Time = $(round (dtime, digits= 1 )) s | Cost = $(round (C, digits= 2 )) " )
76
77
end
77
78
78
79
# evaluate if best model
Original file line number Diff line number Diff line change @@ -106,7 +106,8 @@ function train_with_gradient_mpi!(
106
106
# store and print cost
107
107
trace[epoch] = curr_C
108
108
if verbose
109
- println (" Epoch $epoch | Cost = $(round (curr_C, digits= 2 )) " )
109
+ dtime = time () - start_time
110
+ println (" Epoch $epoch | Time = $(round (dtime, digits= 1 )) s | Cost = $(round (curr_C, digits= 2 )) " )
110
111
end
111
112
112
113
# evaluate if best model
@@ -129,6 +130,9 @@ function train_with_gradient_mpi!(
129
130
is_done = true
130
131
MPI. bcast (is_done, MPI. COMM_WORLD)
131
132
133
+ # fix best model
134
+ apply_params (model. forecast, best_θ)
135
+
132
136
elseif JQM. is_worker_process ()
133
137
# continuoslly call pmap until controller is done
134
138
while true
You can’t perform that action at this time.
0 commit comments