chakra icon indicating copy to clipboard operation
chakra copied to clipboard

Support Any type in AttributeProto

Open ajbalogh opened this issue 1 year ago • 6 comments

Summary

This PR adds the Any type to the AttributeProto message as a single any_val and repeated any_list.

The Any type in Any.proto is a standard Protobuf definition included with the Protobuf installation.

The rationale behind this is that a user wants to use complex protobuf messages for metrics and configuration and add them to individual et_def.Node messages.

The any_val field in AttributeProto allows a user to easily serialize/deserialize messages into a single field while preserving the structure of the message and associated internal documentation and options.

ajbalogh avatar Mar 28 '24 13:03 ajbalogh

MLCommons CLA bot All contributors have signed the MLCommons CLA ✍️ ✅

github-actions[bot] avatar Mar 28 '24 13:03 github-actions[bot]

Thank you for your contribution, Andy!

  • Could you please share the motivation behind introducing the new fields, Any and AnyList?
  • Is it necessary to import google/protobuf/any.proto? If these are not native data types supported by protobuf, could you explain the rationale for including them?

TaekyungHeo avatar Apr 01 '24 18:04 TaekyungHeo

@TaekyungHeo I've updated the summary to include the rationale behind the any type.

ajbalogh avatar Apr 01 '24 18:04 ajbalogh

@ajbalogh - repeating a question @TaekyungHeo already asked... if Any is a native type, why do we need to import the type?

srinivas212 avatar Apr 05 '24 02:04 srinivas212

@srinivas212 @TaekyungHeo - Any isn't a native type but a standard protobuf definition that is included with the protobuf installation and as result requires it to be imported.

ajbalogh avatar Apr 05 '24 04:04 ajbalogh

@srinivas212 , I think @ajbalogh 's point makes sense.

TaekyungHeo avatar Apr 15 '24 18:04 TaekyungHeo

Hi @ajbalogh -- Can you try to resolve the merge conflict? We can then accept this PR to close it.

tushar-krishna avatar Feb 10 '25 20:02 tushar-krishna