Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -655,10 +655,11 @@ ifeq ($(RUN_GPU_TESTS),1)
-u 0 \
-v $(shell realpath ./run_unit_tests.sh):/ovms/./run_unit_tests.sh \
-v $(shell realpath ${GPU_MODEL_PATH}):/ovms/src/test/face_detection_adas/1:ro \
-v $(shell realpath ${TEST_LLM_PATH}):/ovms/src/test/llm_testing:ro \
-v $(shell realpath ${TEST_LLM_PATH}):${TEST_LLM_PATH}:ro \
-e https_proxy=${https_proxy} \
-e RUN_TESTS=1 \
-e RUN_GPU_TESTS=$(RUN_GPU_TESTS) \
-e TEST_LLM_PATH=${TEST_LLM_PATH} \
-e JOBS=$(JOBS) \
-e debug_bazel_flags=${BAZEL_DEBUG_FLAGS} \
$(OVMS_CPP_DOCKER_IMAGE)-build:$(OVMS_CPP_IMAGE_TAG)$(IMAGE_TAG_SUFFIX) \
Expand All @@ -672,10 +673,11 @@ else
docker run \
--name $(OVMS_CPP_IMAGE_TAG)$(IMAGE_TAG_SUFFIX) \
-v $(shell realpath ./run_unit_tests.sh):/ovms/./run_unit_tests.sh \
-v $(shell realpath ${TEST_LLM_PATH}):/ovms/src/test/llm_testing:ro \
-v $(shell realpath ${TEST_LLM_PATH}):${TEST_LLM_PATH}:ro \
-e https_proxy=${https_proxy} \
-e RUN_TESTS=1 \
-e JOBS=$(JOBS) \
-e TEST_LLM_PATH=${TEST_LLM_PATH} \
-e debug_bazel_flags=${BAZEL_DEBUG_FLAGS} \
$(OVMS_CPP_DOCKER_IMAGE)-build:$(OVMS_CPP_IMAGE_TAG)$(IMAGE_TAG_SUFFIX) \
./run_unit_tests.sh ;\
Expand Down
13 changes: 11 additions & 2 deletions src/test/llm/llmnode_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3698,18 +3698,27 @@ class LLMOptionsHttpTestPython : public ::testing::Test {
static void SetUpTestSuite() { py::initialize_interpreter(); }
static void TearDownTestSuite() { py::finalize_interpreter(); }
#endif
public:
static const char* getModelPath(std::string defaultValue) {
const char* testLlmPathEnv = std::getenv("TEST_LLM_PATH");
if (testLlmPathEnv != nullptr && std::strlen(testLlmPathEnv) > 0) {
return testLlmPathEnv;
} else {
return defaultValue.c_str();
}
}
};

class LLMOptionsHttpTest : public LLMOptionsHttpTestPython {
public:
std::string modelsPath;
void SetUp() { modelsPath = "/ovms/src/test/llm_testing/facebook/opt-125m"; }
void SetUp() { modelsPath = getModelPath("/ovms/src/test/llm_testing/facebook/opt-125m"); }
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

getGenericFullPathForSrcTest cant we use this utility?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it will be helpful, but I think issue is elsewhere

};

class LLMVLMOptionsHttpTest : public LLMOptionsHttpTestPython {
public:
std::string modelsPath;
void SetUp() { modelsPath = "/ovms/src/test/llm_testing/OpenGVLab/InternVL2-1B"; }
void SetUp() { modelsPath = getModelPath("/ovms/src/test/llm_testing/OpenGVLab/InternVL2-1B"); }
};

void TestLLMNodeOptionsCheckDefault(std::string& modelsPath) {
Expand Down