Skip to content

rfc: type metadata#1855

Merged
EngHabu merged 4 commits into
flyteorg:masterfrom
kennyworkman:kenny/metadata
Nov 29, 2021
Merged

rfc: type metadata#1855
EngHabu merged 4 commits into
flyteorg:masterfrom
kennyworkman:kenny/metadata

Conversation

@kennyworkman

Copy link
Copy Markdown
Contributor

No description provided.

@kumare3

kumare3 commented Nov 23, 2021

Copy link
Copy Markdown
Contributor

cc @eapolinario / @EngHabu. This looks pretty cool to me, just that the metadata field may be overloaded, especially in the dataclass case?

@EngHabu EngHabu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I've a few questions if you can please take a look

Comment thread rfc/system/1855-type-metadata.md
Comment thread rfc/system/1855-type-metadata.md
Comment thread rfc/system/1855-type-metadata.md
],
```

## 3 Proposed Implementation

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we include the work here to strip them in here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you help me understand why?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is so that the backend representation at runtime does not bloat and is important to remain efficient and performant

Comment thread rfc/system/1855-type-metadata.md
Comment thread rfc/system/1855-type-metadata.md Outdated

@EngHabu EngHabu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! one comment (to introduce a new field/message) and then let's merge it!

Comment thread rfc/system/1855-type-metadata.md Outdated
Users of flyte wish to have access to arbitrary parameter metadata specified in
typing annotations.

The `LiteralType` definition in flyteidl already has a `metadata` field in its

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Per the discussion in the comments here and on chat, I think it's better to introduce a new message and a corresponding field (and potentially deprecating metadata altogether eventually)...

And the rest of the spec look great.

message TypeMetadata {
  google.protobuf.Struct annotations = 1;
  // string type_hint = 2;
  // google.protobuf.Struct json_schema = 2;
 ...
}

message LiteralType 
{
...
   TypeMetadata metadata = 6; // For now I guess we have to call it type_metadata
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what purpose does replacing

google.protobuf.Struct metadata = 6;

with a nested message serve. Its just one more level of unwrapping for the exact same information?

Also, doesn't adding an additional field make more sense.?We don't break support for existing use of metadata for flyte specific implementation but allows for use of annotations as intended in a way that doesn't conflict.

Signed-off-by: Kenny Workman <kennyworkman@sbcglobal.net>
Signed-off-by: Kenny Workman <kennyworkman@sbcglobal.net>
Signed-off-by: Kenny Workman <kennyworkman@sbcglobal.net>
Signed-off-by: Kenny Workman <kennyworkman@sbcglobal.net>

@EngHabu EngHabu left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! #excited

@EngHabu
EngHabu merged commit 152aa6a into flyteorg:master Nov 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants