GH-50: feat(pipeline): Add serialization for columns#64
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements serialization support for pipeline column information by defining a new pydantic Column model and integrating it into the existing pipeline serialization structure.
Key changes:
- Adds a new
Columnpydantic model with index, name, marker, table, target, and importance fields - Implements
serialize_columnsfunction to convert from getML'sColumnsobject to the pydantic model - Updates the
PipelineInformationmodel to include acolumnsfield, replacing a TODO placeholder
Reviewed Changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
src/getml_io/getml/columns.py |
Defines the new Column pydantic model |
src/getml_io/metadata/pipeline_information.py |
Adds columns field to PipelineInformation model |
src/getml_io/serialize/pipeline.py |
Implements serialize_columns function and integrates it into pipeline serialization |
| Test files | Updates unit and integration tests to include the new columns field in expected outputs |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request effectively adds serialization for pipeline column information. The new Column pydantic model is well-defined, and the integration into PipelineInformation is clean. The serialize_columns function correctly handles the conversion, and the tests have been updated accordingly. I've provided a couple of suggestions to improve robustness and test maintainability. Overall, great work!
Defines a pydantic model for a pipeline's column information and integrates it into the `PipelineInformation` structure, replacing a TODO. Implements the `serialize_columns` function to convert from the getML library's `Columns` object to the new pydantic model. Updates unit and integration tests to include the new 'columns' field, ensuring correctness and updating test fixtures. Resolves: #50
3c39b67 to
2cef32e
Compare
Defines a pydantic model for a pipeline's column information and integrates it into the
PipelineInformationstructure, replacing a TODO.Implements the
serialize_columnsfunction to convert from the getML library'sColumnsobject to the new pydantic model.Updates unit and integration tests to include the new 'columns' field, ensuring correctness and updating test fixtures.
Resolves: #50