Update documentation to reflect migration from FastAPI/Uvicorn to Rust/Axum with ONNX Runtime:
- Root README: Update ML service description, tech stack, prerequisites, and run instructions to use Rust/Cargo instead of Python/Uvicorn
- Root README: Update model path references from best_model.keras to model.onnx
- Root README: Add model.onnx to artifact lists and generated files
- Root README: Update troubleshooting section with Rust-specific guidance
- Machine_Learning/README: Add table of contents entry for ONNX conversion
- Machine_Learning/README: Add Tahap 5 section documenting ONNX conversion with convert_onnx.py and validate_onnx_parity.py
- Machine_Learning/README: Update output table to include model.onnx with Rust ONNX Runtime usage
- apps/ml-service/README: Create comprehensive documentation for Rust Axum ONNX service including setup, endpoints, environment variables, testing, and troubleshooting
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Add 'download-binaries' feature to ort crate in Cargo.toml to ensure ONNX Runtime binaries are downloaded during build
- Update .dockerignore to allow Machine_Learning/model/model.onnx through build context while still excluding other generated model artifacts (saved_model, tfjs_model, tflite)
- Dockerfile can now successfully copy model.onnx at runtime
Co-Authored-By: Claude Code <noreply@anthropic.com>
- Store ONNX Session in Option<Mutex<Session>> for thread-safe concurrent access
- Lock session before run() in predict(), map lock poisoning to PredictionFailed
- Preserve ModelUnavailable when session is None
- Reject non-finite values (NaN, +inf, -inf) in prediction_from_probabilities
- Add unit tests for NaN, positive infinity, and negative infinity rejection
- Keep all existing tests passing
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Create Rust crate skeleton with Cargo.toml, main.rs, and config.rs.
Includes package metadata, dependencies (anyhow, axum, image, ndarray,
ort, serde, tokio, tower, tracing), and config module with LABELS
constants, SERVICE_NAME, SERVICE_VERSION, DEFAULT_INPUT_SIZE, and
resolve_model_path function. Config tests verify label order, relative
path resolution, and absolute path preservation.
Also includes approved spec and implementation plan documents.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>