@@ -54,7 +54,7 @@ var rankingCmd = &cobra.Command{
54
54
defer col .Close ()
55
55
56
56
// Get submissions
57
- var rankings model.Fa2017Ece408Jobs
57
+ var jobs model.Fa2017Ece408Jobs
58
58
// cond := upper.Or(
59
59
// upper.Cond{
60
60
// "model": "ece408-high",
@@ -68,13 +68,13 @@ var rankingCmd = &cobra.Command{
68
68
69
69
condInferencesExist := upper.Cond {"inferences.0 $exists" : "true" }
70
70
71
- err = col .Find (condInferencesExist , 0 , 0 , & rankings )
71
+ err = col .Find (condInferencesExist , 0 , 0 , & jobs )
72
72
if err != nil {
73
73
return err
74
74
}
75
75
76
76
// keep only jobs with correct inferences
77
- jobs : = model .FilterCorrectInferences (rankings )
77
+ jobs = model .FilterCorrectInferences (jobs )
78
78
79
79
// keep only jobs with non-zero runtimes
80
80
jobs = model .FilterNonZeroTimes (jobs )
@@ -101,7 +101,7 @@ var rankingCmd = &cobra.Command{
101
101
table := tablewriter .NewWriter (os .Stdout )
102
102
table .SetHeader ([]string {"Anonymized Team" , "Team's Fastest Conv (ms)" })
103
103
for _ , j := range jobs {
104
- table .Append ([]string {j .Teamname , strconv .FormatInt ( int64 (j .MinOpRuntime ()/ time .Millisecond ), 10 )})
104
+ table .Append ([]string {j .Teamname , strconv .FormatFloat ( float64 (j .MinOpRuntime ()) / float64 ( time .Millisecond ), 'f' , - 1 , 64 )})
105
105
}
106
106
107
107
table .Render ()
0 commit comments