Skip to content

refactor: generalize training terms to 'job' (#121)#123

Open
Rey-han-24 wants to merge 5 commits intolondonaicentre:mainfrom
Rey-han-24:main
Open

refactor: generalize training terms to 'job' (#121)#123
Rey-han-24 wants to merge 5 commits intolondonaicentre:mainfrom
Rey-han-24:main

Conversation

@Rey-han-24
Copy link

Description

Generalize naming across the central hub to include both model training and inference. Changed terminology from 'training' to 'job' (e.g., stop_training to stop_job).

Linked Issues

Fixes #121

Checklist

  • Follows the project's coding conventions and style guide
  • Updates documentation
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published

Type of Change

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Breaking change (fix or new feature that would cause existing functionality to change).
  • New tests added to cover the changes.
  • In-line docstrings updated.
  • Documentation updated, tested make -C docs/ docs.

Testing

I did the following tests to verify my changes:
Verified name changes across all files using global search. Ensured all function calls match the new definitions.

  • Quick tests passed locally by running make unit-test.
  • Integration tests pass (if applicable) by running make integration-test.

Additional Notes

Copilot AI review requested due to automatic review settings February 22, 2026 07:54
Copy link

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 pull request refactors terminology across the flip-api codebase to generalize from "training"-specific to "job"-generic naming, enabling the system to handle both model training and inference workloads. The refactoring changes function names like abort_model_training to abort_job, stop_training to stop_job, and save_training_metrics to save_job_metrics.

Changes:

  • Renamed core functions from training-specific to job-generic terminology (e.g., abort_model_trainingabort_job, stop_trainingstop_job, save_training_metricssave_job_metrics)
  • Updated function imports across modules and tests to reference the new function names
  • Updated test function names and mock paths to reflect the new naming conventions

Reviewed changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
flip-api/src/flip_api/fl_services/stop_training.py Renamed endpoint function from stop_training to stop_job and updated import of abort_job
flip-api/src/flip_api/fl_services/services/fl_service.py Renamed function from abort_model_training to abort_job
flip-api/src/flip_api/private_services/save_training_metrics.py Renamed endpoint function from save_training_metrics_endpoint to save_job_metrics_endpoint and updated import
flip-api/src/flip_api/private_services/services/private_service.py Renamed function from save_training_metrics to save_job_metrics
flip-api/src/flip_api/model_services/delete_model.py Updated import and call to use abort_job instead of abort_model_training
flip-api/src/flip_api/project_services/delete_project.py Updated import and call to use abort_job instead of abort_model_training
flip-api/src/flip_api/main.py Updated router imports to reference stop_job and save_job_metrics modules
flip-api/tests/unit/fl_services/test_stop_training.py Updated test names, imports, and mock paths to reference stop_job and abort_job
flip-api/tests/unit/fl_services/services/test_fl_service.py Updated test name from test_abort_model_training_success to test_abort_job_success and function call
flip-api/tests/unit/model_services/test_delete_model.py Updated mock path to reference abort_job instead of abort_model_training
flip-api/tests/unit/project_services/test_delete_project.py Updated mock definitions and assertions to use abort_job instead of abort_model_training
flip-api/tests/unit/private_services/test_save_training_metrics.py Updated test names, imports, and mock paths to reference save_job_metrics

Rey-han-24 and others added 4 commits February 22, 2026 13:11
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…s.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…e.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Rey-han-24 Rey-han-24 closed this Feb 22, 2026
@Rey-han-24 Rey-han-24 reopened this Feb 22, 2026
@Rey-han-24
Copy link
Author

I have updated the function names, imports, and tests as requested. I've also applied the suggestions from the Copilot review to generalize the docstrings and error messages. Ready for human review!

@atriaybagur
Copy link
Member

Hi @Rey-han-24 , thanks for your interest in contributing to FLIP.

Note we specify to set the target branch for PRs to develop instead of main.

I note unit tests aren't passing for the flip-api.

Also, note there are still many mentions of 'training' remaining. The ones I wrote in the issue description were mere examples and not an exhaustive list.

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.

[Feature]: Change naming to generalise to model training + evaluation (e.g. starting training -> starting job)

3 participants