Refactor/experiments to models clean - #419
Merged
Merged
Conversation
…button and content
- Updated API routes to include 'model-sessions' instead of 'experiments'. - Removed 'experiments.py' endpoint file and replaced it with 'model_sessions.py'. - Adjusted database models to reflect the change from 'Experiment' to 'ModelSession'. - Modified schemas to accommodate new model session parameters. - Updated all relevant endpoints, jobs, and data loaders to utilize 'ModelSession' instead of 'Experiment'. - Ensured that all references to experiments in validation, creation, and deletion processes are now aligned with model sessions.
…Id in LiveMetricsChart
…ionDialog, RunCard, and RunOperations components
… of experiment_id
cristian-tamblay
approved these changes
Jan 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the
Experimententity toModelSessionthroughout the entire codebase to better reflect its purpose in the Models workflow. This includes database models, API endpoints, frontend components, and type definitions. The change improves code clarity by using terminology that aligns with the user-facing "Sessions" concept in the Models module.Type of Change
Check all that apply like this [x]:
Changes (by file)
Backend - API:
DashAI/back/api/api_v1/endpoints/experiments.py→model_sessions.py: Renamed endpoint file and updated all routes from/experimentsto/model-sessionsDashAI/back/api/api_v1/schemas/experiments_params.py→model_sessions_params.py: Renamed schema file and updated class namesDashAI/back/api/api_v1/api.py: Updated router imports and tags fromexperimentstomodel_sessionsDashAI/back/api/api_v1/endpoints/runs.py: Updated references fromexperiment_idtomodel_session_idDashAI/back/api/api_v1/endpoints/explainers.py: Updated to usemodel_session_idDashAI/back/api/api_v1/endpoints/predict.py: Updated to usemodel_session_idDashAI/back/api/api_v1/endpoints/datasets.py: Updated experiment references to model sessionDashAI/back/api/api_v0/endpoints/old_endpoints.py: Updated legacy endpointsBackend - Database & Jobs:
DashAI/back/dependencies/database/models.py: RenamedExperimentmodel toModelSession, changed table name and all foreign key referencesDashAI/back/dependencies/database/__init__.py: Updated model exportsDashAI/back/job/model_job.py: Updated to usemodel_session_idinstead ofexperiment_idDashAI/back/job/explainer_job.py: Updated job referencesDashAI/back/job/predict_job.py: Updated job referencesDashAI/back/pipeline/train_node.py: Updated pipeline node referencesBackend - Dataloaders:
DashAI/back/dataloaders/classes/dashai_dataset.py: Updated to usemodel_session_idFrontend - API Layer:
DashAI/front/src/api/experiment.ts→modelSession.ts: Renamed API file and updated all function names (e.g.,getExperiments→getModelSessions)DashAI/front/src/api/run.ts: Updated run schema to usemodel_session_idDashAI/front/src/api/datasets.ts: Updated dataset filtering to usemodel_session_idDashAI/front/src/api/oldEndpoints.ts: Updated legacy API callsFrontend - Types:
DashAI/front/src/types/experiment.ts→modelSession.ts: Renamed type file and interfaceDashAI/front/src/types/run.ts: Updated Run interface to usemodel_session_idDashAI/front/src/types/predict.ts: Updated prediction typesFrontend - Components (Models Module):
DashAI/front/src/components/models/RunCard.jsx: Updated PropTypes to usemodel_session_idDashAI/front/src/components/models/RunOperations.jsx: Updated PropTypes to usemodel_session_idDashAI/front/src/components/models/PredictionCreationDialog.jsx: Renamedexperimentstate tomodelSession, updated to usemodel_session_idDashAI/front/src/components/models/CreateSessionSteps.jsx: Updated to use model session terminologyDashAI/front/src/pages/models/ModelsContent.jsx: Updated imports and API callsFrontend - Components (Experiments Module):
DashAI/front/src/components/experiments/ExperimentsTable.jsx: Updated API calls togetModelSessionsanddeleteModelSessionDashAI/front/src/components/experiments/NewExperimentModal.jsx: Updated to use model session APIDashAI/front/src/components/experiments/PrepareDatasetStep.jsx: Updated session referencesFrontend - Components (Other Modules):
DashAI/front/src/components/explainers/TrainedModelsTable.jsx: UpdatedextractRowsfunction to usemodel_session_id, added validationDashAI/front/src/components/explainers/SelectDatasetStep.jsx: Updated to usegetModelSessionByIdDashAI/front/src/components/predictions/PredictionModal.jsx: Updated to usemodel_session_idDashAI/front/src/components/predictions/ManualInput.jsx: Updated experiment referencesDashAI/front/src/components/pipelines/nodes/TrainNode.jsx: Updated pipeline nodeDashAI/front/src/components/results/ExperimentsList.jsx: Updated list componentDashAI/front/src/components/datasets/ConvertDatasetModal.jsx: Updated dataset conversionFrontend - Pages:
DashAI/front/src/pages/experiments/Experiments.jsx: Updated imports and API callsDashAI/front/src/pages/home/Home.jsx: Updated home page referencesDashAI/front/src/pages/results/components/ResultsTable.jsx: Updated filtering logic to usemodel_session_idDashAI/front/src/pages/results/components/ResultsTabInfo.jsx: Updated to usegetModelSessionByIdDashAI/front/src/pages/results/components/LiveMetricsChart.jsx: Updated API call togetModelSessionByIdFrontend - Tours:
DashAI/front/src/constants/tours/homeTour.js: Updated tour content from "experiments" to "models"Backend - Tests:
tests/back/api/test_runs_api.py: Renamed fixtureexperiment_id→model_session_id, updated endpoints to/api/v1/model-session/, updated all JSON requests and query parameterstests/back/api/test_explainer_jobs.py: Renamed fixturecreate_experiment→create_model_session, updated variable names, fixed import ordering (alphabetical), updated Run instantiationtests/back/api/test_explanations_api.py: Renamed fixtureexperiment_id→model_session_id, updated model session creation and both run fixturestests/back/api/test_predict_api.py: Renamed fixturecreate_experiment→create_model_session, updated all model session references and Run creationtests/back/api/test_jobs.py: Renamed fixturecreate_experiment→create_model_session, updated JSON requests and both run fixturestests/back/api/test_experiments_api.py: Renamed fixturescreate_experiment_1/2→create_model_session_1/2, updated all endpoints to/api/v1/model-session/, renamed all test functions (e.g.,test_create_and_get_experiment→test_create_and_get_model_session), updated expected error messagestests/back/dashai_dataset_types_test.py: Updated importprepare_for_experiment→prepare_for_model_session, updated function callsTesting
experimenttomodel_sessiontablesNotes
experimenttomodel_sessionexperiment_idtomodel_session_id/experimentsto/model-sessionsTrainedModelsTable.jsxto prevent errors when model sessions are not found