ci: add backend unit tests to Tests workflow#338
ci: add backend unit tests to Tests workflow#338shivv23 wants to merge 11 commits intoc2siorg:mainfrom
Conversation
Supported augmentation techniques:
- flip_horizontal: Mirror along vertical axis
- flip_vertical: Mirror along horizontal axis
- rotate_90: Rotate by 90 degrees
- brightness: Adjust brightness by 20%
- zoom: Zoom to 90% and resize
- gaussian_noise: Add Gaussian noise
- random_crop: Crop to 85% and resize
Endpoint: POST /data/augment/image/{file_id}
Export trained Keras models to:
- SavedModel (TensorFlow native)
- TFLite (mobile/edge optimized)
- ONNX (cross-framework)
Endpoint: GET /model/export/{model_name}?format=savedmodel|tflite|onnx
…re importance
For classification models:
- Confusion matrix generation
- Per-class metrics (precision, recall, F1-score)
For regression models:
- Feature importance via permutation importance
Endpoint: GET /model/interpret/{model_name}?file_id=&project_id=
Compare metrics across multiple training runs: - Chronological view of runs with loss, accuracy, epochs - Automatic best run identification (lowest loss) - Pagination support with configurable limit Endpoint: GET /model/compare?project_id=&limit=
Grid search over:
- Learning rate (0.001, 0.01)
- Batch size (16, 32)
- Epochs (5, 10)
Returns top 5 configurations sorted by loss with best config highlighted.
Also includes run comparison for tracking training history.
Endpoints:
- GET /model/tune/{model_name}
- GET /model/compare
PR ReviewRebaseYour branch is 32 commit(s) behind Merge commits detected — please use rebase instead of merge: SquashYour PR has 11 commits. Please squash into a single commit. How to fixgit fetch origin
git rebase -i origin/main # mark all but first commit as "squash"
git push --force-with-leaseThis comment updates automatically on each push. |
|
Hey @ivantha, I apologize for the confusion with these PRs. The issue was that my local Git state had a polluted index with uncommitted changes from other branches — when I created the branches from what I thought was a clean origin/main, those branches ended up containing 10+ unrelated commits from the stale branch history. Both PRs showed the same 10 commits (augment, export, interpret, compare, tune) because those commits exist in main's merge history. I've since identified this and reset everything to a clean origin/main. I'm going to create fresh PRs with orphan branches — each containing exactly 1 commit with only its relevant files. They will have no shared commits and zero conflicts. Apologies for the noise! |
Summary
The CI pipeline had no backend unit test coverage — the 162 tests in
tensormap-backend/tests/were never run on PRs. This PR adds aTestsworkflow with two parallel jobs:backend-unit-tests: runspytest tests/ -v --tb=shortintegration-tests: runspytest ../tests/integration/ -v --tb=shortChanges
.github/workflows/integration-tests.ymlfilepull_request_targetfor proper fork supportmainValidation
Files Changed
.github/workflows/integration-tests.yml