What is the purpose of `tag` in the flytekit.model...
# flytekit
r
What is the purpose of
tag
in the flytekit.models
Binary
literal?
Copy code
class Binary(_common.FlyteIdlEntity):
    def __init__(self, value, tag):
        """
        :param bytes value:
        :param Text tag:
        """
        self._value = value
        self._tag = tag
k
Idea was to keep things like the protobuf message name etc in it
r
For context am writing a TypeTransformer where for certain reasons we want to pickle a dataclass rather than serializing it to JSON and was curious what to specify for that value
Ah ok, thank you - does the value of
tag
matter in the case I'm describing? Sounds like the answer is no
k
So yes you can keep any meta information as it will be used by the compiler to statically verify
It is optional, if you put the class id it should work nicely
r
Cool, that's what I figured, thanks @Ketan (kumare3). Will use the fully-qualified class name as the tag.
156 Views