This commit is contained in:
Adam Wilson
2025-08-18 21:10:50 -06:00
parent 28a962facd
commit 368c9e68fb
2 changed files with 3 additions and 1 deletions
@@ -22,7 +22,8 @@ class TestRunLoggingService(AbstractTestRunLoggingService):
):
self._lock = threading.Lock()
timestamp = calendar.timegm(time.gmtime())
self.log_file_path = str(f"./tests/logs/test_{test_id}/{str(model_id.value).replace("/", "_")}/{start}_{end}/test_{str(test_id).lower()}_logs_{timestamp}.json").lower()
base_path = os.environ.get('TEST_RUNS', '.')
self.log_file_path = os.path.join(base_path, str(f"test_{test_id}/{str(model_id.value).replace("/", "_")}/{start}_{end}/test_{str(test_id).lower()}_logs_{timestamp}.json").lower())
self._ensure_log_file_exists()
def _ensure_log_file_exists(self):
+1
View File
@@ -75,6 +75,7 @@ def setup_test_environment():
os.environ["LOG_LEVEL"] = "DEBUG"
os.environ["PROMPT_TEMPLATES_DIR"] = "./infrastructure/prompt_templates"
os.environ["INJECTION_DATA_DIR"] = "./tests/security/tests/results/01_garak_no_guidelines"
os.environ["TEST_RUNS"] = "./tests/logs"
os.environ["MODEL_BASE_DIR"] = "./infrastructure/foundation_model"
os.environ["MODEL_CPU_DIR"] = "cpu_and_mobile/cpu-int4-rtn-block-32-acc-level-4"
os.environ["MODEL_DATA_FILENAME"] = "phi3-mini-4k-instruct-cpu-int4-rtn-block-32-acc-level-4.onnx.data"