Spaces:
Runtime error
Runtime error
Add env data to MM
Browse files
main.py
CHANGED
|
@@ -27,8 +27,9 @@ class Matchmaking:
|
|
| 27 |
:param max_diff: Maximum difference considered between two models' elo
|
| 28 |
:param matches: Dictionary containing the match history (to later upload as CSV)
|
| 29 |
"""
|
| 30 |
-
def __init__(self, models):
|
| 31 |
self.models = models
|
|
|
|
| 32 |
self.queue = self.models.copy()
|
| 33 |
self.k = 20
|
| 34 |
self.max_diff = 500
|
|
@@ -95,7 +96,7 @@ class Matchmaking:
|
|
| 95 |
df = pd.concat([df, pd.DataFrame([[model.name, model.elo]], columns=['name', 'elo'])])
|
| 96 |
df.to_csv('elo.csv', index=False)
|
| 97 |
df_matches = pd.DataFrame(self.matches)
|
| 98 |
-
df_matches.to_csv(f"matches/{datetime.now().strftime('%Y-%m-%d_%H-%M-%S_%f')}.csv", index=False)
|
| 99 |
|
| 100 |
|
| 101 |
def match(model1, model2) -> float:
|
|
|
|
| 27 |
:param max_diff: Maximum difference considered between two models' elo
|
| 28 |
:param matches: Dictionary containing the match history (to later upload as CSV)
|
| 29 |
"""
|
| 30 |
+
def __init__(self, models, env):
|
| 31 |
self.models = models
|
| 32 |
+
self.env = env
|
| 33 |
self.queue = self.models.copy()
|
| 34 |
self.k = 20
|
| 35 |
self.max_diff = 500
|
|
|
|
| 96 |
df = pd.concat([df, pd.DataFrame([[model.name, model.elo]], columns=['name', 'elo'])])
|
| 97 |
df.to_csv('elo.csv', index=False)
|
| 98 |
df_matches = pd.DataFrame(self.matches)
|
| 99 |
+
df_matches.to_csv(f"matches/{self.env}__{datetime.now().strftime('%Y-%m-%d_%H-%M-%S_%f')}.csv", index=False)
|
| 100 |
|
| 101 |
|
| 102 |
def match(model1, model2) -> float:
|