Skip to content

Comments

Fix Model Selection in batch_predict Endpoint#54

Open
sohampirale wants to merge 2 commits intoruxailab:mainfrom
sohampirale:fix/hardcoded_coded_for_gaze_prediction
Open

Fix Model Selection in batch_predict Endpoint#54
sohampirale wants to merge 2 commits intoruxailab:mainfrom
sohampirale:fix/hardcoded_coded_for_gaze_prediction

Conversation

@sohampirale
Copy link

Description:

This PR resolves an issue where the batch_predict endpoint was ignoring
user-selected ML models and always using hardcoded Ridge regression models.

Fixes : #53

Changes Made:

  • Created a models_gaze_engineered dictionary for X-axis models that operate
    on the 5-feature engineered input space.
  • Reused the existing models dictionary for Y-axis models that operate
    on the 2-feature input space.
  • Updated the batch_predict function to correctly pass model parameters
    to predict_new_data_simple.
  • Standardized parameter naming to model_name_X and model_name_Y
    for improved consistency and clarity.

Problem Solved:

Previously, users could select different ML models in the frontend, but the
batch_predict endpoint always defaulted to Ridge regression, ignoring
the selected options. This change ensures that the chosen models are
properly propagated through the backend and used for real-time gaze
prediction as intended.

Files Changed:

  • /app/routes/session.py — Updated batch_predict function
  • /app/services/gaze_tracker.py — Added models_gaze_engineered
    dictionary and updated predict_new_data_simple

Screenshots : All models are working

  • Tested this endpoint with all the models we support on frontend(Ruxailab)
Screenshot from 2026-02-07 15-49-38 Screenshot from 2026-02-07 15-49-48

…-feature X-axis prediction and enables proper model selection for predict_new_data_simple function
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.

Model Selection Ignored in batch_predict Endpoint - Always Uses Hard coded Ridge Regression

1 participant