XufengDuan commited on
Commit
6162a3c
1 Parent(s): 0537749

update scripts

Browse files
Files changed (2) hide show
  1. .idea/workspace.xml +16 -8
  2. app.py +9 -2
.idea/workspace.xml CHANGED
@@ -5,6 +5,7 @@
5
  </component>
6
  <component name="ChangeListManager">
7
  <list default="true" id="b60b8d5d-762f-4021-9ce4-054078cb27a7" name="Changes" comment="">
 
8
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
9
  </list>
10
  <option name="SHOW_DIALOG" value="false" />
@@ -27,6 +28,7 @@
27
  "Python.app.executor": "Debug",
28
  "Python.main_backend.executor": "Run",
29
  "Python.model_operations.executor": "Run",
 
30
  "Python.test.executor": "Run",
31
  "git-widget-placeholder": "main",
32
  "node.js.selected.package.tslint": "(autodetect)"
@@ -40,19 +42,24 @@
40
  <breakpoints>
41
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
42
  <url>file://$PROJECT_DIR$/app.py</url>
43
- <line>53</line>
44
- <option name="timeStamp" value="39" />
45
- </line-breakpoint>
46
- <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
47
- <url>file://$PROJECT_DIR$/app.py</url>
48
- <line>70</line>
49
  <option name="timeStamp" value="40" />
50
  </line-breakpoint>
51
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
52
  <url>file://$PROJECT_DIR$/app.py</url>
53
- <line>71</line>
54
  <option name="timeStamp" value="41" />
55
  </line-breakpoint>
 
 
 
 
 
 
 
 
 
 
56
  </breakpoints>
57
  </breakpoint-manager>
58
  </component>
@@ -60,10 +67,11 @@
60
  <SUITE FILE_PATH="coverage/HumanLikeness$.coverage" NAME=" Coverage Results" MODIFIED="1723441364832" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tests" />
61
  <SUITE FILE_PATH="coverage/HumanLikeness$model_operations.coverage" NAME="model_operations Coverage Results" MODIFIED="1723539909992" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/backend" />
62
  <SUITE FILE_PATH="coverage/HumanLikeness$main_backend.coverage" NAME="main_backend Coverage Results" MODIFIED="1723540718739" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
63
- <SUITE FILE_PATH="coverage/HumanLikeness$app.coverage" NAME="app Coverage Results" MODIFIED="1723540867388" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
64
  <SUITE FILE_PATH="coverage/HumanLikeness$evaluate_humanlike.coverage" NAME="evaluate_humanlike Coverage Results" MODIFIED="1723398170634" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/../Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/32b9ff35361847f45b1e7909fcdff84c/Message/MessageTemp/7420e97876942c1eea73293c47ebb239/OpenData" />
65
  <SUITE FILE_PATH="coverage/HumanLikeness$humanlike.coverage" NAME="humanlike Coverage Results" MODIFIED="1723535841643" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
66
  <SUITE FILE_PATH="coverage/HumanLikeness$envs.coverage" NAME="envs Coverage Results" MODIFIED="1723400161997" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
 
67
  <SUITE FILE_PATH="coverage/HumanLikeness$test.coverage" NAME="test Coverage Results" MODIFIED="1723541738228" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
68
  </component>
69
  </project>
 
5
  </component>
6
  <component name="ChangeListManager">
7
  <list default="true" id="b60b8d5d-762f-4021-9ce4-054078cb27a7" name="Changes" comment="">
8
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
9
  <change beforePath="$PROJECT_DIR$/app.py" beforeDir="false" afterPath="$PROJECT_DIR$/app.py" afterDir="false" />
10
  </list>
11
  <option name="SHOW_DIALOG" value="false" />
 
28
  "Python.app.executor": "Debug",
29
  "Python.main_backend.executor": "Run",
30
  "Python.model_operations.executor": "Run",
31
+ "Python.run_eval_suite.executor": "Debug",
32
  "Python.test.executor": "Run",
