dh-mc commited on
Commit
090acf8
1 Parent(s): 4c31851

Update eval_logical_reasoning_all_epochs.py

Browse files
llm_toolkit/eval_logical_reasoning_all_epochs.py CHANGED
@@ -11,12 +11,14 @@ def evaluate_model_all_epochs_v2(
11
  load_in_4bit=True,
12
  num_of_entries=-1,
13
  result_file=None,
 
14
  ):
15
  new_env = os.environ.copy()
16
  new_env["MODEL_NAME"] = model_name
17
  model = model_name.split("/")[-1]
18
 
19
  new_env["LOAD_IN_4BIT"] = "true" if load_in_4bit else "false"
 
20
  if result_file is not None:
21
  new_env["LOGICAL_REASONING_RESULTS_PATH"] = result_file
22
 
@@ -80,6 +82,7 @@ if __name__ == "__main__":
80
  start_epoch = int(os.getenv("START_EPOCH", 0))
81
  load_in_4bit = os.getenv("LOAD_IN_4BIT", "true").lower() == "true"
82
  result_file = os.getenv("LOGICAL_REASONING_RESULTS_PATH", None)
 
83
 
84
  num_of_entries = int(sys.argv[1]) if len(sys.argv) > 1 else -1
85
 
@@ -90,4 +93,5 @@ if __name__ == "__main__":
90
  load_in_4bit=load_in_4bit,
91
  num_of_entries=num_of_entries,
92
  result_file=result_file,
 
93
  )
 
11
  load_in_4bit=True,
12
  num_of_entries=-1,
13
  result_file=None,
14
+ batch_size=2,
15
  ):
16
  new_env = os.environ.copy()
17
  new_env["MODEL_NAME"] = model_name
18
  model = model_name.split("/")[-1]
19
 
20
  new_env["LOAD_IN_4BIT"] = "true" if load_in_4bit else "false"
21
+ new_env["BATCH_SIZE"] = str(batch_size)
22
  if result_file is not None:
23
  new_env["LOGICAL_REASONING_RESULTS_PATH"] = result_file
24
 
 
82
  start_epoch = int(os.getenv("START_EPOCH", 0))
83
  load_in_4bit = os.getenv("LOAD_IN_4BIT", "true").lower() == "true"
84
  result_file = os.getenv("LOGICAL_REASONING_RESULTS_PATH", None)
85
+ batch_size = int(os.getenv("BATCH_SIZE", 2))
86
 
87
  num_of_entries = int(sys.argv[1]) if len(sys.argv) > 1 else -1
88
 
 
93
  load_in_4bit=load_in_4bit,
94
  num_of_entries=num_of_entries,
95
  result_file=result_file,
96
+ batch_size=batch_size,
97
  )