XufengDuan commited on
Commit
58e92e8
1 Parent(s): 45f775d

update scripts

Browse files
Files changed (3) hide show
  1. .idea/workspace.xml +37 -4
  2. app.py +3 -2
  3. src/display/utils.py +2 -1
.idea/workspace.xml CHANGED
@@ -5,19 +5,31 @@
5
  </component>
6
  <component name="ChangeListManager">
7
  <list default="true" id="b60b8d5d-762f-4021-9ce4-054078cb27a7" name="Changes" comment="">
8
- <change beforePath="$PROJECT_DIR$/src/backend/model_operations.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/backend/model_operations.py" afterDir="false" />
 
 
9
  </list>
10
  <option name="SHOW_DIALOG" value="false" />
11
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
12
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
13
  <option name="LAST_RESOLUTION" value="IGNORE" />
14
  </component>
 
 
 
 
 
 
 
15
  <component name="ProblemsViewState">
16
  <option name="selectedTabId" value="QODANA_PROBLEMS_VIEW_TAB" />
17
  </component>
18
  <component name="PropertiesComponent"><![CDATA[{
19
  "keyToString": {
 
 
20
  "Python.model_operations.executor": "Run",
 
21
  "git-widget-placeholder": "main",
22
  "node.js.selected.package.tslint": "(autodetect)"
23
  }
@@ -25,14 +37,35 @@
25
  <component name="TaskManager">
26
  <servers />
27
  </component>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  <component name="com.intellij.coverage.CoverageDataManagerImpl">
29
  <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" />
30
  <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" />
31
- <SUITE FILE_PATH="coverage/HumanLikeness$app.coverage" NAME="app Coverage Results" MODIFIED="1723380005800" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
32
- <SUITE FILE_PATH="coverage/HumanLikeness$main_backend.coverage" NAME="main_backend Coverage Results" MODIFIED="1723534420423" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
33
  <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" />
34
  <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="" />
35
  <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" />
36
- <SUITE FILE_PATH="coverage/HumanLikeness$test.coverage" NAME="test Coverage Results" MODIFIED="1723535341716" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="false" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$" />
37
  </component>
38
  </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
+ <change beforePath="$PROJECT_DIR$/src/display/utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/src/display/utils.py" afterDir="false" />
11
  </list>
12
  <option name="SHOW_DIALOG" value="false" />
13
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
14
  <option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
15
  <option name="LAST_RESOLUTION" value="IGNORE" />
16
  </component>
17
+ <component name="FileTemplateManagerImpl">
18
+ <option name="RECENT_TEMPLATES">
19
+ <list>
20
+ <option value="Python Script" />
21
+ </list>
22
+ </option>
23
+ </component>
24
  <component name="ProblemsViewState">
25
  <option name="selectedTabId" value="QODANA_PROBLEMS_VIEW_TAB" />
26
  </component>
27
  <component name="PropertiesComponent"><![CDATA[{
28
  "keyToString": {
29
+ "Python.app.executor": "Debug",
30
+ "Python.main_backend.executor": "Run",
31
  "Python.model_operations.executor": "Run",
32
+ "Python.test.executor": "Run",
33
  "git-widget-placeholder": "main",
34
  "node.js.selected.package.tslint": "(autodetect)"
35
  }
 
37
  <component name="TaskManager">
38
  <servers />
39
  </component>
40
+ <component name="XDebuggerManager">
41
+ <breakpoint-manager>
42
+ <breakpoints>
43
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
44
+ <url>file://$PROJECT_DIR$/app.py</url>
45
+ <line>54</line>
46
+ <option name="timeStamp" value="39" />
47
+ </line-breakpoint>
48
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
49
+ <url>file://$PROJECT_DIR$/app.py</url>
50
+ <line>71</line>
51
+ <option name="timeStamp" value="40" />
52
+ </line-breakpoint>
53
+ <line-breakpoint enabled="true" suspend="THREAD" type="python-line">
54
+ <url>file://$PROJECT_DIR$/app.py</url>
55
+ <line>72</line>
56
+ <option name="timeStamp" value="41" />
57
+ </line-breakpoint>
58
+ </breakpoints>
59
+ </breakpoint-manager>
60
+ </component>
61
  <component name="com.intellij.coverage.CoverageDataManagerImpl">
62
  <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" />
63
  <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" />
64
+ <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$" />
65
+ <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$" />
66
  <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" />
67
  <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="" />
68
  <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" />
69
+ <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" />
70
  </component>
71
  </project>
app.py CHANGED
@@ -51,11 +51,12 @@ def process_pending_evals():
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(
58
- eval_request=eval_request,
59
  local_dir=envs.EVAL_RESULTS_PATH_BACKEND,
60
  results_repo=envs.RESULTS_REPO,
61
  batch_size=1,
 
51
 
52
  for _, eval_request in pending_eval_queue_df.iterrows():
53
  # 根据具体的列名和数据格式调整 `eval_request` 的内容
54
+ model_id = eval_request['model'].split('/')[-1].split('">')[0]
55
+ print(f"Evaluating model: {model_id}")
56
 
57
  # 调用评估函数
58
  run_eval_suite.run_evaluation(
59
+ eval_request=model_id,
60
  local_dir=envs.EVAL_RESULTS_PATH_BACKEND,
61
  results_repo=envs.RESULTS_REPO,
62
  batch_size=1,
src/display/utils.py CHANGED
@@ -30,7 +30,7 @@ auto_eval_column_dict.append(["model", ColumnContent,
30
  ColumnContent("Model", "markdown", True, never_hidden=True)])
31
  for task in Tasks:
32
  auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
33
-
34
  # Model information
35
  auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
36
  auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
@@ -47,6 +47,7 @@ auto_eval_column_dict.append(["dummy", ColumnContent, ColumnContent("model_name_
47
  # We use make dataclass to dynamically fill the scores from Tasks
48
  AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
49
 
 
50
  ## For the queue columns in the submission tab
51
  @dataclass(frozen=True)
52
  class EvalQueueColumn: # Queue column
 
30
  ColumnContent("Model", "markdown", True, never_hidden=True)])
31
  for task in Tasks:
32
  auto_eval_column_dict.append([task.name, ColumnContent, ColumnContent(task.value.col_name, "number", True)])
33
+ #
34
  # Model information
35
  auto_eval_column_dict.append(["model_type", ColumnContent, ColumnContent("Type", "str", False)])
36
  auto_eval_column_dict.append(["architecture", ColumnContent, ColumnContent("Architecture", "str", False)])
 
47
  # We use make dataclass to dynamically fill the scores from Tasks
48
  AutoEvalColumn = make_dataclass("AutoEvalColumn", auto_eval_column_dict, frozen=True)
49
 
50
+
51
  ## For the queue columns in the submission tab
52
  @dataclass(frozen=True)
53
  class EvalQueueColumn: # Queue column