feat(mlop-2760): Create metadata module (feature, feature_set, reader, writer and pipeline)#418
Merged
feat(mlop-2760): Create metadata module (feature, feature_set, reader, writer and pipeline)#418
Conversation
🎉 Snyk checks have passed. No issues have been found so far.✅ code/snyk check is complete. No issues have been found. (View Details) |
…dd @field_serializer
lecardozo
reviewed
May 22, 2025
Collaborator
lecardozo
left a comment
There was a problem hiding this comment.
nice work! I have some minor questions:
- We have this
butterfree/reports/metadata.pylogic that is used behind the scenes for building the markdown catalog. Do you think we would benefit from that? - If we decide on replacing that abstraction with this pydantic-based one, I think we can maybe have each component generating its own "serialized" version so the "parent" component would call the children
build_metadatamethod
marcoVinha
reviewed
May 22, 2025
marcoVinha
reviewed
May 22, 2025
marcoVinha
reviewed
May 22, 2025
marcoVinha
reviewed
May 22, 2025
marcoVinha
reviewed
May 22, 2025
marcoVinha
reviewed
May 22, 2025
|
michellyrds
approved these changes
Jun 6, 2025
albjoaov
pushed a commit
that referenced
this pull request
Jun 6, 2025
🤖 I have created a release *beep* *boop* --- ## [1.8.0](1.7.2...1.8.0) (2025-06-06) ### Features * **mlop-2760:** Create metadata module (feature, feature_set, reader, writer and pipeline) ([#418](#418)) ([f5c12f1](f5c12f1)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Why
This change introduces a robust metadata generation system for Butterfree components. The primary motivation is to create a standardized and automated way to:
This will improve the maintainability, understandability, and interoperability of feature set pipelines within the Butterfree ecosystem.
What
New
metadatamodule:Dependencies
Tests
How
The solution refactors and centralizes metadata definition using Pydantic models within a dedicated
butterfree/metadatadirectory.Hierarchical Metadata Construction:
Individual components (
Feature,KeyFeature,TimestampFeature,Window,Readersubclasses,Writer) are responsible for building their own metadata Pydantic models (FeatureMetadata,ReaderMetadatavariants,WriterMetadata).Container classes (
FeatureSet,AggregatedFeatureSet,FeatureSetPipeline) aggregate metadata from their constituent parts. For instance,FeatureSet.build_metadata()callsbuild_metadata()on its keys, timestamp, and then constructs metadata for its transformed features before packaging it all into aFeatureSetMetadataobject.Pydantic Model Usage: Each metadata type (e.g., for a feature, a reader, a feature set) has a corresponding Pydantic model ensuring structure and validation.