Skip to content

[BUG]onnx convert failed("KeyError: 'max_sequence_len'") #467

@ahqzy

Description

@ahqzy

hugectr2onnx_bst_test.zip
when do onnx inference(HugeCTR/test/onnx_converter_test/hugectr2onnx_bst_test.py), it failed as below:

# python ./hugectr2onnx_bst_test.py
[HUGECTR2ONNX][INFO]: Converting Data layer to ONNX
[HUGECTR2ONNX][INFO]: Converting DistributedSlotSparseEmbeddingHash layer to ONNX
[HUGECTR2ONNX][INFO]: Converting DistributedSlotSparseEmbeddingHash layer to ONNX
[HUGECTR2ONNX][INFO]: Converting DistributedSlotSparseEmbeddingHash layer to ONNX
[HUGECTR2ONNX][INFO]: Converting DistributedSlotSparseEmbeddingHash layer to ONNX
[HUGECTR2ONNX][INFO]: Converting DistributedSlotSparseEmbeddingHash layer to ONNX
[HUGECTR2ONNX][INFO]: Converting Slice layer to ONNX
Traceback (most recent call last):
  File "/nvidia_merlin/HugeCTR/test/onnx_converter_test/./bst.py", line 91, in <module>
    hugectr2onnx_bst_test(
  File "/nvidia_merlin/HugeCTR/test/onnx_converter_test/./bst.py", line 63, in hugectr2onnx_bst_test
    hugectr2onnx.converter.convert(onnx_model_path, graph_config, dense_model, True, sparse_models)
  File "/usr/local/lib/python3.10/dist-packages/hugectr2onnx-0.0.0-py3.10.egg/hugectr2onnx/converter.py", line 44, in convert
  File "/usr/local/lib/python3.10/dist-packages/hugectr2onnx-0.0.0-py3.10.egg/hugectr2onnx/hugectr_loader.py", line 320, in load_layer
KeyError: 'max_sequence_len'

How to solve this?

(attach is python code)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions