rust
rust copied to clipboard
Adding AttrValue enum
Hi @adamcrume,
I have opened this PR. I thought we could move our discussion from the issue page to here.
TODO: Struct definitions for AttrValue::list and AttrValue::func are still pending
Resolves issue: #290
Signed-off-by: Tejas Sanap [email protected]
I have a couple of questions.
- In the struct
NameAttrListthere is a field calledattr. We can see that it's type is: https://github.com/tensorflow/rust/blob/ceefb76ad8aa7b7e2fe0724279fead86ffe35539/src/protos/attr_value.rs#L1377-L1385 The type of the hashmap's value itself is: https://github.com/tensorflow/rust/blob/ceefb76ad8aa7b7e2fe0724279fead86ffe35539/src/protos/attr_value.rs#L26-L33 Do we have an equivalent of theAttrValueinprotos/attr_value.rsinsrc/lib.rsthe way we have forshape? I couldn't find any. - In
src/protos/attr_value.rswe have a struct calledAttrValuewhich uses the enumAttrValue_oneof_value. Why are we not creating the same objects inlib.rsinstead of changing their names? I'm just trying to understand your reasoning and what end goal you have in mind. - I'm curious about how the enums and structs we are creating fits into the bigger picture. Why are we exactly adding this
AttrValueenum in lib.rs? What will it enable us to do? What problems will it solve? I know this question sounds kind of stupid, but I want to understand the functional side of the code we are writing.