feat: add model card packaging#180
Conversation
Greptile SummaryThis PR adds automatic model card generation during the packaging phase, producing a comprehensive Key changes:
Code quality:
Confidence Score: 5/5
|
| Filename | Overview |
|---|---|
| plexe/templates/packaging/model_card_template.py | added comprehensive model card generator with robust error handling and fallbacks |
| plexe/workflow.py | integrated model card generation into packaging phase with proper data flow |
| tests/unit/workflow/test_model_card.py | added comprehensive tests covering full-context and minimal-context scenarios |
Last reviewed commit: 7109c9a
|
@greptileai review again with latest changes |
There was a problem hiding this comment.
Pull request overview
This PR introduces automatic generation of a MODEL_CARD.md artifact during the model packaging workflow, aiming to make packaged models self-documenting and easier to review/deploy.
Changes:
- Add a model card generator that composes Markdown from packaged artifacts (
model.yaml, input schema, hyperparameters) plus optional evaluation outputs. - Integrate model card generation into
package_final_model()soMODEL_CARD.mdis written into the packaged model directory. - Add unit tests covering full-context vs minimal-context model card generation paths, and update test/code index docs.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
plexe/workflow.py |
Calls the model card generator during packaging and writes MODEL_CARD.md into the package. |
plexe/templates/packaging/model_card_template.py |
Implements the Markdown model card generator and supporting helpers. |
tests/unit/workflow/test_model_card.py |
Adds unit tests validating headers/sections and minimal fallback behavior. |
tests/unit/workflow/__init__.py |
Adds workflow unit test package marker/docstring. |
tests/CODE_INDEX.md |
Regenerates test code index to include new workflow test module. |
plexe/CODE_INDEX.md |
Regenerates plexe code index to include the new packaging template module. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@greptileai please review again with latest changes |
0a876d4 to
513a048
Compare
|
@greptileai review again with latest changes |
|
@greptileai please review again with latest changes |
This PR adds automatic model card generation during packaging, producing a MODEL_CARD.md artifact with summary, dataset details, feature usage, evaluation highlights, hyperparameters, limitations, and reproducibility metadata. The aim is to make packaged models self-documenting and easier to review and deploy. It also adds unit tests covering both full-context and minimal-context generation flows.
Testing
poetry run pytest tests/unit/workflow/test_model_card.pypoetry run pytest tests/unit/test_imports.py