File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -212,7 +212,7 @@ def evaluate_detection_coco(
212212
213213
214214 if i == 0 : # for sotabench.com caching of evaluation
215- run_hash = calculate_run_hash (result , original_output )
215+ run_hash = calculate_run_hash ([] , original_output )
216216 # if we are in check model we don't need to go beyond the first
217217 # batch
218218 if in_check_mode ():
Original file line number Diff line number Diff line change @@ -131,7 +131,13 @@ def calculate_run_hash(metrics: list, output: torch.Tensor):
131131 output: output from the model for a given batch of data.
132132 """
133133
134- hash_list = metrics + np .round (output .cpu ().numpy (), 3 ).tolist ()
134+ if isinstance (output , dict ):
135+ output = list (output )
136+
137+ if not isinstance (output , list ):
138+ output = np .round (output .cpu ().numpy (), 3 ).tolist ()
139+
140+ hash_list = metrics + output
135141 m = hashlib .sha256 ()
136142 m .update (str (hash_list ).encode ("utf-8" ))
137143 return m .hexdigest ()
You can’t perform that action at this time.
0 commit comments