From 34563a9f42e4d20907316bccecce112b8d2c1437 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Fri, 10 Jan 2025 08:20:13 +0100 Subject: [PATCH] PYTHON: remove WA for size_t types because of ov::Any --- src/python/py_utils.cpp | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/src/python/py_utils.cpp b/src/python/py_utils.cpp index 1fc34a36d2..bad702d54d 100644 --- a/src/python/py_utils.cpp +++ b/src/python/py_utils.cpp @@ -68,25 +68,6 @@ ov::AnyMap py_object_to_any_map(const py::object& py_obj) { } ov::Any py_object_to_any(const py::object& py_obj, std::string property_name) { - // Python types - // TODO: Remove this after ov::Any is fixed to allow pass types, that can be casted to target type. Ticket: 157622 - std::set size_t_properties = { - "max_new_tokens", - "max_length", - "min_new_tokens", - "logprobs", - "num_beam_groups", - "num_beams", - "num_return_sequences", - "no_repeat_ngram_size", - "top_k", - "rng_seed", - "num_assistant_tokens", - "max_initial_timestamp_index", - "num_images_per_prompt", - "num_inference_steps", - "max_sequence_length" - }; // These properties should be casted to ov::AnyMap, instead of std::map. std::set any_map_properties = { "GENERATE_CONFIG", @@ -105,9 +86,6 @@ ov::Any py_object_to_any(const py::object& py_obj, std::string property_name) { } else if (py::isinstance(py_obj, float_32_type)) { return py_obj.cast(); } else if (py::isinstance(py_obj)) { - if (size_t_properties.find(property_name) != size_t_properties.end()) { - return py_obj.cast(); - } return py_obj.cast(); } else if (py::isinstance(py_obj)) { return {};