mirror of
https://github.com/knu-plml/apr-using-qlora.git
synced 2026-05-06 18:45:12 +00:00
Feat(bench): humaneval tmp dir for multiple bench
This commit is contained in:
parent
d67ced2b6c
commit
b782492338
1 changed files with 15 additions and 0 deletions
|
|
@ -509,6 +509,18 @@ def main():
|
|||
|
||||
# Humaneval 테스트
|
||||
if generation_args.do_humaneval:
|
||||
# Copy bench dir
|
||||
NEW_HUMANEVAL_DIR = os.path.abspath(
|
||||
os.path.join(
|
||||
os.path.dirname(HUMANEVAL_DIR),
|
||||
os.path.basename(HUMANEVAL_DIR) + str(random.randint(0, 9999))
|
||||
)
|
||||
)
|
||||
shutil.copytree(
|
||||
HUMANEVAL_DIR,
|
||||
NEW_HUMANEVAL_DIR
|
||||
)
|
||||
HUMANEVAL_DIR = NEW_HUMANEVAL_DIR
|
||||
|
||||
run_type = 'finetune'
|
||||
bench_type = 'humaneval'
|
||||
|
|
@ -551,6 +563,9 @@ def main():
|
|||
)
|
||||
print(f"==========Output validated. Written to {validate_file}==========")
|
||||
|
||||
# Remove bench dir
|
||||
shutil.rmtree(HUMANEVAL_DIR)
|
||||
|
||||
if generation_args.do_quixbugs:
|
||||
run_type = 'finetune'
|
||||
bench_type = 'quixbugs'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue