Skip to content

Commit 1d710c9

Browse files
committed
Used path from ae.config file to get screenshots.
1 parent bcbfe66 commit 1d710c9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

test/evaluators.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@
2020

2121
import os
2222
from .validation_agent.validator import validate_task_vqa
23+
from ae.config import PROJECT_ROOT, PROJECT_TEST_ROOT
24+
TEST_LOGS = os.path.join(PROJECT_TEST_ROOT, 'logs')
2325

2426
class Evaluator:
2527
"""Base class for evaluation strategies.
@@ -423,8 +425,8 @@ async def __call__(
423425
score = -1.0
424426

425427
# Get path to screenshots for the given task
426-
test_folder = list_items_in_folder(f"{os. getcwd()}/test/logs/")[-1] # Get the most recent log folder, this may take look for the wrong folder TODO: fix to take correct folder
427-
path_to_screenshots = f"{os. getcwd()}/test/logs/{test_folder}/logs_for_task_{task_id}/snapshots"
428+
test_folder = list_items_in_folder(TEST_LOGS)[-1] # Get the most recent log folder
429+
path_to_screenshots = f"{TEST_LOGS}/{test_folder}/logs_for_task_{task_id}/snapshots"
428430
screenshot_names = list_items_in_folder(path_to_screenshots) # type: ignore
429431

430432
# Load and compress screenshots

0 commit comments

Comments
 (0)