-
Notifications
You must be signed in to change notification settings - Fork 846
π οΈ fix(inspect): use hard-coded model info #3216
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
base: feature/geti-inspect
Are you sure you want to change the base?
π οΈ fix(inspect): use hard-coded model info #3216
Conversation
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
There was a problem hiding this 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 refactors the trainable model list UI to use hard-coded model information instead of dynamically fetched minimal data. The backend now returns detailed model metadata including training time indicators, model families, license information, and recommendation status, which the frontend displays with enhanced visual elements.
Key Changes:
- Backend now returns structured
ModelInfoobjects with metadata instead of simple model name strings - Frontend displays training time icons (coffee/walk/cycle), model family badges with color coding, license information, and recommendation badges
- Removed the old rating system (accuracy/inference speed/training time bars) in favor of the new display format
Reviewed changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
application/ui/src/features/inspect/train-model/trainable-model-list-box.component.tsx |
Refactored to consume new model metadata structure and display training time icons, model family badges, and recommendation status |
application/ui/src/features/inspect/train-model/train-model.module.scss |
Added styles for badges, training time icons, license badges, and model family color variants |
application/ui/src/assets/icons/index.ts |
Added new icon exports (Coffee, Cycle, Walk) and reorganized existing exports alphabetically |
application/backend/src/pydantic_models/trainable_model.py |
Defined new data models: ModelFamily, TrainingTime, and ModelInfo with structured metadata fields |
application/backend/src/pydantic_models/__init__.py |
Exported new model classes for use across the application |
application/backend/src/api/endpoints/trainable_models_endpoints.py |
Replaced dynamic model listing with hard-coded model information including metadata for 9 models |
π‘ Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| let parts = modelFamily.split('_'); | ||
| return parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(' '); |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The variable 'parts' should be renamed to something more descriptive like 'words' or 'familyWords' to better convey that it contains the individual words from the model family name.
| let parts = modelFamily.split('_'); | |
| return parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(' '); | |
| let words = modelFamily.split('_'); | |
| return words.map((word) => word.charAt(0).toUpperCase() + word.slice(1)).join(' '); |
|
|
||
| // Model family badge colors | ||
| .modelFamilyPatchBased { | ||
| background-color: #4a90e2 !important; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded hex color values should be defined as CSS custom properties (variables) for consistency and maintainability. Consider defining these colors at the top of the file or in a shared theme file.
| } | ||
|
|
||
| .modelFamilyMemoryBank { | ||
| background-color: #7b68ee !important; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded hex color values should be defined as CSS custom properties (variables) for consistency and maintainability. Consider defining these colors at the top of the file or in a shared theme file.
| } | ||
|
|
||
| .modelFamilyStudentTeacher { | ||
| background-color: #50c878 !important; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded hex color values should be defined as CSS custom properties (variables) for consistency and maintainability. Consider defining these colors at the top of the file or in a shared theme file.
| } | ||
|
|
||
| .modelFamilyReconstruction { | ||
| background-color: #ff6b6b !important; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded hex color values should be defined as CSS custom properties (variables) for consistency and maintainability. Consider defining these colors at the top of the file or in a shared theme file.
| } | ||
|
|
||
| .modelFamilyDistributionMap { | ||
| background-color: #ffa500 !important; |
Copilot
AI
Dec 12, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hard-coded hex color values should be defined as CSS custom properties (variables) for consistency and maintainability. Consider defining these colors at the top of the file or in a shared theme file.
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
π Description
Note
The svgs looks strange in GH preview as they have stroke assigned to them with empty value so that css paints over it
Select what type of change your PR is:
β Checklist
Before you submit your pull request, please make sure you have completed the following steps:
For more information about code review checklists, see the Code Review Checklist.