@@ -1005,7 +1005,7 @@ TEST_F(OvmsConfigDeathTest, simultaneousPullAndRemove) {
10051005 EXPECT_EXIT (ovms::Config::instance ().parse (arg_count, n_argv), ::testing::ExitedWithCode (OVMS_EX_USAGE), " --remove_from_config cannot be used with --pull or --task" ) << createCmd (arg_count, n_argv) << buffer.str ();
10061006}
10071007
1008- TEST (OvmsGraphConfigTest, positiveAllChanged ) {
1008+ TEST (OvmsGraphConfigTest, positiveAllChangedTextGeneration ) {
10091009 std::string modelName = " OpenVINO/Phi-3-mini-FastDraft-50M-int8-ov" ;
10101010 std::string downloadPath = " test/repository" ;
10111011 char * n_argv[] = {
@@ -1075,7 +1075,7 @@ TEST(OvmsGraphConfigTest, positiveAllChanged) {
10751075 ASSERT_EQ (graphSettings.pluginConfig .maxPromptLength .value (), 2048 );
10761076}
10771077
1078- TEST (OvmsGraphConfigTest, positiveSomeChanged ) {
1078+ TEST (OvmsGraphConfigTest, positiveSomeChangedTextGeneration ) {
10791079 std::string modelName = " OpenVINO/Phi-3-mini-FastDraft-50M-int8-ov" ;
10801080 std::string downloadPath = " test/repository" ;
10811081 char * n_argv[] = {
@@ -1521,9 +1521,13 @@ TEST(OvmsGraphConfigTest, positiveAllChangedRerank) {
15211521 (char *)" 2" ,
15221522 (char *)" --model_name" ,
15231523 (char *)servingName.c_str (),
1524+ (char *)" --plugin_config" ,
1525+ (char *)" {\" SOME_KEY\" :\" SOME_VALUE\" }" ,
1526+ (char *)" --cache_dir" ,
1527+ (char *)" /tmp/cache_dir_with_emptiness"
15241528 };
15251529
1526- int arg_count = 16 ;
1530+ int arg_count = 20 ;
15271531 ConstructorEnabledConfig config;
15281532 config.parse (arg_count, n_argv);
15291533
@@ -1538,6 +1542,8 @@ TEST(OvmsGraphConfigTest, positiveAllChangedRerank) {
15381542 ASSERT_EQ (rerankGraphSettings.targetDevice , " GPU" );
15391543 ASSERT_EQ (rerankGraphSettings.modelName , servingName);
15401544 ASSERT_EQ (rerankGraphSettings.modelPath , " ./" );
1545+ ASSERT_EQ (hfSettings.exportSettings .cacheDir .value (), " /tmp/cache_dir_with_emptiness" );
1546+ ASSERT_EQ (hfSettings.exportSettings .pluginConfig .value (), " {\" SOME_KEY\" :\" SOME_VALUE\" }" );
15411547}
15421548
15431549TEST (OvmsGraphConfigTest, positiveAllChangedRerankStart) {
@@ -1685,9 +1691,11 @@ TEST(OvmsGraphConfigTest, positiveAllChangedImageGeneration) {
16851691 (char *)" 2" ,
16861692 (char *)" --max_num_inference_steps" ,
16871693 (char *)" 3" ,
1694+ (char *)" --plugin_config" ,
1695+ (char *)" {\" SOME_KEY\" :\" SOME_VALUE\" }" ,
16881696 };
16891697
1690- int arg_count = 30 ;
1698+ int arg_count = 32 ;
16911699 ConstructorEnabledConfig config;
16921700 config.parse (arg_count, n_argv);
16931701
@@ -1712,6 +1720,7 @@ TEST(OvmsGraphConfigTest, positiveAllChangedImageGeneration) {
17121720 ASSERT_EQ (imageGenerationGraphSettings.maxNumInferenceSteps .value (), 3 );
17131721 ASSERT_EQ (imageGenerationGraphSettings.pluginConfig .numStreams , 14 );
17141722 ASSERT_EQ (hfSettings.exportSettings .cacheDir .value (), " /cache" );
1723+ ASSERT_EQ (hfSettings.exportSettings .pluginConfig .value (), " {\" SOME_KEY\" :\" SOME_VALUE\" }" );
17151724}
17161725
17171726TEST (OvmsGraphConfigTest, positiveDefaultImageGeneration) {
@@ -1772,9 +1781,13 @@ TEST(OvmsGraphConfigTest, positiveAllChangedEmbeddings) {
17721781 (char *)" 2" ,
17731782 (char *)" --model_name" ,
17741783 (char *)servingName.c_str (),
1784+ (char *)" --plugin_config" ,
1785+ (char *)" {\" SOME_KEY\" :\" SOME_VALUE\" }" ,
1786+ (char *)" --cache_dir" ,
1787+ (char *)" /tmp/cache_dir_with_emptiness"
17751788 };
17761789
1777- int arg_count = 20 ;
1790+ int arg_count = 24 ;
17781791 ConstructorEnabledConfig config;
17791792 config.parse (arg_count, n_argv);
17801793
@@ -1791,6 +1804,8 @@ TEST(OvmsGraphConfigTest, positiveAllChangedEmbeddings) {
17911804 ASSERT_EQ (embeddingsGraphSettings.targetDevice , " GPU" );
17921805 ASSERT_EQ (embeddingsGraphSettings.modelName , servingName);
17931806 ASSERT_EQ (embeddingsGraphSettings.modelPath , " ./" );
1807+ ASSERT_EQ (hfSettings.exportSettings .cacheDir .value (), " /tmp/cache_dir_with_emptiness" );
1808+ ASSERT_EQ (hfSettings.exportSettings .pluginConfig .value (), " {\" SOME_KEY\" :\" SOME_VALUE\" }" );
17941809}
17951810
17961811TEST (OvmsGraphConfigTest, positiveAllChangedEmbeddingsStart) {
0 commit comments