google-ai-edge/model-explorer

[Feature Request] Adding Metadata to layers

el-agua opened this issue · 7 comments

Would be nice to be able to add metadata directly to layers, the same way we can add attributes to input, output, and nodes themselves.

Hi @el-agua, would you say this is a duplicate of #48 ?

From my initial reading, I think it may be different? From my understanding, #48 refers to nodes, where I think it would be beneficial to add metadata to namespaces.

Thanks @el-agua, we're in the process of defining our roadmap and we'll keep this in mind.

Hi @el-agua, can you describe your use case a bit more elaborately -- we want to understand why you want this feature so that we may judge how important it is and how we may prioritize it.

We are trying to model systems. For example, a car would have nodes that model velocity, position, angular velocity, etc. However, the car itself would be a layer in this graph, and it would be nice to be able to store k/v pairs on that (make, model, etc).

Hi @el-agua,

Thank you for sharing your valuable feedback and use case with us. We appreciate your interest in this feature.

Currently, our focus is on enhancing the core machine learning capabilities of our platform. However, we're excited about the possibility of expanding our offerings in the future. Once our front-end becomes open source, we welcome any contributions you or any others would like to make in adding this functionality.

In the meantime, we'll keep your suggestion in mind as we plan for future enhancements. We appreciate your understanding and look forward to collaborating with the community.

Hi,

We've added the support in v0.1.10. Please give it a try:

  • Add support for adding custom attributes to group/layer nodes.
    Use the new groupNodeAttributes field in graph_builder.Graph. Example:

    graph = gb.Graph(id='graph',
                     nodes=[top_node, node0, node1, node2],
                     groupNodeAttributes={
                         # Use empty name for graph-level attributes.
                         '': {'model attr': 'value'},
                         'layer1': {'layer attr': 'value'}})

    graph node attributes