324 Commits

Author SHA1 Message Date
Fam Zheng
55f79343d9 ai: return model_name 2026-01-24 12:21:16 +00:00
Fam Zheng
34eeee33da ignore wandb 2026-01-24 11:28:50 +00:00
Fam Zheng
32380a8082 Add wandb logging, finetune old code selection, and improve file naming
- Add required wandb integration with hardcoded API key
- Log training metrics (loss, accuracy, per-class metrics) to wandb
- In finetune mode, automatically add old codes to training set to prevent forgetting
- Zero-pad epoch numbers in model filenames (ep001, ep002) for better sorting
- Change upload.py to display sizes and speeds in KB instead of bytes
- Update Makefile finetune target to use 100 epochs instead of 30
- Set default wandb project to 'euphon/themblem'
2025-12-28 21:26:44 +00:00
Fam Zheng
90043c2541 Add upload progress and BPS tracking to upload.py 2025-12-27 20:59:03 +00:00
Fam Zheng
069205946a Reduce parallelism to avoid overwhelming server with 404s 2025-12-27 17:26:44 +00:00
Fam Zheng
73529bec16 Add timeouts to requests to prevent hanging 2025-12-27 17:11:14 +00:00
Fam Zheng
59425ca9fb Fix CI: resolve opencv-contrib-python conflict and use lazy QR detector init 2025-12-27 16:39:47 +00:00
Fam Zheng
a04471d574 common.py: fix predict 2025-12-27 12:38:02 +00:00
Fam Zheng
ad4ca27b7a Add --scan-ids option to fetch-scans.py 2025-12-27 11:40:01 +00:00
Fam Zheng
e0404ebf5a common.py: restore results_per_img = ncells * ncells * 2 2025-12-27 11:04:15 +00:00
Fam Zheng
8fb224651a refactor: update Makefile 2025-12-27 10:33:50 +00:00
Fam Zheng
c14deba2ca refactor: update train2.py 2025-12-27 10:33:50 +00:00
Fam Zheng
bb230733c5 refactor: update check_accuracy.py 2025-12-27 10:33:49 +00:00
Fam Zheng
5e1fe5cb5a refactor: update fetch-scans.py 2025-12-27 10:33:49 +00:00
Fam Zheng
a40d664e09 refactor: update common.py 2025-12-27 10:33:48 +00:00
Fam Zheng
f5acc55939 fix: add full=True to verification_model ForeignKey in CodeBatchResource
- Return full object data instead of URI string for verification_model field
- Consistent with other ForeignKey fields like service_qr_file, article, template_asset
2025-12-27 10:33:44 +00:00
Fam Zheng
c38a4ffea9 fix: improve verification_model display in RelatedFieldEditor
- Add support for loading related objects from URI (backward compatibility)
- Improve display_name logic to handle both full objects and URI strings
- Enhance show_related_object to handle string and object types properly
2025-12-27 10:33:42 +00:00
Fam Zheng
73c35a4968 Revert to code-label combination based train/val split 2025-12-27 08:52:58 +00:00
Fam Zheng
aa2d4041e3 update train2 2025-12-26 13:55:52 +00:00
Fam Zheng
01e3543be9 Makefile: use uv 2025-12-26 10:48:10 +00:00
Fam Zheng
8aafe16bf6 camera-5.1: catch error in start_check_auto_torch 2025-12-15 09:17:56 +00:00
Fam Zheng
6174b2af43 Make scan log scrollable with max height 500px in detail modal 2025-11-26 22:07:49 +00:00
Fam Zheng
4a9bceb4c8 Fix variable redeclaration error in system-settings.vue 2025-11-25 23:55:37 +00:00
Fam Zheng
94472f1b49 Remove debug_upload functionality and fix 404 error handling in system settings 2025-11-25 23:51:14 +00:00
Fam Zheng
9060186edb Add default verification model config in system settings and always pass model to v5/qr_verify 2025-11-25 23:34:21 +00:00
Fam Zheng
97649c81b1 Add verification_model field to scan data detail modal 2025-11-25 23:26:57 +00:00
Fam Zheng
c65dc700ad Set display_field for verification_model to show model name
- Add display_field='name' to verification_model field in CodeBatchResource
- RelatedFieldEditor will now display model name instead of raw JSON object
2025-11-25 22:49:32 +00:00
Fam Zheng
719ccd6477 Convert verification_model to ForeignKey with data migration
- Convert CodeBatch.verification_model from TextField to ForeignKey(VerificationModel)
- Add ForeignKey relationship to CodeBatchResource API
- Update QrVerifyView to use verification_model.name instead of string
- Create data migration to:
  - Rename old TextField temporarily
  - Add new ForeignKey field
  - Migrate existing model names to VerificationModel entries
  - Link batches to VerificationModel records
  - Remove old TextField
