Skip to content

Frontend - #37

Open
NikhByte wants to merge 68 commits into
stagingfrom
frontend
Open

Frontend#37
NikhByte wants to merge 68 commits into
stagingfrom
frontend

Conversation

@NikhByte

Copy link
Copy Markdown
Collaborator

Merging Frontend to the Staging

parshvigarg3 and others added 30 commits August 8, 2026 19:53
This reverts commit 00351eb, reversing
changes made to a6fa4ab.
…utorefresh for proper 2s non-blocking refresh
NikhByte and others added 19 commits August 17, 2026 22:44
    - Replace bare Popen with a watchdog thread that monitors cognios_as_daemon.py
    - Auto-restarts daemon after 3s if it exits unexpectedly (fixes stale FocusOS pipeline)
    - Add 2s startup grace period before dashboard launch so DB is ready
    - Graceful shutdown on Ctrl+C via _stop_watchdog event (no zombie restarts)
…ual environment

- Create requirements.txt with all pinned third-party dependencies across all modules
- Update pyproject.toml with missing requests and umap-learn dependencies
- Clean up merge conflict markers in .gitignore and ensure .venv, .conda, databases, and logs are ignored
- Enhance main.py with auto-detection and seamless re-execution into project .venv
- Add self-healing bootstrap in main.py to create .venv and install requirements if missing
- Add cross-platform 1-click startup scripts (start.sh and start.bat)
- Update README.md Quick Start with standardized environment setup instructions
…oise

- Add _EXCLUDE_EXACT_NAMES and _EXCLUDE_SUBSTRINGS sets to silently
  drop Chrome/Chromium (Streamlit dashboard) and CogniOS daemon processes
  from process telemetry to prevent corrupting compiler_active signal
  and inflating CPU readings in FocusOS inference
- Add UDP/TCP ratio calculation via psutil.net_connections with graceful
  fallback (0.10) on permission error
- Pass udp_tcp_ratio through the metrics dict and into write_layer1()
  in the daemon loop
Doubled SLIDING_WIND_N to 30 to give FocusOS feature extraction more
telemetry history per inference cycle, reducing variance in short-burst
workload misclassifications.
Rewrote extract_features() to produce the full 22-feature statistical
vector that matches the IdeaPad training dataset schema:

- cpu_mean, cpu_max, cpu_variance
- ram_mean, ram_growth_rate, swap_percent
- network_mean, network_symmetry, net_variance, udp_tcp_ratio
- disk_io_mean, process_count_mean, thread_count_mean
- load_avg, ctx_switches_per_core, cpu_user_system_ratio
- psi_cpu_some, psi_mem_some, psi_io_some
- vscode_active, browser_active, compiler_active

Added timestamp-aware time-delta computation, ddof=0 variance, and
safe column presence checks throughout.
…ition

Rewrote WorkloadPredictor and training pipeline in classifier.py:
- Added full 22-feature schema (matches generate_dataset_ideapad.py)
- Integrated StandardScaler alongside LabelEncoder for robust normalization
- Added StratifiedKFold cross-validation with cross_val_score reporting
- Candidate dataset path resolution (searches project root, ~/home, etc.)
- Path now resolves to focusos/models/models_saved/ for local artifacts

Updated cluster_trainer.py:
- Minor config alignment with new MODELS_DIR path conventions
…l artifacts

Removed:
- focusos/models/focusos_training_data.csv (old pseudo-labeled dataset, 3001 rows)
- focusos/models/generate_dataset.py (old synthetic dataset generator)
- focusos/models_saved/kmeans_model.pkl (unsupervised clustering no longer used)
- focusos/models_saved/pseudo_labeled_dataset.csv (replaced by IdeaPad dataset)

Updated saved model artifacts to reflect the new 22-feature IdeaPad schema:
- feature_columns.pkl: 15→22 feature names
- label_encoder.pkl: updated class mappings
- scaler.pkl: re-fit StandardScaler on IdeaPad data
- xgboost_model.json: re-trained model checkpoint
Extend the write_layer1() signature and INSERT statement to accept
a udp_tcp_ratio column (default 0.10) in the layer1_sys table.
This prepares the schema for the new FocusOS 22-feature network metric.
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.

5 participants