Skip to content

Commit

Permalink
Python: reflect inheritance between VLM and LLM decoded results
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-lavrenov committed Jan 9, 2025
1 parent f1802f5 commit fafd6a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/python/openvino_genai/py_openvino_genai.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1745,7 +1745,7 @@ class UNet2DConditionModel:
...
def set_hidden_states(self, tensor_name: str, encoder_hidden_states: openvino._pyopenvino.Tensor) -> None:
...
class VLMDecodedResults:
class VLMDecodedResults(DecodedResults):
"""
Structure to store resulting batched text outputs and scores for each batch.
Expand Down
2 changes: 1 addition & 1 deletion src/python/py_vlm_pipeline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ void init_vlm_pipeline(py::module_& m) {
.def("get_prepare_embeddings_duration", &ov::genai::VLMPerfMetrics::get_prepare_embeddings_duration)
.def_readonly("vlm_raw_metrics", &ov::genai::VLMPerfMetrics::vlm_raw_metrics);

py::class_<ov::genai::VLMDecodedResults>(m, "VLMDecodedResults", decoded_results_docstring)
py::class_<ov::genai::VLMDecodedResults, ov::genai::DecodedResults>(m, "VLMDecodedResults", decoded_results_docstring)
.def(py::init<>())
.def_property_readonly("texts", [](const ov::genai::VLMDecodedResults &dr) -> py::typing::List<py::str> { return pyutils::handle_utf8(dr.texts); })
.def_readonly("scores", &ov::genai::VLMDecodedResults::scores)
Expand Down

0 comments on commit fafd6a3

Please sign in to comment.