-
Notifications
You must be signed in to change notification settings - Fork 462
Implement endpoint to retrieve model logs #5469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Adds support for retrieving model training logs via a new API endpoint and adjusts job log streaming behavior to allow streaming logs for terminal jobs.
Changes:
- Added
GET /api/projects/{project_id}/models/{model_id}/logsendpoint backed byModelService.get_logs(). - Updated job log streaming behavior and refactored streaming test helpers.
- Added unit/integration tests covering model-log retrieval and job-log streaming for completed jobs.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| application/backend/app/services/model_service.py | Adds get_logs() to locate and validate availability of model training logs. |
| application/backend/app/api/routers/models.py | Introduces a new route returning log files via FileResponse. |
| application/backend/app/api/routers/jobs.py | Changes streaming logic so terminal jobs can still stream logs, but modifies stop conditions. |
| application/backend/tests/unit/routers/test_models.py | Adds unit tests for the new model logs endpoint. |
| application/backend/tests/unit/routers/test_jobs.py | Refactors streaming test helper and updates expectations for completed-job log streaming. |
| application/backend/tests/integration/services/test_model_service.py | Adds integration tests for ModelService.get_logs() across statuses and missing files. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
📊 Test coverage report
|
Docker Image SizesCPU
GPU
XPU
|
61e2045 to
2989921
Compare
Summary
Checklist