Hello,
in this topic @omria suggested some code to solve issue. However, because it was left without a final answer, I’ve decided to create a new one, to emphasis the fact that this is a serious issue. We simply cannot have millions or billions of messages logged into a file on edge based systems (in any systems to be frank).
I’ve spent a significant amount of time, trying to solve the issue. Here is what I did:
Env:
libhailort.so 4.22.0 (/usr/lib/libhailort.so.4.22.0)
hailo_platform==4.22.0
Python 3.10.6, PCIe
HEF with a single group & network: group=yolov6n, network=yolov6n/yolov6n
Goal: pass the network group/name from Python so the log doesn’t spam:
[HailoRT] [info] [hef.cpp:1994] [get_network_group_and_network_name] No name was given. Addressing all networks of default network_group: yolov6n
What I see in Python:
from hailo_platform import HEF
hef = HEF(“yolov6n_2.hef”)
print(hef.get_network_group_names()) # \[‘yolov6n’\]
print(hef.get_networks_names(“yolov6n”)) # \[‘yolov6n/yolov6n’\]
Minimal failing examples
A) Using the low-level ConfigureParams
(this is the type configure()
expects)
from hailo_platform import HEF, VDevice
from hailo_platform.pyhailort._pyhailort import ConfigureParams # low-level
hef = HEF("yolov6n.hef")
vdev = VDevice()
# 1) Key = group name
cfg_map = {"yolov6n": ConfigureParams()}
vdev.configure(hef, cfg_map)
# -> HailoRTNotFoundException:
# [HailoRT] [error] Failed to find network with network name yolov6n/yolov6n
# 2) Key = "group/network" (just to try)
cfg_map = {"yolov6n/yolov6n": ConfigureParams()}
vdev.configure(hef, cfg_map)
# -> HailoRTInvalidArgumentException:
# Some network group names in the configuration are not found in the hef file: yolov6n/yolov6n
B) Using the high-level ConfigureParams
from hailo_platform import HEF, VDevice, ConfigureParams # high-level
hef = HEF("yolov6n.hef")
vdev = VDevice()
cfg_map = {"yolov6n": ConfigureParams()}
vdev.configure(hef, cfg_map)
# -> TypeError: expected Dict[str, hailo_platform.pyhailort._pyhailort.ConfigureParams]
# got Dict[str, hailo_platform.ConfigureParams]
So Python exposes two classes named ConfigureParams
(high-level and low-level), and configure()
accepts only the low-level one—but with that one I still can’t provide a group/network name, leading to the errors above and the “No name was given…” log on every inference.
Questions:
- In HailoRT 4.22.0, what is the correct, supported way in Python to pass the network group/name to
VDevice.configure()
so that:
-
it finds
yolov6n/yolov6n
, and -
the log message “No name was given…” disappears?
- Is the presence of two
ConfigureParams
(high- vs low-level) and the resulting type mismatch expected, or is this a packaging/API inconsistency?