Skip to content

GH-17: feat(pipeline): Add serialization for pipeline features#59

Merged
Urfoex merged 1 commit intodevelopfrom
feature/GH-17-serialize-pipeline-features
Aug 29, 2025
Merged

GH-17: feat(pipeline): Add serialization for pipeline features#59
Urfoex merged 1 commit intodevelopfrom
feature/GH-17-serialize-pipeline-features

Conversation

@Urfoex
Copy link
Collaborator

@Urfoex Urfoex commented Aug 22, 2025

Implements the serialization of the features attribute from a getML Pipeline object.

  • Adds new Pydantic models Feature and Features to represent feature metadata.
  • Updates PipelineInformation to include the features field.
  • Implements the serialize_features function to convert getML features into the new Pydantic model.
  • Adds comprehensive unit tests and updates integration test data.

@Urfoex Urfoex requested a review from Copilot August 22, 2025 11:57
@Urfoex Urfoex self-assigned this Aug 22, 2025
@Urfoex Urfoex added the enhancement New feature or request label Aug 22, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements serialization of the features attribute from getML Pipeline objects by adding new Pydantic models and updating the pipeline serialization process.

  • Adds Feature and Features Pydantic models to represent feature metadata including name, index, target, importance, correlation, and SQL
  • Updates PipelineInformation to include the features field and implements the serialize_features function
  • Adds comprehensive unit tests and updates integration test data to validate the new functionality

Reviewed Changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/getml_io/getml/features.py Defines new Feature and Features Pydantic models for feature metadata
src/getml_io/metadata/pipeline_information.py Updates PipelineInformation to include features field
src/getml_io/serialize/pipeline.py Implements serialize_features function and updates pipeline serialization
tests/unit/types.py Adds type definitions for testing feature types
tests/unit/conftest.py Adds mock fixtures for testing feature serialization
tests/unit/serialize/test_pipeline.py Adds unit test for serialize_features function
tests/unit/serialize/test_pipeline_information.py Updates expected data to include empty features field
tests/unit/metadata/test_pipeline_information.py Updates test data with comprehensive feature examples
tests/integration/data/ Updates integration test data with actual feature serialization output
Comments suppressed due to low confidence (1)

tests/unit/types.py:54

  • [nitpick] The trailing comma should be retained for consistency with the rest of the type union. Consider changing this to | Sequence[str] without removing the comma on the next line.
    | float

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully implements the serialization of the features attribute from a getML Pipeline object. It introduces new Pydantic models for features, updates the PipelineInformation model, and adds the corresponding serialization logic. The changes are well-tested with new unit tests and updated integration test data. The code is clean and follows good practices. I have one suggestion for a minor improvement in the serialization logic to enhance conciseness and robustness.

@Urfoex Urfoex marked this pull request as ready for review August 22, 2025 12:07
@Urfoex Urfoex requested a review from srnnkls August 22, 2025 12:07
@Urfoex Urfoex linked an issue Aug 22, 2025 that may be closed by this pull request
5 tasks
@Urfoex Urfoex force-pushed the feature/GH-17-serialize-pipeline-features branch from c418d16 to 8e973bd Compare August 22, 2025 14:19
@Urfoex Urfoex requested a review from awaismirza92 August 25, 2025 08:43
Copy link
Collaborator

@srnnkls srnnkls left a comment

Choose a reason for hiding this comment

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

Perfect.

Copy link

@awaismirza92 awaismirza92 left a comment

Choose a reason for hiding this comment

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

LGTM

@Urfoex Urfoex force-pushed the refactor/GH-53-relative-dataframe-information-path-at-serialization branch from be86507 to 7e4293c Compare August 29, 2025 20:36
Base automatically changed from refactor/GH-53-relative-dataframe-information-path-at-serialization to develop August 29, 2025 20:37
Implements the serialization of the `features` attribute from a getML `Pipeline` object.

- Adds new Pydantic models `Feature` and `Features` to represent feature metadata.
- Updates `PipelineInformation` to include the `features` field.
- Implements the `serialize_features` function to convert getML features into the new Pydantic model.
- Adds comprehensive unit tests and updates integration test data.
@Urfoex Urfoex force-pushed the feature/GH-17-serialize-pipeline-features branch from 8e973bd to a34c757 Compare August 29, 2025 20:38
@Urfoex Urfoex merged commit 0588178 into develop Aug 29, 2025
0 of 3 checks passed
@Urfoex Urfoex deleted the feature/GH-17-serialize-pipeline-features branch August 29, 2025 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement features metadata serializers

3 participants

Comments