ci: add backend unit tests to Tests workflow#336
ci: add backend unit tests to Tests workflow#336shivv23 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
Split the single integration-test job into two parallel jobs: - backend-unit-tests: runs pytest against tensormap-backend/tests/ (162 tests) - integration-tests: runs pytest against tests/integration/ Uses pull_request_target for proper fork support, matching lint.yml conventions.
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
integration-tests.ymlworkflow only ran integration tests, leaving the 162 backend unit tests intensormap-backend/tests/completely untested in CI. This PR splits the singleintegration-testjob into two parallel jobs:backend-unit-tests: Runspytest tests/against the backend unit test suiteintegration-tests: Runspytest ../tests/integration/against the full integration suiteChanges
.github/workflows/integration-tests.yml(new file — no conflicts possible)backend-unit-testsjob runninguv run pytest tests/ -v --tb=shortmainpull_request_targetfor proper fork support, matching lint.yml conventionsValidation
162 passed in 2.54s)Files Changed
.github/workflows/integration-tests.yml— new workflow with two parallel test jobs