Skip to content

Commit 14cb469

Browse files
rasapaladtrawins
andauthored
Convert_tokenizer support (#3699)
### 🛠 Summary Check if openvino_tokenizer.xml exists after export. If it doesn't exist call convert_tokenizer for the model. ### 🧪 Checklist - [ ] Unit tests added. - [ ] The documentation updated. - [ ] Change follows security best practices. `` --------- Co-authored-by: Trawinski, Dariusz <dariusz.trawinski@intel.com>
1 parent 787fd08 commit 14cb469

File tree

6 files changed

+199
-12
lines changed

6 files changed

+199
-12
lines changed

src/pull_module/optimum_export.cpp

Lines changed: 93 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,23 +114,96 @@ std::string OptimumDownloader::getExportCmd() {
114114
return cmd;
115115
}
116116

117-
OptimumDownloader::OptimumDownloader(const ExportSettings& inExportSettings, const GraphExportType& inTask, const std::string& inSourceModel, const std::string& inDownloadPath, bool inOverwrite, const std::string& cliExportCmd, const std::string& cliCheckCmd) :
117+
std::string OptimumDownloader::getConvertCmd() {
118+
std::string cmd = "";
119+
switch (this->task) {
120+
case TEXT_GENERATION_GRAPH: {
121+
cmd = getConvertCmdWithDetokenizer();
122+
break;
123+
}
124+
case EMBEDDINGS_GRAPH: {
125+
cmd = getConvertCmdOnlyTokenizer();
126+
break;
127+
}
128+
case RERANK_GRAPH: {
129+
cmd = getConvertCmdOnlyTokenizer();
130+
break;
131+
}
132+
case IMAGE_GENERATION_GRAPH: {
133+
cmd = "";
134+
break;
135+
}
136+
case UNKNOWN_GRAPH: {
137+
SPDLOG_ERROR("Optimum cli task options not initialised.");
138+
break;
139+
}
140+
}
141+
142+
return cmd;
143+
}
144+
145+
std::string OptimumDownloader::getConvertCmdWithDetokenizer() {
146+
std::ostringstream oss;
147+
// clang-format off
148+
oss << this->CONVERT_TOKENIZER_EXPORT_COMMAND;
149+
oss << this->sourceModel;
150+
oss << " --with-detokenizer -o ";
151+
oss << this->downloadPath;
152+
// clang-format on
153+
154+
return oss.str();
155+
}
156+
157+
std::string OptimumDownloader::getConvertCmdOnlyTokenizer() {
158+
std::ostringstream oss;
159+
// clang-format off
160+
oss << this->CONVERT_TOKENIZER_EXPORT_COMMAND;
161+
oss << this->sourceModel;
162+
oss << " -o ";
163+
oss << this->downloadPath;
164+
// clang-format on
165+
166+
return oss.str();
167+
}
168+
169+
bool OptimumDownloader::checkIfDetokenizerFileIsExported() {
170+
return std::filesystem::exists(FileSystem::joinPath({this->downloadPath, "openvino_detokenizer.xml"}));
171+
}
172+
173+
bool OptimumDownloader::checkIfTokenizerFileIsExported() {
174+
return std::filesystem::exists(FileSystem::joinPath({this->downloadPath, "openvino_tokenizer.xml"}));
175+
}
176+
177+
OptimumDownloader::OptimumDownloader(const ExportSettings& inExportSettings, const GraphExportType& inTask,
178+
const std::string& inSourceModel, const std::string& inDownloadPath, bool inOverwrite, const std::string& cliExportCmd,
179+
const std::string& cliCheckCmd, const std::string& convertExportCmd, const std::string& convertCheckCmd) :
118180
IModelDownloader(inSourceModel, inDownloadPath, inOverwrite),
119181
exportSettings(inExportSettings),
120182
task(inTask),
121183
OPTIMUM_CLI_CHECK_COMMAND(cliCheckCmd),
122-
OPTIMUM_CLI_EXPORT_COMMAND(cliExportCmd) {}
184+
OPTIMUM_CLI_EXPORT_COMMAND(cliExportCmd),
185+
CONVERT_TOKENIZER_CHECK_COMMAND(convertCheckCmd),
186+
CONVERT_TOKENIZER_EXPORT_COMMAND(convertExportCmd) {}
123187

124188
Status OptimumDownloader::checkRequiredToolsArePresent() {
125189
int retCode = -1;
126190
std::string output = exec_cmd(this->OPTIMUM_CLI_CHECK_COMMAND, retCode);
127191
if (retCode != 0) {
128192
SPDLOG_DEBUG("Command output {}", output);
129-
SPDLOG_ERROR("Trying to pull {} from HuggingFace but missing optimum-intel. Use the ovms package with optimum-intel.", this->sourceModel);
193+
SPDLOG_ERROR("Trying to pull {} from HuggingFace but missing optimum-intel. Use the ovms package with optimum-intel installed.", this->sourceModel);
130194
return StatusCode::HF_FAILED_TO_INIT_OPTIMUM_CLI;
131195
}
132196

133197
SPDLOG_DEBUG("Optimum-cli executable is present");
198+
199+
output = exec_cmd(this->CONVERT_TOKENIZER_CHECK_COMMAND, retCode);
200+
if (retCode != 0) {
201+
SPDLOG_DEBUG("Command output {}", output);
202+
SPDLOG_ERROR("Trying to pull {} from HuggingFace but missing convert_tokenizer. This is likely because you are using OVMS without Python support which is required for pulling with conversion.", this->sourceModel);
203+
return StatusCode::HF_FAILED_TO_INIT_OPTIMUM_CLI;
204+
}
205+
206+
SPDLOG_DEBUG("Convert_tokenizer executable is present");
134207
return StatusCode::OK;
135208
}
136209

@@ -171,6 +244,23 @@ Status OptimumDownloader::downloadModel() {
171244
return StatusCode::HF_RUN_OPTIMUM_CLI_EXPORT_FAILED;
172245
}
173246

247+
if (!this->checkIfTokenizerFileIsExported()) {
248+
cmd = getConvertCmd();
249+
retCode = -1;
250+
// Tokenizer, detokenizer not required for image generation
251+
if (cmd != "") {
252+
SPDLOG_DEBUG("Tokenizer not found in the exported model. Exporting tokenizer and detokenizer from HF model.");
253+
output = exec_cmd(cmd, retCode);
254+
if (retCode != 0) {
255+
SPDLOG_DEBUG("Command output {}", output);
256+
SPDLOG_ERROR("convert_tokenizer command failed.");
257+
return StatusCode::HF_RUN_CONVERT_TOKENIZER_EXPORT_FAILED;
258+
}
259+
}
260+
} else {
261+
SPDLOG_DEBUG("Tokenizer is found in the exported model directory. Convert_tokenizer command not required.");
262+
}
263+
174264
return StatusCode::OK;
175265
}
176266

