idolezal commited on
Commit
952f194
β€’
1 Parent(s): 02fb365

Fixed critical section

Browse files
Files changed (1) hide show
  1. server.py +5 -5
server.py CHANGED
@@ -635,9 +635,9 @@ class LeaderboardServer:
635
  )
636
 
637
  def get_model_detail(self, submission_id):
638
- if submission_id not in self.submission_id_to_data:
639
- raise gr.Error(f"Submission [{submission_id}] not found")
640
- else:
641
- with self.var_lock.ro:
642
  data = self.submission_id_to_data[submission_id]
643
- return data["metadata"]
 
635
  )
636
 
637
  def get_model_detail(self, submission_id):
638
+ with self.var_lock.ro:
639
+ if submission_id not in self.submission_id_to_data:
640
+ raise gr.Error(f"Submission [{submission_id}] not found")
641
+ else:
642
  data = self.submission_id_to_data[submission_id]
643
+ return data["metadata"]