Skip to content

fix(ui): keep base model selection consistent across training flows - #179

Merged
Marcelo (madpsys) merged 2 commits into
mainfrom
v-marcelod/fix/model-catalog-dropdown-not-working
Sep 1, 2026
Merged

fix(ui): keep base model selection consistent across training flows#179
Marcelo (madpsys) merged 2 commits into
mainfrom
v-marcelod/fix/model-catalog-dropdown-not-working

Conversation

@madpsys

@madpsys Marcelo (madpsys) commented Aug 31, 2026

Copy link
Copy Markdown
Collaborator

Description

Fixes the Base Model dropdown in the training form so that:

  • The selected base model remains visible after selection.
  • Existing models recover their selected catalog entry from initialWeightsUrl.
  • Catalog requests omit absent filters instead of sending eventTypes=undefined.
  • Training launched from the Labeling Tool and project listing uses the same event-type and imagery-source filters.
  • Catalog entries with null descriptions no longer cause an error.
  • External catalog entries without a modelId use baseModelName as a stable fallback key.
  • Removes unused leftPanel and rightPanel components.

This change also removes the unused legacy Labeling Tool panel components.

Fixes #

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that changes existing behavior)
  • Documentation update
  • Infrastructure / CI change

Checklist

  • I have read CONTRIBUTING.md
  • My changes follow the project's coding standards (PEP 8 for Python, ESLint rules for JS/TS)
  • I have added or updated tests that cover my changes
  • Python tests pass locally (cd hastelib && hatch run test:pytest) and the UI lints clean (cd ui && npm run lint)
  • I have updated the relevant documentation (README, docs/, inline comments)
  • I have added an entry to CHANGELOG.md if this is a user-facing change

Testing

The following validations were completed:

  • node --test
    • 100 tests passed.
  • node --test src/Components/BaseModelDropdownHelper.test.js
    • 6 focused regression tests passed.
  • npm run build
    • Production build completed successfully.
  • git diff --check
    • No whitespace errors found.
  • Targeted ESLint validation passed for the new and modified dropdown helper files.

The repository-wide UI lint still reports pre-existing errors unrelated to this change, so the combined Python/UI validation checklist remains unchecked.

Additional context

Training consumes initialWeightsUrl, so the submitted training payload remains compatible with the existing backend contract. baseModelId is maintained in UI state to control the dropdown and is resolved from the catalog checkpoint URL when editing an existing model.

The authentication configuration for the Model Catalog routes was not changed. Those routes continue to use AuthLevel.FUNCTION.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Aligns base-model selection and filtering across UI training flows.

Changes:

  • Adds catalog query, normalization, and selection helpers with regression tests.
  • Restores selections from checkpoint URLs and safely handles null descriptions.
  • Passes project event types and image-layer metadata from the Labeling Tool.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
BaseModelDropdown.jsx Uses normalized, controlled selections.
BaseModelDropdownHelper.js Adds catalog and selection utilities.
BaseModelDropdownHelper.test.js Tests helper behavior.
CreateEditModelTrainingHelper.js Builds filtered catalog options.
CreateEditModelTrainingModal.jsx Restores the selected base model.
LabelingTool/LabelingTool.jsx Loads training filter metadata.
LabelingTool/LabelingToolRightPanel.jsx Passes consistent training filters.
LabelingTool/LeftPanel.jsx Removes obsolete panel.
LabelingTool/RightPanel.jsx Removes obsolete panel.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread ui/src/Components/CreateEditModelTrainingHelper.js Outdated
@madpsys
Marcelo (madpsys) merged commit 24890a7 into main Sep 1, 2026
12 checks passed
@madpsys
Marcelo (madpsys) deleted the v-marcelod/fix/model-catalog-dropdown-not-working branch September 1, 2026 15:16
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.

3 participants