src/pull_module/optimum_export.hpp

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,32 @@ class Status;
2424

2525
class OptimumDownloader : public IModelDownloader {
2626
public:
27-
OptimumDownloader(const ExportSettings& exportSettings, const GraphExportType& task, const std::string& inSourceModel, const std::string& inDownloadPath, bool inOverwrite, const std::string& cliExportCmd = "optimum-cli export openvino ", const std::string& cliCheckCmd = "optimum-cli -h");
27+
OptimumDownloader(const ExportSettings& exportSettings, const GraphExportType& task, const std::string& inSourceModel,
28+
const std::string& inDownloadPath, bool inOverwrite, const std::string& cliExportCmd = "optimum-cli export openvino ",
29+
const std::string& cliCheckCmd = "optimum-cli -h",
30+
const std::string& convertExportCmd = "convert_tokenizer ",
31+
#ifdef _WIN32
32+
const std::string& convertCheckCmd = "where convert_tokenizer");
33+
#else
34+
const std::string& convertCheckCmd = "which convert_tokenizer");
35+
#endif
2836
Status downloadModel() override;
2937

3038
protected:
3139
ExportSettings exportSettings;
3240
const GraphExportType task;
3341
std::string OPTIMUM_CLI_CHECK_COMMAND;
3442
std::string OPTIMUM_CLI_EXPORT_COMMAND;
43+
std::string CONVERT_TOKENIZER_CHECK_COMMAND;
44+
std::string CONVERT_TOKENIZER_EXPORT_COMMAND;
3545

