Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rfc: type metadata #1855

Merged
merged 4 commits into from
Nov 29, 2021
Merged

rfc: type metadata #1855

merged 4 commits into from
Nov 29, 2021

Conversation

kennyworkman
Copy link
Contributor

No description provided.

@kumare3
Copy link
Contributor

kumare3 commented Nov 23, 2021

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

Copy link
Contributor

@EngHabu EngHabu left a comment

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

rfc/system/1855-type-metadata.md Show resolved Hide resolved
rfc/system/1855-type-metadata.md Show resolved Hide resolved
rfc/system/1855-type-metadata.md Show resolved Hide resolved
],
```

## 3 Proposed Implementation
Copy link
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
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
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

Copy link
Contributor

@EngHabu EngHabu left a comment

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!

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
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
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 <[email protected]>
Signed-off-by: Kenny Workman <[email protected]>
Signed-off-by: Kenny Workman <[email protected]>
Copy link
Contributor

@EngHabu EngHabu left a comment

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