Skip to content

Commit dc42fb0

Browse files
required changes considered
1 parent 3aca84e commit dc42fb0

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llmtune/cli/toolkit.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
import logging
2-
import os
3-
from os import listdir
4-
from os.path import exists, join
52
import shutil
63
from pathlib import Path
74

8-
95
import torch
106
import transformers
117
import typer
@@ -90,13 +86,12 @@ def run_one_experiment(config: Config, config_path: Path) -> None:
9086
RichUI.results_found(results_path)
9187

9288
RichUI.before_qa()
93-
qa_path = dir_helper.save_paths.qa
94-
if not exists(qa_path) or not listdir(qa_path):
95-
# Instantiate unit test classes
96-
llm_tests = config.get("qa", {}).get("llm_tests", [])
89+
qa_file_path = dir_helper.save_paths.qa_file
90+
if not qa_file_path.exists():
91+
llm_tests = config.qa.llm_tests
9792
tests = QaTestRegistry.create_tests_from_list(llm_tests)
9893
test_suite = LLMTestSuite.from_csv(results_file_path, tests)
99-
test_suite.save_test_results(os.path.join(qa_path, "unit_test_results.csv"))
94+
test_suite.save_test_results(qa_file_path)
10095

10196

10297
@app.command("run")

0 commit comments

Comments
 (0)