Getting the error: Exception: Encountered error during parsing: 'config_values'

Hi everybody!

I am trying to convert an ONNX model to the HEF format. I have installed the Hailo Data Compiler and Hailo Model Zoo and followed the instructions from the official Hailo repository on GitHub and the documentation.

Right now I am trying to compile a model by using the following command:

hailomz compile yolov8n --ckpt model.onnx --hw-arch hailo8l --classes 40

As a result, I get the error:

Traceback (most recent call last):
  File "/home/efimov/packages/hailo/hailodfc/bin/hailomz", line 33, in <module>
    sys.exit(load_entry_point('hailo-model-zoo', 'console_scripts', 'hailomz')())
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/main.py", line 122, in main
    run(args)
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/main.py", line 111, in run
    return handlers[args.command](args)
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 250, in compile
    runner = _ensure_optimized(runner, logger, args, network_info)
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 73, in _ensure_optimized
    runner = _ensure_parsed(runner, logger, network_info, args)
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/main_driver.py", line 110, in _ensure_parsed
    return parse_model(runner, network_info, ckpt_path=args.ckpt_path, results_dir=args.results_dir, logger=logger)
  File "/home/efimov/packages/hailo/hailo_model_zoo/hailo_model_zoo/core/main_utils.py", line 124, in parse_model
    raise Exception(f"Encountered error during parsing: {err}") from None
Exception: Encountered error during parsing: 'config_values'

I have not found any useful information on how to resolve this issue.

PS: I also tried to provide the default YAML configuration file for this command but it didn’t help:

hailomz compile yolov8n --ckpt model.onnx --hw-arch hailo8l --classes 40 --yaml hailo_model_zoo/cfg/networks/yolov8n.yaml

I would be very thankful if anybody can explain me or give a hint why the compilation does not work.

Hey @Vyacheslav_Efimov ,

Welcome to the Hailo Community!

It looks like there’s an issue with your compilation process. To get your model running on Hailo hardware, you’ll need to follow these steps:

  1. First, convert your ONNX model to Hailo’s internal representation (HAR) using the hailomz parse command:
hailomz parse --ckpt model.onnx --hw-arch hailo8l --yaml hailo_model_zoo/cfg/networks/yolov8n.yaml --output model.har
  1. Next, optimize the HAR file for better performance on Hailo’s architecture:
hailomz optimize --har model.har --output optimized_model.har
  1. Finally, compile the optimized HAR into a Hailo Executable Format (HEF) file that can be deployed on Hailo devices:
hailomz compile --har optimized_model.har --hw-arch hailo8l --classes 40 --output model.hef

If you run into any problems or have questions along the way, just let me know. I’m here to help!

Looking forward to seeing your model up and running on Hailo soon.