Skip to content

Fix/hpo with one-hot encoder and score system#656

Merged
cristian-tamblay merged 2 commits into
developfrom
fix/hpo-onehot
May 29, 2026
Merged

Fix/hpo with one-hot encoder and score system#656
cristian-tamblay merged 2 commits into
developfrom
fix/hpo-onehot

Conversation

@Felipedino
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and bug fixes across both backend and frontend components, primarily focusing on enhancing the robustness and accuracy of model scoring, profile selection, and dataset handling. The most significant changes include more reliable profile fetching for tasks, improved dataset splitting, and ensuring UI updates when model run statuses change.

Backend improvements:

  • Improved profile fetching in ScoringService:
    • The get_available_profiles method now uses dependency injection to access the ComponentRegistry, allowing it to fetch profiles directly from the relevant task class. This avoids profile ID collisions and ensures accurate profile retrieval for each task. It also gracefully handles missing or faulty task lookups. [1] [2]
  • Dataset handling fixes:
    • When splitting a DashAIDataset, the split now correctly preserves the types attribute, ensuring that type information is not lost in the subset.
    • In the scikit-learn-like classifier, unnecessary error handling was removed from the prediction input preparation, streamlining the prediction process.

Frontend improvements:

  • Model comparison UI reliability:
    • The ModelComparisonTable now uses a stable string signature of run statuses as a dependency for fetching scores. This ensures that scores are re-fetched only when relevant run statuses change (such as after training), preventing unnecessary fetches and stale data. [1] [2]
    • The table now consistently uses the status property (instead of statusCode) to determine if a run is in progress, improving cell rendering accuracy.

Copilot AI review requested due to automatic review settings May 29, 2026 00:01
Copy link
Copy Markdown
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

Bug fixes and reliability improvements for hyperparameter optimization scoring with one-hot encoding, the scoring profile system, and the model comparison UI.

Changes:

  • ScoringService.get_available_profiles now fetches SCORING_PROFILES directly from the requested task class via injected ComponentRegistry, eliminating profile-ID collisions across tasks.
  • DashAIDataset.get_split now propagates self._types to the new subset, preserving column type metadata; SklearnLikeClassifier.predict drops a silent ValueError fallback so prediction input preparation failures surface.
  • ModelComparisonTable re-fetches scores via a stable runStatusSignature dep and reads run.status (matching the backend serialized field) instead of the non-existent statusCode.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
DashAI/back/services/scoring_service.py Inject ComponentRegistry and resolve profiles via task class to avoid ID collisions.
DashAI/back/dataloaders/classes/dashai_dataset.py Preserve types when constructing a single-split subset.
DashAI/back/models/scikit_learn/sklearn_like_classifier.py Remove silent ValueError fallback in predict input preparation.
DashAI/front/src/components/models/ModelComparisonTable.jsx Add runStatusSignature dep for score fetching; use status instead of statusCode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@cristian-tamblay cristian-tamblay merged commit af0dc23 into develop May 29, 2026
20 checks passed
@cristian-tamblay cristian-tamblay deleted the fix/hpo-onehot branch May 29, 2026 20:42
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