Skip to content

Commit 9f636e9

Browse files
[CB] Fix test valid configs (openvinotoolkit#1202)
Fixed `test_valid_configs`: ``` FAILED tests/python_tests/test_generate_api.py::test_valid_configs - RuntimeError: Check 'eos_token_id != -1 || max_new_tokens != (18446744073709551615UL) || max_length != (18446744073709551615UL)' failed at /home/runner/work/openvino.genai/openvino.genai/src/cpp/src/generation_config.cpp:164: Either 'eos_token_id', or 'max_new_tokens', or 'max_length' should be defined. ``` See https://github.com/openvinotoolkit/openvino.genai/actions/runs/11797566325/job/32862069017?pr=882
1 parent 7039c3e commit 9f636e9

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ temp/
2424
.repo/
2525
CMakeLists.txt.user
2626
CMakeUserPresets.json
27+
.env
2728

2829
*.project
2930
*.cproject

src/cpp/src/llm_pipeline.cpp

+6-4
Original file line numberDiff line numberDiff line change
@@ -433,8 +433,9 @@ class ContinuousBatchingAdapter final : public LLMPipelineImplBase {
433433
tokenizer,
434434
scheduler_config,
435435
device,
436-
plugin_config
437-
} {}
436+
plugin_config} {
437+
m_generation_config = m_impl.get_config();
438+
}
438439

439440
ContinuousBatchingAdapter(
440441
const std::filesystem::path& models_path,
@@ -446,8 +447,9 @@ class ContinuousBatchingAdapter final : public LLMPipelineImplBase {
446447
m_tokenizer,
447448
scheduler_config,
448449
device,
449-
plugin_config
450-
} {}
450+
plugin_config} {
451+
m_generation_config = m_impl.get_config();
452+
}
451453

452454
DecodedResults generate(
453455
StringInputs inputs,

0 commit comments

Comments
 (0)