[TF FE] Reduce redundant deps and routines for layer tests (#24314)
**Details:** Reduce redundant deps and routines for layer tests **Ticket:** TBD Signed-off-by: Kazantsev, Roman <roman.kazantsev@intel.com>
This commit is contained in:
parent
714bffc626
commit
f67e108dba
|
|
@ -1,28 +0,0 @@
|
|||
# Copyright (C) 2018-2024 Intel Corporation
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
import os
|
||||
import defusedxml.ElementTree as ET
|
||||
|
||||
|
||||
def mapping_parser(file):
|
||||
"""
|
||||
Parse mapping file if it exists
|
||||
:param file: Name of mapping file
|
||||
:return: Dictionary with framework layers as keys and IR layers as values
|
||||
"""
|
||||
mapping_dict = {}
|
||||
if os.path.splitext(file)[1] == '.mapping' and os.path.isfile(file):
|
||||
xml_tree = ET.parse(file)
|
||||
xml_root = xml_tree.getroot()
|
||||
for child in xml_root:
|
||||
framework_info = child.find('.//framework')
|
||||
ir_info = child.find('.//IR')
|
||||
if framework_info is None:
|
||||
continue
|
||||
framework_name = framework_info.attrib['name']
|
||||
ir_name = ir_info.attrib['name'] if ir_info is not None else None
|
||||
mapping_dict[framework_name] = ir_name
|
||||
else:
|
||||
raise FileNotFoundError("Mapping file was not found at path {}!".format(os.path.dirname(file)))
|
||||
return mapping_dict
|
||||
|
|
@ -12,9 +12,7 @@ transformers
|
|||
packaging
|
||||
pillow
|
||||
pytest
|
||||
networkx
|
||||
defusedxml
|
||||
fastjsonschema
|
||||
tensorflow
|
||||
tensorflow-addons; python_version <= '3.10'
|
||||
jax; sys_platform == "linux" and platform_machine == "x86_64" # https://jax.readthedocs.io/en/latest/installation.html#pip-installation-cpu - wheels are for "x86_64" only
|
||||
|
|
|
|||
Loading…
Reference in New Issue