Skip to content

feat: Optimize dashboard to use stored metrics from Experiment node#49

Open
nee1k wants to merge 9 commits into
mainfrom
feature/dashboard-metrics-optimization
Open

feat: Optimize dashboard to use stored metrics from Experiment node#49
nee1k wants to merge 9 commits into
mainfrom
feature/dashboard-metrics-optimization

Conversation

@nee1k

@nee1k nee1k commented Sep 10, 2025

Copy link
Copy Markdown
Collaborator

Summary

This PR optimizes the Camera Traps dashboard to use stored metrics from the Experiment node in Neo4j instead of computing them in real-time.

Changes Made

Performance Improvements

  • Removed real-time metric calculations from the dashboard
  • Added direct database retrieval of stored metrics from Experiment nodes
  • Eliminated complex computation functions

Technical Changes

  • Added get_experiment_metrics method to CKNKnowledgeGraph class
  • Enhanced metrics display to include mAP, IoU, and other advanced metrics
  • Updated docker-compose.yml to use iud2i/ckn-analytics-dashboard:2.0.0
  • Fixed Dockerfile to properly copy files from ckn_dashboard directory

Metrics Now Retrieved from Database

  • f1_score, precision, recall
  • true_positives, false_positives, false_negatives
  • total_images, total_predictions, total_ground_truth_objects
  • mean_iou, map_50, map_50_95

Benefits

  • Faster dashboard loading - no more real-time calculations
  • Consistency - uses same metrics calculated by oracle daemon
  • Maintainability - cleaner code without complex metric calculations
  • Reliability - avoids discrepancies between computed and stored metrics

Testing

  • Docker image built and pushed as iud2i/ckn-analytics-dashboard:2.0.0
  • Dashboard displays stored metrics correctly
  • All metric sections working

Docker Image

  • New version: iud2i/ckn-analytics-dashboard:2.0.0

- Add get_experiment_metrics() method to retrieve stored metrics from Neo4j
- Replace computed metrics with database-stored metrics in Camera Traps dashboard
- Remove complex metric calculation functions (calculate_object_detection_metrics, etc.)
- Add support for mAP, IoU, and other advanced metrics from oracle daemon
- Update docker-compose.yml to use iud2i/ckn-analytics-dashboard:2.0.0
- Improve performance by eliminating real-time metric calculations
- Ensure consistency between oracle daemon calculations and dashboard display
- Update confluentinc/cp-zookeeper:latest to 7.5.0
- Update confluentinc/cp-kafka-connect:latest to 7.5.0
- Update iud2i/ckn-cameratraps-acc-alert:latest to 2.0.0
- Update iud2i/ckn-cameratraps-agg:latest to 2.0.0
- Fixes linux/amd64 manifest errors in CI/CD pipeline
…/amd64 manifest errors

- Update iud2i/ckn-cameratraps-acc-alert:latest to 0.1.2
- Update iud2i/ckn-cameratraps-agg:latest to 0.1.2
- All images now use specific version tags instead of latest
- Resolves CI/CD pipeline manifest errors
- Revert iud2i/ckn-cameratraps-acc-alert:0.1.2 to latest
- Revert iud2i/ckn-cameratraps-agg:0.1.2 to latest
- Keep Confluent images with specific versions (7.5.0) to fix linux/amd64 issues
- Fixes 'manifest unknown' errors in CI/CD pipeline
…sion attribute

- Update confluentinc/cp-zookeeper:7.5.0 to 7.4.0
- Update confluentinc/cp-kafka:7.9.2 to 7.4.0
- Update confluentinc/cp-kafka-connect:7.5.0 to 7.4.0
- Remove obsolete version: '3.8' attribute from docker-compose.yml
- Use consistent Confluent Platform version 7.4.0 for all components
- Attempts to resolve linux/amd64 manifest issues
…anifest issue

- Comment out oracle-alert-processor and oracle-aggr-processor services
- Test if Confluent Platform images (7.4.0) work without iud2i images
- This will help identify which specific image is causing the manifest error
…s-dashboard

- Build iud2i/ckn-analytics-dashboard:2.0.0 for both linux/amd64 and linux/arm64
- Fix Dockerfile COPY paths to use ckn_dashboard/ prefix
- Remove platform-specific FROM instruction for multi-arch support
- Re-enable oracle services in docker-compose.yml
- Resolves linux/amd64 manifest issues for our custom dashboard image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant