How ajay-1011-git/ramwise works
RAMWise collects Android usage and device telemetry, predicts likely next apps, and uses the prediction plus device state to recommend cache placement. The dashboard presents predictions, allocation decisions, live metrics, and LRU comparisons. The README documents the Transformer/PPO pipeline and three-tier cache; sampled code confirms the API, telemetry persistence, model inference, dashboard requests, and cache behavior. Benchmark and training links reflect documented capabilities, though their full runtime wiring was not sampled.
Main entry points: main.py FastAPI endpoints · benchmark.py Benchmark engine · cache.py Adaptive cache · train_rl.py PPO training
Components 18
Client surfaces
- Android monitor
android-client/app/src/main/java/com/ramwise/telemetry/TelemetryService.kt - React dashboard
dashboard/src/App.tsx - Dashboard API client
dashboard/src/api.ts
Prediction service
- FastAPI endpoints
backend/api/main.py - SQLite access
backend/api/database.py - Telemetry database
backend/api/database.py - App Transformer
backend/transformer/model.py - Transformer weights
models/transformer_weights
Cache allocation
- PPO inference
backend/api/main.py - PPO model weights
models/rl_models - Adaptive cache
backend/cache_simulator/cache.py - LRU baseline
backend/cache_simulator/cache.py
Model learning
- Memory environment
backend/rl_allocator/memory_env.py - PPO training
backend/rl_allocator/train_rl.py
Metrics and benchmarks
- Benchmark engine
backend/benchmarking/benchmark.py - Benchmark results
datasets/ubiqlog/benchmark_report.json
Other components
- Device user
- RAMWise HTTP API
Connections 19
- Device user → Android monitor: uses
- Android monitor → RAMWise HTTP API: posts telemetry
- RAMWise HTTP API → FastAPI endpoints: routes requests
- React dashboard → Dashboard API client: requests data
- Dashboard API client → RAMWise HTTP API: calls endpoints
- FastAPI endpoints → SQLite access: queries and writes
- SQLite access → Telemetry database: reads and writes
- FastAPI endpoints → App Transformer: predicts apps
- App Transformer → Transformer weights: loads weights
- FastAPI endpoints → PPO inference: selects allocation
- PPO inference → PPO model weights: loads policy
- FastAPI endpoints → Adaptive cache: uses cache behavior
- Benchmark engine → Adaptive cache: benchmarks
- Benchmark engine → LRU baseline: compares baseline
- FastAPI endpoints → Benchmark results: reads results
- Benchmark engine → Benchmark results: produces results
- PPO training → Memory environment: trains against
- Memory environment → Adaptive cache: models tier policy
- PPO training → PPO model weights: saves policy