Commit Graph
26 Commits
Author SHA1 Message Date
MythEclipseandClaude 58d3feb8a0 fix(ml): fix cbam_block, cardinality, Lambda serialization + update CI download to include best_model.keras
- save_model.py: fix cbam_block channels dtype (x.shape[-1] not tf.shape)
- save_model.py: match notebook architecture (Resizing + GaussianNoise)
- save_model.py: load weights H5 instead of .keras (Lambda serialization safe)
- notebook: add output_shape to Lambda layers for Keras 3 compatibility
- notebook: fix n_bins NameError in temperature scaling plot
- notebook: fix cardinality fallback (or 100 → if card > 0 else 100)
- deploy.yml: download best_model.keras + calibration.json from HF
- HF repo: MythEclipse2737/zeavis-edu-corn-leaf-classifier

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-12 15:59:50 +00:00
MythEclipseandClaude df09bbca89 fix(ci): download ONNX directly from HF Hub instead of full export pipeline
- No need to install TensorFlow (3GB) — just pip install huggingface_hub
- Download pre-built model.onnx directly (saved from notebook export)
- Cuts CI time from ~10 min to ~30 seconds

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-11 20:23:39 +00:00
MythEclipseandClaude 04d2bebdfe fix(ci): add HF_TOKEN diagnostic and grouped logging for ml build
- Verify HF_TOKEN exists before attempting download
- Group CI log output for readability
- Use os.environ['HF_TOKEN'] instead of .get() to fail fast

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-11 20:12:55 +00:00
MythEclipseandClaude 7f17c19dc8 fix(ci): download model from Hugging Face instead of storing in repo
- Remove binary model artifacts tracked in repo (.tflite, saved_model, tfjs model.json)
- CI now downloads best_model.keras from Hugging Face Hub (MythEclipse2737/corn-leaf-disease-classifier)
- Add save_model.py step before convert_onnx.py in CI pipeline
- Remove LFS patterns from .gitattributes (no longer needed)
- Remove lfs:true from checkout action

The model is fetched at CI time using HF_TOKEN secret — no large
binary files stored in git.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-06-11 20:05:55 +00:00
MythEclipse 4dde9d8408 refactor(web): implement nginx reverse proxy for telemetry dashboard
Transition telemetry dashboard integration from an external URL approach to a local reverse proxy via Nginx. This simplifies client-side connectivity by routing all telemetry requests through the existing web server's domain.

- Configure Nginx to proxy `/telemetry/` sub-paths to the internal telemetry service
- Implement `sub_filter` in Nginx to rewrite root-relative paths for the SPA
- Remove `VITE_TELEMETRY_URL` build arguments and environment variable dependencies
- Simplify `TelemetryPage` to use a relative `/telemetry` base path
- Clean up deployment workflows and Dockerfile by removing unused telemetry build args
2026-06-07 23:44:57 +07:00
MythEclipse 9602a64e18 feat(web): externalize telemetry URL via environment variables
Replace the hardcoded Nginx proxy configuration with a dynamic environment variable approach. This allows the telemetry dashboard to be loaded via a public URL instead of relying on a local Tailscale proxy.

- Add `VITE_TELEMETRY_URL` build argument to Dockerfile
- Pass `VITE_TELEMETRY_URL` through GitHub Actions deployment workflow
- Remove `/telemetry/` location block from nginx.conf
- Update `TelemetryPage` to use the new environment variable and improve iframe loading state management
2026-06-07 23:31:15 +07:00
MythEclipse 2ade67170c feat(ci): add node-exporter cleanup and health check to deploy workflow 2026-06-07 22:59:44 +07:00
MythEclipse b3494e2a9b fix: force-remove containers before docker compose up 2026-06-07 22:30:45 +07:00
MythEclipse 02fbb56492 fix: docker compose down before up to clear container name conflicts 2026-06-07 22:27:48 +07:00
MythEclipse ff5e5fd091 fix: add --force-recreate to docker compose up in deploy 2026-06-07 22:24:49 +07:00
MythEclipseandClaude Opus 4.8 0fc305f21b fix: create telemetry-net on deploy to fix docker compose up
App services reference telemetry-net as external, but telemetry runs
on a separate VPS. Creating the network as empty on the app VPS so
docker compose up doesn't fail.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 22:21:31 +07:00
MythEclipseandClaude Opus 4.8 521aaa184e fix: handle local VPS changes during deploy by using git reset --hard instead of pull
Switches from git pull --ff-only to git fetch + git reset --hard
origin/main to avoid failing when VPS has uncommitted local changes
to tracked files (apps/ml-service/Dockerfile, docker-compose.yml).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-07 22:18:17 +07:00
Asep Haryana Saputra 8d04a17d84 feat: add Python setup and ONNX model generation to CI workflow 2026-05-23 13:16:08 +00:00
Asep Haryana Saputra b735897dc2 fix: add LFS support in checkout step of deployment workflow 2026-05-22 22:22:07 +00:00
Asep Haryana Saputra 8cd128a438 fix: update ML_SERVICE_URL to use internal service endpoint in deployment configuration 2026-05-22 22:10:00 +00:00
Asep Haryana Saputra 193f83d9c5 fix: update VITE_API_BASE_URL fallback to an empty string in deployment workflow 2026-05-22 22:01:23 +00:00
Asep Haryana Saputra 2a12c998a8 fix: remove outdated comment regarding dynamic IMAGE_PREFIX in deployment workflow 2026-05-22 21:58:57 +00:00
Asep Haryana Saputra 83993febc7 fix: update comment to clarify dynamic IMAGE_PREFIX setting in deployment workflow 2026-05-22 21:58:00 +00:00
Asep Haryana Saputra 1d421ee948 feat: update deployment configuration and enhance VITE_API_BASE_URL handling 2026-05-22 21:53:01 +00:00
Asep Haryana Saputra 39039b4d27 fix: update environment variable setup in deployment script 2026-05-22 21:42:58 +00:00
Asep Haryana Saputra fbd85c7e3a fix: update image prefix setting and normalize repository name in deployment script 2026-05-22 21:41:21 +00:00
Asep Haryana Saputra a94fb50225 fix: normalize repository name to lowercase in deployment workflow 2026-05-22 21:40:42 +00:00
Asep Haryana Saputra a0f9d307fd feat: enhance deployment script to clone repository if not present 2026-05-22 21:38:52 +00:00
Asep Haryana Saputra 80df164a2b fix: improve validation of deployment secrets in workflow 2026-05-22 21:35:48 +00:00
Asep Haryana Saputra 64d63587c7 feat: validate deployment secrets and update SSH action version 2026-05-22 21:33:32 +00:00
Asep Haryana SaputraandClaude Opus 4.7 1978597bcf feat: add Docker deployment workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:20:56 +00:00