3646
Status checkRequiredToolsArePresent();
47+
bool checkIfDetokenizerFileIsExported();
48+
bool checkIfTokenizerFileIsExported();
3749
std::string getExportCmd();
50+
std::string getConvertCmd();
51+
std::string getConvertCmdWithDetokenizer();
52+
std::string getConvertCmdOnlyTokenizer();
3853
std::string getExportCmdText();
3954
std::string getExportCmdEmbeddings();
4055
std::string getExportCmdRerank();

src/status.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -342,6 +342,7 @@ const std::unordered_map<StatusCode, std::string> Status::statusMessageMap = {
342342
{StatusCode::HF_FAILED_TO_INIT_LIBGIT2, "Failed to initialize libgit2 library"},
343343
{StatusCode::HF_FAILED_TO_INIT_OPTIMUM_CLI, "Failed to run optimum-cli executable"},
344344
{StatusCode::HF_RUN_OPTIMUM_CLI_EXPORT_FAILED, "Failed to run optimum-cli export command"},
345+
{StatusCode::HF_RUN_CONVERT_TOKENIZER_EXPORT_FAILED, "Failed to run convert-tokenizer export command"},
345346
{StatusCode::HF_GIT_CLONE_FAILED, "Failed in libgit2 execution of clone method"},
346347

347348
{StatusCode::PARTIAL_END, "Request has finished and no further communication is needed"},

src/status.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -354,6 +354,7 @@ enum class StatusCode {
354354
HF_FAILED_TO_INIT_LIBGIT2,
355355
HF_FAILED_TO_INIT_OPTIMUM_CLI,
356356
HF_RUN_OPTIMUM_CLI_EXPORT_FAILED,
357+
HF_RUN_CONVERT_TOKENIZER_EXPORT_FAILED,
357358
HF_GIT_CLONE_FAILED,
358359

359360
PARTIAL_END,

src/test/pull_hf_model_test.cpp

Lines changed: 80 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -286,10 +286,15 @@ class TestOptimumDownloader : public ovms::OptimumDownloader {
286286
TestOptimumDownloader(const ovms::HFSettingsImpl& inHfSettings) :
287287
ovms::OptimumDownloader(inHfSettings.exportSettings, inHfSettings.task, inHfSettings.sourceModel, ovms::HfDownloader::getGraphDirectory(inHfSettings.downloadPath, inHfSettings.sourceModel), inHfSettings.overwriteModels) {}
288288
std::string getExportCmd() { return ovms::OptimumDownloader::getExportCmd(); }
289+
std::string getConvertCmd() { return ovms::OptimumDownloader::getConvertCmd(); }
289290
std::string getGraphDirectory() { return ovms::OptimumDownloader::getGraphDirectory(); }
290291
void setExportCliCheckCommand(const std::string& input) { this->OPTIMUM_CLI_CHECK_COMMAND = input; }
292+
void setConvertCliCheckCommand(const std::string& input) { this->CONVERT_TOKENIZER_CHECK_COMMAND = input; }
291293
void setExportCliExportCommand(const std::string& input) { this->OPTIMUM_CLI_EXPORT_COMMAND = input; }
294+
void setConvertCliExportCommand(const std::string& input) { this->CONVERT_TOKENIZER_EXPORT_COMMAND = input; }
292295
ovms::Status checkRequiredToolsArePresent() { return ovms::OptimumDownloader::checkRequiredToolsArePresent(); }
296+
bool checkIfDetokenizerFileIsExported() { return ovms::OptimumDownloader::checkIfDetokenizerFileIsExported(); }
297+
bool checkIfTokenizerFileIsExported() { return ovms::OptimumDownloader::checkIfTokenizerFileIsExported(); }
293298
};
294299

295300
class TestHfDownloader : public ovms::HfDownloader {
@@ -347,48 +352,101 @@ class TestOptimumDownloaderSetup : public ::testing::Test {
347352
}
348353
};
349354

355+
class TestOptimumDownloaderSetupWithFile : public TestOptimumDownloaderSetup {
356+
public:
357+
ovms::HFSettingsImpl inHfSettings;
358+
std::string cliMockPath;
359+
std::filesystem::path file_path;
360+
std::filesystem::path dir_path;
361+
void TearDown() override {
362+
std::filesystem::remove(file_path);
363+
std::filesystem::remove_all(dir_path);
364+
}
365+
};
366+
350367
TEST_F(TestOptimumDownloaderSetup, Methods) {
351368
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
352369
std::string expectedPath = inHfSettings.downloadPath + "/" + inHfSettings.sourceModel;
353370
std::string expectedCmd = "optimum-cli export openvino --model model/name --trust-remote-code --weight-format fp64 --param --param value \\path\\to\\Download\\model\\name";
371+
std::string expectedCmd2 = "convert_tokenizer model/name --with-detokenizer -o \\path\\to\\Download\\model\\name";
354372
#ifdef _WIN32
355373
std::replace(expectedPath.begin(), expectedPath.end(), '/', '\\');
356374
#endif
357375
#ifdef __linux__
358376
std::replace(expectedCmd.begin(), expectedCmd.end(), '\\', '/');
377+
std::replace(expectedCmd2.begin(), expectedCmd2.end(), '\\', '/');
359378
#endif
360379
ASSERT_EQ(optimumDownloader->getGraphDirectory(), expectedPath);
361380
ASSERT_EQ(optimumDownloader->getExportCmd(), expectedCmd);
381+
ASSERT_EQ(optimumDownloader->getConvertCmd(), expectedCmd2);
362382
}
363383

364384
TEST_F(TestOptimumDownloaderSetup, RerankExportCmd) {
365385
inHfSettings.task = ovms::RERANK_GRAPH;
366386
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
367387
std::string expectedCmd = "optimum-cli export openvino --disable-convert-tokenizer --model model/name --trust-remote-code --weight-format fp64 --task text-classification \\path\\to\\Download\\model\\name";
388+
std::string expectedCmd2 = "convert_tokenizer model/name -o \\path\\to\\Download\\model\\name";
368389
#ifdef __linux__
369390
std::replace(expectedCmd.begin(), expectedCmd.end(), '\\', '/');
391+
std::replace(expectedCmd2.begin(), expectedCmd2.end(), '\\', '/');
370392
#endif
371393
ASSERT_EQ(optimumDownloader->getExportCmd(), expectedCmd);
394+
ASSERT_EQ(optimumDownloader->getConvertCmd(), expectedCmd2);
372395
}
373396

374397
TEST_F(TestOptimumDownloaderSetup, ImageGenExportCmd) {
375398
inHfSettings.task = ovms::IMAGE_GENERATION_GRAPH;
376399
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
377400
std::string expectedCmd = "optimum-cli export openvino --model model/name --weight-format fp64 \\path\\to\\Download\\model\\name";
401+
std::string expectedCmd2 = "";
378402
#ifdef __linux__
379403
std::replace(expectedCmd.begin(), expectedCmd.end(), '\\', '/');
380404
#endif
381405
ASSERT_EQ(optimumDownloader->getExportCmd(), expectedCmd);
406+
ASSERT_EQ(optimumDownloader->getConvertCmd(), expectedCmd2);
382407
}
383408

384409
TEST_F(TestOptimumDownloaderSetup, EmbeddingsExportCmd) {
385410
inHfSettings.task = ovms::EMBEDDINGS_GRAPH;
386411
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
387412
std::string expectedCmd = "optimum-cli export openvino --disable-convert-tokenizer --task feature-extraction --library sentence_transformers --model model/name --trust-remote-code --weight-format fp64 \\path\\to\\Download\\model\\name";
413+
std::string expectedCmd2 = "convert_tokenizer model/name -o \\path\\to\\Download\\model\\name";
388414
#ifdef __linux__
389415
std::replace(expectedCmd.begin(), expectedCmd.end(), '\\', '/');
416+
std::replace(expectedCmd2.begin(), expectedCmd2.end(), '\\', '/');
390417
#endif
391418
ASSERT_EQ(optimumDownloader->getExportCmd(), expectedCmd);
419+
ASSERT_EQ(optimumDownloader->getConvertCmd(), expectedCmd2);
420+
}
421+
422+
TEST_F(TestOptimumDownloaderSetup, DetokenizerCheckNegative) {
423+
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
424+
ASSERT_EQ(optimumDownloader->checkIfDetokenizerFileIsExported(), false);
425+
ASSERT_EQ(optimumDownloader->checkIfTokenizerFileIsExported(), false);
426+
}
427+
428+
TEST_F(TestOptimumDownloaderSetupWithFile, DetokenizerCheckPositive) {
429+
file_path = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/name/openvino_detokenizer.xml");
430+
inHfSettings.sourceModel = "model/name";
431+
inHfSettings.downloadPath = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/");
432+
dir_path = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/");
433+
std::filesystem::create_directories(getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/name"));
434+
std::ofstream ofs(file_path); // Creates an empty file
435+
ofs.close();
436+
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
437+
ASSERT_EQ(optimumDownloader->checkIfDetokenizerFileIsExported(), true);
438+
}
439+
440+
TEST_F(TestOptimumDownloaderSetupWithFile, TokenizerCheckPositive) {
441+
file_path = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/name/openvino_tokenizer.xml");
442+
inHfSettings.sourceModel = "model/name";
443+
inHfSettings.downloadPath = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/");
444+
dir_path = getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/");
445+
std::filesystem::create_directories(getGenericFullPathForBazelOut("/ovms/bazel-bin/src/model/name"));
446+
std::ofstream ofs(file_path); // Creates an empty file
447+
ofs.close();
448+
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
449+
ASSERT_EQ(optimumDownloader->checkIfTokenizerFileIsExported(), true);
392450
}
393451

394452
TEST_F(TestOptimumDownloaderSetup, UnknownExportCmd) {
@@ -405,33 +463,51 @@ TEST_F(TestOptimumDownloaderSetup, NegativeWrongPath) {
405463

406464
TEST_F(TestOptimumDownloaderSetup, NegativeExportCommandFailed) {
407465
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
408-
optimumDownloader->setExportCliCheckCommand("ls");
409-
#ifdef _WIN32
410-
optimumDownloader->setExportCliCheckCommand("dir");
411-
#endif
466+
optimumDownloader->setExportCliCheckCommand("echo ");
467+
optimumDownloader->setConvertCliCheckCommand("echo ");
412468
optimumDownloader->setExportCliExportCommand("NonExistingCommand22");
413469
ASSERT_EQ(optimumDownloader->downloadModel(), ovms::StatusCode::HF_RUN_OPTIMUM_CLI_EXPORT_FAILED);
414470
}
415471

472+
TEST_F(TestOptimumDownloaderSetup, NegativeConvertCommandFailed) {
473+
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
474+
optimumDownloader->setExportCliCheckCommand("echo ");
475+
optimumDownloader->setConvertCliCheckCommand("echo ");
476+
optimumDownloader->setExportCliExportCommand("echo ");
477+
optimumDownloader->setConvertCliExportCommand("nonExistingCommand222");
478+
ASSERT_EQ(optimumDownloader->downloadModel(), ovms::StatusCode::HF_RUN_CONVERT_TOKENIZER_EXPORT_FAILED);
479+
}
480+
416481
TEST_F(TestOptimumDownloaderSetup, NegativeCheckOptimumExistsCommandFailed) {
417482
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
418483
optimumDownloader->setExportCliCheckCommand("NonExistingCommand33");
484+
optimumDownloader->setConvertCliCheckCommand("echo ");
485+
ASSERT_EQ(optimumDownloader->checkRequiredToolsArePresent(), ovms::StatusCode::HF_FAILED_TO_INIT_OPTIMUM_CLI);
486+
}
487+
488+
TEST_F(TestOptimumDownloaderSetup, NegativeCheckConverterExistsCommandFailed) {
489+
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
490+
optimumDownloader->setExportCliCheckCommand("echo ");
491+
optimumDownloader->setConvertCliCheckCommand("NonExistingCommand33");
419492
ASSERT_EQ(optimumDownloader->checkRequiredToolsArePresent(), ovms::StatusCode::HF_FAILED_TO_INIT_OPTIMUM_CLI);
420493
}
421494

422495
TEST_F(TestOptimumDownloaderSetup, PositiveOptimumExistsCommandPassed) {
423496
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
424497
cliMockPath += " -h";
425498
optimumDownloader->setExportCliCheckCommand(cliMockPath);
499+
optimumDownloader->setConvertCliCheckCommand("echo ");
426500
ASSERT_EQ(optimumDownloader->checkRequiredToolsArePresent(), ovms::StatusCode::OK);
427501
}
428502

429503
TEST_F(TestOptimumDownloaderSetup, PositiveOptimumExportCommandPassed) {
430504
std::unique_ptr<TestOptimumDownloader> optimumDownloader = std::make_unique<TestOptimumDownloader>(inHfSettings);
431505
std::string cliCheckCommand = cliMockPath += " -h";
432506
optimumDownloader->setExportCliCheckCommand(cliCheckCommand);
507+
optimumDownloader->setConvertCliCheckCommand("echo ");
433508
cliMockPath += " export";
434509
optimumDownloader->setExportCliExportCommand(cliMockPath);
510+
optimumDownloader->setConvertCliExportCommand("echo ");
435511
ASSERT_EQ(optimumDownloader->downloadModel(), ovms::StatusCode::OK);
436512
}
437513

windows_test.bat

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,15 @@ IF "%~2"=="--with_python" (
3434
set "bazelBuildArgs=--config=win_mp_on_py_off --action_env OpenVINO_DIR=%openvino_dir%"
3535
)
3636

37+
IF "%~3"=="" (
38+
set "gtestFilter=*"
39+
) ELSE (
40+
set "gtestFilter=%3"
41+
)
42+
3743
set "buildTestCommand=bazel %bazelStartupCmd% build %bazelBuildArgs% --jobs=%NUMBER_OF_PROCESSORS% --verbose_failures //src:ovms_test"
3844
set "changeConfigsCmd=python windows_change_test_configs.py"
39-
set "runTest=%cd%\bazel-bin\src\ovms_test.exe --gtest_filter=* 2>&1 > win_full_test.log"
45+
set "runTest=%cd%\bazel-bin\src\ovms_test.exe --gtest_filter=!gtestFilter! 2>&1 | tee win_full_test.log"
4046

4147
:: Setting PATH environment variable based on default windows node settings: Added ovms_windows specific python settings and c:/opt and removed unused Nvidia and OCL specific tools.
4248
:: When changing the values here you can print the node default PATH value and base your changes on it.
@@ -75,10 +81,8 @@ if !errorlevel! neq 0 exit /b !errorlevel!
7581
if !errorlevel! neq 0 exit /b !errorlevel!
7682

7783
:: Start bazel build test
78-
%buildTestCommand% > win_build_test.log 2>&1
84+
%buildTestCommand% 2>&1 | tee win_build_test.log
7985
set "bazelExitCode=!errorlevel!"
80-
:: Output the log to the console
81-
type win_build_test.log
8286
:: Check the exit code and exit if it's not 0
8387
if !bazelExitCode! neq 0 exit /b !bazelExitCode!
8488

0 commit comments

Comments
 (0)