Skip to content

Commit 9b84336

Browse files
committed
Show fractional times in rai ranking
1 parent 0ed7980 commit 9b84336

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cmd/ranking.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ var rankingCmd = &cobra.Command{
5454
defer col.Close()
5555

5656
// Get submissions
57-
var rankings model.Fa2017Ece408Jobs
57+
var jobs model.Fa2017Ece408Jobs
5858
// cond := upper.Or(
5959
// upper.Cond{
6060
// "model": "ece408-high",
@@ -68,13 +68,13 @@ var rankingCmd = &cobra.Command{
6868

6969
condInferencesExist := upper.Cond{"inferences.0 $exists": "true"}
7070

71-
err = col.Find(condInferencesExist, 0, 0, &rankings)
71+
err = col.Find(condInferencesExist, 0, 0, &jobs)
7272
if err != nil {
7373
return err
7474
}
7575

7676
// keep only jobs with correct inferences
77-
jobs := model.FilterCorrectInferences(rankings)
77+
jobs = model.FilterCorrectInferences(jobs)
7878

7979
// keep only jobs with non-zero runtimes
8080
jobs = model.FilterNonZeroTimes(jobs)
@@ -101,7 +101,7 @@ var rankingCmd = &cobra.Command{
101101
table := tablewriter.NewWriter(os.Stdout)
102102
table.SetHeader([]string{"Anonymized Team", "Team's Fastest Conv (ms)"})
103103
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)})
105105
}
106106

107107
table.Render()

0 commit comments

Comments
 (0)