Skip to content

Commit

Permalink
Record to testsuite property
Browse files Browse the repository at this point in the history
Signed-off-by: Domenic Barbuzzi <[email protected]>
  • Loading branch information
dbarbuzzi committed Dec 2, 2024
1 parent 31c7a48 commit 3919f49
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/e2e/vLLM/test_vllm.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,12 @@

HF_MODEL_HUB_NAME = "nm-testing"
TEST_DATA_FILE = os.environ.get("TEST_DATA_FILE", "")
TEST_DATA_FILE_NAME = TEST_DATA_FILE.split("configs/")[-1]


@pytest.fixture
def record_config_file(record_testsuite_property: Callable[[str, object], None]):
test_data_file_name = TEST_DATA_FILE.split("configs/")[-1]
record_testsuite_property("TEST_DATA_FILE_NAME", test_data_file_name)


# Will run each test case in its own process through run_tests.sh
Expand Down Expand Up @@ -76,12 +81,11 @@ def set_up(self):
]
self.api = HfApi()

def test_vllm(self, record_property: Callable[[str, object], None]):
@pytest.mark.usefixtures("record_config_file")
def test_vllm(self):
# Run vLLM with saved model
import torch

record_property("TEST_DATA_FILE", TEST_DATA_FILE)

self.set_up()
if not self.save_dir:
self.save_dir = self.model.split("/")[1] + f"-{self.scheme}"
Expand Down

0 comments on commit 3919f49

Please sign in to comment.