- GenericManager will now show dropdown/selector UI automatically
2025-11-25 22:38:57 +00:00
Fam Zheng
2c74d59d37 Add admin configuration for verification model per batch
- Add verification_model field to CodeBatch model (TextField)
- Add verification_model field to ScanData model to track model used
- Update QrVerifyView to pass model parameter to v5 QR verify endpoint
- Create VerificationModel table to track available models
- Add VerificationModelResource API endpoint (admin only)
- Add verification-model Vue component with GenericManager
- Add verification-model route and sidebar navigation entry
- Add migrations for all database changes
- Add analysis document for feature design
2025-11-25 22:32:02 +00:00
Fam Zheng
ce280586fe Add upload-model and list-models subcommands to emcli 2025-11-25 22:18:58 +00:00
Fam Zheng
eb68445134 ci: deploy prod on ed2 2025-11-24 23:03:00 +00:00
Fam Zheng
1fb02c317e update scripts/emcli 2025-11-24 23:01:22 +00:00
Fam Zheng
7007f14109 Add phone_model and datetime fields to scan-data-labels API endpoint 2025-11-24 23:01:22 +00:00
Fam Zheng
c0a197e4a5 entrypoint: check EMBLEM_ENV is set 2025-11-24 23:00:02 +00:00
Fam Zheng
94b66e66c5 docker: install unzip 2025-11-24 23:00:02 +00:00
Fam Zheng
2aceaf33a4 Make ailab job manual 2025-11-25 06:15:02 +08:00
Fam Zheng
9cc0df405c Use system Python in Dockerfile instead of venv 2025-11-24 07:38:34 +08:00
Fam Zheng
7580a9a452 Add npm to PATH in build-web job 2025-11-24 06:55:26 +08:00
Fam Zheng
9207a005bd Move all CI jobs from i7 to ailab runner 2025-11-24 06:53:55 +08:00
Fam Zheng
a91cf30e05 Set timeout to 36000 seconds for ailab job 2025-11-23 21:04:55 +00:00
Fam Zheng
a0232e74b6 ci: fetch and train 2025-11-23 18:59:07 +00:00
Fam Zheng
6c93bc3607 Add sbs target, make scripts executable in CI, skip venv creation if exists 2025-11-23 18:57:53 +00:00
Fam Zheng
aea7276ad4 add make sbs 2025-11-23 18:54:40 +00:00
Fam Zheng
6af6ec6ed4 ci: skip fetch 2025-11-23 18:51:46 +00:00
Fam Zheng
9f1d6784f8 ci: fix train-quick 2025-11-23 18:51:31 +00:00
Fam Zheng
5b1b013a9f Set DATA_DIR to /home/fam/emblem in CI 2025-11-23 18:40:26 +00:00
Fam Zheng
bb02ed25b8 Keep /home/fam/venv/bin in PATH after activating project venv to access uv 2025-11-23 18:34:30 +00:00
Fam Zheng
c685372845 Create /home/fam/venv first to install uv, avoiding externally-managed-environment error 2025-11-23 18:33:11 +00:00
Fam Zheng
b116cafcc1 on ailab 2025-11-23 18:30:03 +00:00
Fam Zheng
ec65bfa1d2 Add torch and torchvision dependencies, ensure venv is activated in script section 2025-11-23 18:24:36 +00:00