google-ai-edge / model-explorer

A modern model graph visualizer and debugger
Apache License 2.0
944 stars 65 forks source link

[Feature Request] Support displaying model/node metadata #48

Open justinchuby opened 2 months ago

justinchuby commented 2 months ago

There are model metadata that is not currently representable in the Graph object. It would be great to provide a mechanism to include more metadata.

Would also be great to allow metadata on nodes (from the model).

Also the NodeDataResult for custom node data can only be a number at the moment. Supporting strings in some ways would be useful.

pkgoogle commented 2 months ago

Hi @justinchuby, thanks for your request. Just a small point of clarification , are you saying metadata is in the model/nodes but it is not being displayed? or that the underlying model object itself is not allowing model metadata?

justinchuby commented 2 months ago

The underlying model object itself is not allowing model metadata as I understand. I couldn’t find a field on Graph to add metadata.

pkgoogle commented 1 month ago

Hi @justinchuby do you have a model with metadata we can use as an example?

justinchuby commented 1 month ago

For example https://github.com/onnx/models/blob/main/Natural_Language_Processing/bert_Opset18_transformers/bert_Opset18.onnx

image

you can find ir_version, producer, version and others (https://github.com/onnx/onnx/blob/88f8ef15cfaa3138d336f3502aed5018d802bf43/onnx/onnx.proto#L357) and https://github.com/onnx/onnx/blob/88f8ef15cfaa3138d336f3502aed5018d802bf43/onnx/onnx.proto#L490 around both the model and the graph.

It would be good enough if there is a metadata field for graphs in model explorer so we can put all of these key-value pairs there.