JVice commited on
Commit
d2c4191
1 Parent(s): 88a54c9

fixing database error

Browse files
Files changed (1) hide show
  1. user_evaluation_variables.py +10 -10
user_evaluation_variables.py CHANGED
@@ -10,13 +10,13 @@ EVAL_DATABASE_DIR.mkdir(parents=True, exist_ok=True)
10
  GEN_EVAL_DATABASE_PATH = EVAL_DATABASE_DIR / f"general_eval_database.yaml"
11
  TASK_EVAL_DATABASE_PATH = EVAL_DATABASE_DIR / f"task_oriented_eval_database.yaml"
12
 
13
- EVAL_DATABASE_UPDATE_SCHEDULER = CommitScheduler(
14
- repo_id="try-before-you-bias-data",
15
- repo_type="dataset",
16
- folder_path=EVAL_DATABASE_DIR,
17
- path_in_repo="data",
18
- every=3,
19
- )
20
 
21
  USERNAME = "ANONYMOUS"
22
  EVAL_ID = None
@@ -137,9 +137,9 @@ def update_evaluation_table(evalType, debugging):
137
  yamlData['evaluations']['username'][USERNAME][EVAL_ID] = newEvaluationData
138
  if debugging:
139
  st.write("NEW DATABASE ", yamlData['evaluations']['username'][USERNAME])
140
- with EVAL_DATABASE_UPDATE_SCHEDULER.lock:
141
- with open(evalDataPath, 'w') as yaml_file:
142
- yaml_file.write(yaml.dump(yamlData, default_flow_style=False))
143
 
144
  def reset_variables(evalType):
145
  global USERNAME
 
10
  GEN_EVAL_DATABASE_PATH = EVAL_DATABASE_DIR / f"general_eval_database.yaml"
11
  TASK_EVAL_DATABASE_PATH = EVAL_DATABASE_DIR / f"task_oriented_eval_database.yaml"
12
 
13
+ # EVAL_DATABASE_UPDATE_SCHEDULER = CommitScheduler(
14
+ # repo_id="try-before-you-bias-data",
15
+ # repo_type="dataset",
16
+ # folder_path=EVAL_DATABASE_DIR,
17
+ # path_in_repo="data",
18
+ # every=3,
19
+ # )
20
 
21
  USERNAME = "ANONYMOUS"
22
  EVAL_ID = None
 
137
  yamlData['evaluations']['username'][USERNAME][EVAL_ID] = newEvaluationData
138
  if debugging:
139
  st.write("NEW DATABASE ", yamlData['evaluations']['username'][USERNAME])
140
+ # with EVAL_DATABASE_UPDATE_SCHEDULER.lock:
141
+ with open(evalDataPath, 'w') as yaml_file:
142
+ yaml_file.write(yaml.dump(yamlData, default_flow_style=False))
143
 
144
  def reset_variables(evalType):
145
  global USERNAME