33
  "git-widget-placeholder": "main",
34
  "node.js.selected.package.tslint": "(autodetect)"
 
42
  <breakpoints>
43
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
44
  <url>file://$PROJECT_DIR$/app.py</url>
45
+ <line>77</line>
 
 
 
 
 
46
  <option name="timeStamp" value="40" />
47
  </line-breakpoint>
48
  <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
49
  <url>file://$PROJECT_DIR$/app.py</url>
50
+ <line>78</line>
51
  <option name="timeStamp" value="41" />
52
  </line-breakpoint>
53
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
54
+ <url>file://$PROJECT_DIR$/src/backend/run_eval_suite.py</url>
55
+ <line>46</line>
56
+ <option name="timeStamp" value="49" />
57
+ </line-breakpoint>
58
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
59
+ <url>file://$PROJECT_DIR$/src/populate.py</url>
60
+ <line>38</line>
61
+ <option name="timeStamp" value="50" />
62
+ </line-breakpoint>
63
  </breakpoints>
64
  </breakpoint-manager>
65
  </component>
 
67
  <SUITE FILE_PATH="coverage/HumanLikeness$.coverage" NAME=" Coverage Results" MODIFIED="1723441364832" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/tests" />
68
  <SUITE FILE_PATH="coverage/HumanLikeness$model_operations.coverage" NAME="model_operations Coverage Results" MODIFIED="1723539909992" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/backend" />
69
  <SUITE FILE_PATH="coverage/HumanLikeness$main_backend.coverage" NAME="main_backend Coverage Results" MODIFIED="1723540718739" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
70
+ <SUITE FILE_PATH="coverage/HumanLikeness$app.coverage" NAME="app Coverage Results" MODIFIED="1723543013531" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
71
  <SUITE FILE_PATH="coverage/HumanLikeness$evaluate_humanlike.coverage" NAME="evaluate_humanlike Coverage Results" MODIFIED="1723398170634" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/../Library/Containers/com.tencent.xinWeChat/Data/Library/Application Support/com.tencent.xinWeChat/2.0b4.0.9/32b9ff35361847f45b1e7909fcdff84c/Message/MessageTemp/7420e97876942c1eea73293c47ebb239/OpenData" />
72
  <SUITE FILE_PATH="coverage/HumanLikeness$humanlike.coverage" NAME="humanlike Coverage Results" MODIFIED="1723535841643" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="" />
73
  <SUITE FILE_PATH="coverage/HumanLikeness$envs.coverage" NAME="envs Coverage Results" MODIFIED="1723400161997" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
74
+ <SUITE FILE_PATH="coverage/HumanLikeness$run_eval_suite.coverage" NAME="run_eval_suite Coverage Results" MODIFIED="1723542436560" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src/backend" />
75
  <SUITE FILE_PATH="coverage/HumanLikeness$test.coverage" NAME="test Coverage Results" MODIFIED="1723541738228" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/src" />
76
  </component>
77
  </project>
app.py CHANGED
@@ -50,8 +50,15 @@ def process_pending_evals():
50
  return
51
 
52
  for _, eval_request in pending_eval_queue_df.iterrows():
53
- # 根据具体的列名和数据格式调整 `eval_request` 的内容
54
- print(f"Evaluating model: {eval_request.model}")
 
 
 
 
 
 
 
55
 
56
  # 调用评估函数
57
  run_eval_suite.run_evaluation(
 
50
  return
51
 
52
  for _, eval_request in pending_eval_queue_df.iterrows():
53
+ import re
54
+ model_link = eval_request['model']
55
+ match = re.search(r'>([^<]+)<', model_link)
56
+ if match:
57
+ eval_request['model'] = match.group(1) # 赋值给 eval_request['model']
58
+ else:
59
+ eval_request['model'] = model_link # 如果无法匹配,保留原始字符串
60
+
61
+ print(f"Evaluating model: {eval_request['model']}")
62
 
63
  # 调用评估函数
64
  run_eval_suite.run_evaluation(