Spaces:
Running
on
Zero
Running
on
Zero
fix bug
Browse files- model/matchmaker.py +1 -1
- serve/update_skill.py +1 -10
model/matchmaker.py
CHANGED
@@ -5,7 +5,7 @@ import paramiko
|
|
5 |
import io, os
|
6 |
import sys
|
7 |
sys.path.append('../')
|
8 |
-
from serve.constants import SSH_SERVER, SSH_PORT, SSH_USER, SSH_PASSWORD, SSH_SKILL
|
9 |
|
10 |
|
11 |
trueskill_env = TrueSkill()
|
|
|
5 |
import io, os
|
6 |
import sys
|
7 |
sys.path.append('../')
|
8 |
+
from serve.constants import SSH_SERVER, SSH_PORT, SSH_USER, SSH_PASSWORD, SSH_SKILL
|
9 |
|
10 |
|
11 |
trueskill_env = TrueSkill()
|
serve/update_skill.py
CHANGED
@@ -4,7 +4,7 @@ from trueskill import TrueSkill
|
|
4 |
import paramiko
|
5 |
import io, os
|
6 |
import sys
|
7 |
-
from serve.constants import SSH_SERVER, SSH_PORT, SSH_USER, SSH_PASSWORD, SSH_SKILL
|
8 |
trueskill_env = TrueSkill()
|
9 |
|
10 |
class Model_ID(object):
|
@@ -56,15 +56,6 @@ def load_json_via_sftp():
|
|
56 |
return ratings, comparison_counts, total_comparisons
|
57 |
|
58 |
|
59 |
-
def load_modelid_via_sftp():
|
60 |
-
ssh = create_ssh_client(SSH_SERVER, SSH_PORT, SSH_USER, SSH_PASSWORD)
|
61 |
-
sftp = ssh.open_sftp()
|
62 |
-
with sftp.open(SSH_SKILL_M, 'r') as f:
|
63 |
-
data = json.load(f)
|
64 |
-
model_ids = data['model_ids']
|
65 |
-
return model_ids
|
66 |
-
|
67 |
-
|
68 |
def update_skill(rank, k_group=4):
|
69 |
|
70 |
ratings, comparison_counts, total_comparisons = load_json_via_sftp()
|
|
|
4 |
import paramiko
|
5 |
import io, os
|
6 |
import sys
|
7 |
+
from serve.constants import SSH_SERVER, SSH_PORT, SSH_USER, SSH_PASSWORD, SSH_SKILL
|
8 |
trueskill_env = TrueSkill()
|
9 |
|
10 |
class Model_ID(object):
|
|
|
56 |
return ratings, comparison_counts, total_comparisons
|
57 |
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
def update_skill(rank, k_group=4):
|
60 |
|
61 |
ratings, comparison_counts, total_comparisons = load_json_via_sftp()
|