Skip to content

Conversation

@ashwinvaidya17
Copy link
Contributor

πŸ“ Description

image

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:

  • πŸš€ New feature (non-breaking change which adds functionality)
  • 🐞 Bug fix (non-breaking change which fixes an issue)
  • πŸ”„ Refactor (non-breaking change which refactors the code base)
  • ⚑ Performance improvements
  • 🎨 Style changes (code style/formatting)
  • πŸ§ͺ Tests (adding/modifying tests)
  • πŸ“š Documentation update
  • πŸ“¦ Build system changes
  • 🚧 CI/CD configuration
  • πŸ”§ Chore (general maintenance)
  • πŸ”’ Security update
  • πŸ’₯ Breaking change (fix or feature that would cause existing functionality to not work as expected)

βœ… Checklist

Before you submit your pull request, please make sure you have completed the following steps:

  • πŸ“š I have made the necessary updates to the documentation (if applicable).
  • πŸ§ͺ I have written tests that support my changes and prove that my fix is effective or my feature works (if applicable).
  • 🏷️ My PR title follows conventional commit format.

For more information about code review checklists, see the Code Review Checklist.

Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Copy link
Contributor

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 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 ModelInfo objects 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.

Comment on lines 49 to 50
let parts = modelFamily.split('_');
return parts.map((part) => part.charAt(0).toUpperCase() + part.slice(1)).join(' ');
Copy link

Copilot AI Dec 12, 2025

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.

Suggested change
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(' ');

Copilot uses AI. Check for mistakes.

// Model family badge colors
.modelFamilyPatchBased {
background-color: #4a90e2 !important;
Copy link

Copilot AI Dec 12, 2025

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.

Copilot uses AI. Check for mistakes.
}

.modelFamilyMemoryBank {
background-color: #7b68ee !important;
Copy link

Copilot AI Dec 12, 2025

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.

Copilot uses AI. Check for mistakes.
}

.modelFamilyStudentTeacher {
background-color: #50c878 !important;
Copy link

Copilot AI Dec 12, 2025

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.

Copilot uses AI. Check for mistakes.
}

.modelFamilyReconstruction {
background-color: #ff6b6b !important;
Copy link

Copilot AI Dec 12, 2025

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.

Copilot uses AI. Check for mistakes.
}

.modelFamilyDistributionMap {
background-color: #ffa500 !important;
Copy link

Copilot AI Dec 12, 2025

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.

Copilot uses AI. Check for mistakes.
@ashwinvaidya17 ashwinvaidya17 changed the title πŸ› οΈ fix(inspect): Use hard-coded model info πŸ› οΈ fix(inspect): use hard-coded model info Dec 12, 2025
Signed-off-by: Ashwin Vaidya <ashwin.vaidya@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant