idolezal commited on
Commit
1405ed9
β€’
1 Parent(s): c164d65

Better check significance server reachable test

Browse files
Files changed (1) hide show
  1. server.py +7 -15
server.py CHANGED
@@ -12,7 +12,6 @@ else:
12
  print(f"{os.environ.get('CURL_CA_BUNDLE') = }")
13
  print(f"{os.environ.get('REQUESTS_CA_BUNDLE') = }")
14
 
15
- import tempfile
16
  import hashlib
17
  import time
18
  from datetime import datetime, timezone
@@ -65,20 +64,13 @@ class CheckSignificanceError(Exception):
65
  pass
66
 
67
  def check_significance_is_reachable():
68
- with (
69
- tempfile.NamedTemporaryFile() as model_a_fp,
70
- tempfile.NamedTemporaryFile() as model_b_fp,
71
- ):
72
- model_a_path = model_a_fp.name
73
- model_b_path = model_b_fp.name
74
-
75
- try:
76
- check_significance_send_task(model_a_path, model_b_path)
77
- except CheckSignificanceError:
78
- pass
79
- except:
80
- return False
81
- return True
82
 
83
  def check_significance_send_task(model_a_path, model_b_path):
84
  url = 'https://czechllm.fit.vutbr.cz/benczechmark-leaderboard/compare_significance/'
 
12
  print(f"{os.environ.get('CURL_CA_BUNDLE') = }")
13
  print(f"{os.environ.get('REQUESTS_CA_BUNDLE') = }")
14
 
 
15
  import hashlib
16
  import time
17
  from datetime import datetime, timezone
 
64
  pass
65
 
66
  def check_significance_is_reachable():
67
+ result_url = 'https://czechllm.fit.vutbr.cz/benczechmark-leaderboard/compare_significance/results/test'
68
+
69
+ try:
70
+ check_significance_wait_for_result(result_url)
71
+ except:
72
+ return False
73
+ return True
 
 
 
 
 
 
 
74
 
75
  def check_significance_send_task(model_a_path, model_b_path):
76
  url = 'https://czechllm.fit.vutbr.cz/benczechmark-leaderboard/compare_significance/'