Spaces:
Runtime error
Runtime error
Disallow `None` values in `compute_elo`
Browse files- background_task.py +1 -1
background_task.py
CHANGED
@@ -99,7 +99,7 @@ class Matchmaking:
|
|
99 |
model1 = self.find_model(model1[0], model1[1])
|
100 |
model2 = self.find_model(model2[0], model2[1])
|
101 |
result = row["result"]
|
102 |
-
if model1 is not None
|
103 |
self.compute_elo(model1, model2, row["result"])
|
104 |
self.matches["model1"].append(model1.author + "/" + model1.name)
|
105 |
self.matches["model2"].append(model2.author + "/" + model2.name)
|
|
|
99 |
model1 = self.find_model(model1[0], model1[1])
|
100 |
model2 = self.find_model(model2[0], model2[1])
|
101 |
result = row["result"]
|
102 |
+
if model1 is not None and model2 is not None:
|
103 |
self.compute_elo(model1, model2, row["result"])
|
104 |
self.matches["model1"].append(model1.author + "/" + model1.name)
|
105 |
self.matches["model2"].append(model2.author + "/" + model2.name)
|