From 043690f82962b65fedee5d8bf2481810e5a300fa Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Mon, 24 Nov 2025 16:32:31 +0000 Subject: [PATCH] Update dependency version for improved compatibility Update `eif` dependency from version 2.0.0 to 2.0.2 in `requirements.txt` and documentation to resolve a deployment issue, as version 2.0.0 is not available. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 104a0ac7-f020-4d00-9e3e-5a37b74bbc93 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/2lUhxO2 --- ...-db-AGGIOR-1764001889941_1764001889941.txt | 90 +++++++++++++++++++ python_ml/requirements.txt | 2 +- replit.md | 5 +- 3 files changed, 94 insertions(+), 3 deletions(-) create mode 100644 attached_assets/Pasted--deployment-update-from-git-sh-db-AGGIOR-1764001889941_1764001889941.txt diff --git a/attached_assets/Pasted--deployment-update-from-git-sh-db-AGGIOR-1764001889941_1764001889941.txt b/attached_assets/Pasted--deployment-update-from-git-sh-db-AGGIOR-1764001889941_1764001889941.txt new file mode 100644 index 0000000..044a0fa --- /dev/null +++ b/attached_assets/Pasted--deployment-update-from-git-sh-db-AGGIOR-1764001889941_1764001889941.txt @@ -0,0 +1,90 @@ +./deployment/update_from_git.sh --db + +╔═══════════════════════════════════════════════╗ +║  AGGIORNAMENTO SISTEMA IDS DA GIT ║ +╚═══════════════════════════════════════════════╝ + + Verifica configurazione git... + + Backup configurazione locale... +✅ .env salvato in .env.backup + + Verifica modifiche locali... +⚠ Ci sono modifiche locali non committate + Esegui 'git status' per vedere i dettagli +Vuoi procedere comunque? (y/n) y + Salvo modifiche locali temporaneamente... +No local changes to save + + Download aggiornamenti da git.alfacom.it... +remote: Enumerating objects: 51, done. +remote: Counting objects: 100% (51/51), done. +remote: Compressing objects: 100% (41/41), done. +remote: Total 41 (delta 32), reused 0 (delta 0), pack-reused 0 (from 0) +Unpacking objects: 100% (41/41), 31.17 KiB | 1.35 MiB/s, done. +From https://git.alfacom.it/marco/ids.alfacom.it + 0fa2f11..3a945ec main -> origin/main + * [new tag] v1.0.55 -> v1.0.55 +From https://git.alfacom.it/marco/ids.alfacom.it + * branch main -> FETCH_HEAD +Updating 0fa2f11..3a945ec +Fast-forward + database-schema/schema.sql | 4 +- + deployment/CHECKLIST_ML_HYBRID.md | 536 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + python_ml/dataset_loader.py | 384 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + python_ml/main.py | 120 ++++++++++++++++++++++++++++------ + python_ml/ml_hybrid_detector.py | 705 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + python_ml/requirements.txt | 3 + + python_ml/train_hybrid.py | 378 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + python_ml/validation_metrics.py | 324 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + replit.md | 19 +++++- + version.json | 16 ++--- + 10 files changed, 2459 insertions(+), 30 deletions(-) + create mode 100644 deployment/CHECKLIST_ML_HYBRID.md + create mode 100644 python_ml/dataset_loader.py + create mode 100644 python_ml/ml_hybrid_detector.py + create mode 100644 python_ml/train_hybrid.py + create mode 100644 python_ml/validation_metrics.py +✅ Aggiornamenti scaricati con successo + +🔄 Ripristino configurazione locale... +✅ .env ripristinato + +📦 Aggiornamento dipendenze Node.js... + +up to date, audited 492 packages in 3s + +65 packages are looking for funding + run `npm fund` for details + +9 vulnerabilities (3 low, 5 moderate, 1 high) + +To address issues that do not require attention, run: + npm audit fix + +To address all issues (including breaking changes), run: + npm audit fix --force + +Run `npm audit` for details. +✅ Dipendenze Node.js aggiornate + +📦 Aggiornamento dipendenze Python... +Defaulting to user installation because normal site-packages is not writeable +Requirement already satisfied: fastapi==0.104.1 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 1)) (0.104.1) +Requirement already satisfied: uvicorn==0.24.0 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 2)) (0.24.0) +Requirement already satisfied: pandas==2.1.3 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 3)) (2.1.3) +Requirement already satisfied: numpy==1.26.2 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 4)) (1.26.2) +Requirement already satisfied: scikit-learn==1.3.2 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 5)) (1.3.2) +Requirement already satisfied: psycopg2-binary==2.9.9 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 6)) (2.9.9) +Requirement already satisfied: python-dotenv==1.0.0 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 7)) (1.0.0) +Requirement already satisfied: pydantic==2.5.0 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 8)) (2.5.0) +Requirement already satisfied: httpx==0.25.1 in /home/ids/.local/lib/python3.11/site-packages (from -r requirements.txt (line 9)) (0.25.1) +Collecting xgboost==2.0.3 + Downloading xgboost-2.0.3-py3-none-manylinux2014_x86_64.whl (297.1 MB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 297.1/297.1 MB 8.4 MB/s eta 0:00:00 +Collecting joblib==1.3.2 + Downloading joblib-1.3.2-py3-none-any.whl (302 kB) + ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 302.2/302.2 kB 62.7 MB/s eta 0:00:00 +ERROR: Ignored the following versions that require a different python version: 1.21.2 Requires-Python >=3.7,<3.11; 1.21.3 Requires-Python >=3.7,<3.11; 1.21.4 Requires-Python >=3.7,<3.11; 1.21.5 Requires-Python >=3.7,<3.11; 1.21.6 Requires-Python >=3.7,<3.11 +ERROR: Could not find a version that satisfies the requirement eif==2.0.0 (from versions: 1.0.0, 1.0.1, 1.0.2, 2.0.2) +ERROR: No matching distribution found for eif==2.0.0 \ No newline at end of file diff --git a/python_ml/requirements.txt b/python_ml/requirements.txt index 3648176..04c0d28 100644 --- a/python_ml/requirements.txt +++ b/python_ml/requirements.txt @@ -9,4 +9,4 @@ pydantic==2.5.0 httpx==0.25.1 xgboost==2.0.3 joblib==1.3.2 -eif==2.0.0 +eif==2.0.2 diff --git a/replit.md b/replit.md index 741343a..79f15c1 100644 --- a/replit.md +++ b/replit.md @@ -99,7 +99,8 @@ The IDS employs a React-based frontend for real-time monitoring, detection visua - `python_ml/dataset_loader.py` - CICIDS2017 loader con mappatura 80→25 features - `python_ml/validation_metrics.py` - Production-grade metrics calculator - `python_ml/train_hybrid.py` - CLI training script (test/train/validate) -- **Dipendenze Nuove**: xgboost==2.0.3, joblib==1.3.2, eif==2.0.0 +- **Dipendenze Nuove**: xgboost==2.0.3, joblib==1.3.2, eif==2.0.2 - **Backward Compatibility**: USE_HYBRID_DETECTOR env var (default=true) - **Target Metrics**: Precision≥90%, Recall≥80%, FPR≤5%, F1≥85% -- **Deploy**: Vedere `deployment/CHECKLIST_ML_HYBRID.md` \ No newline at end of file +- **Deploy**: Vedere `deployment/CHECKLIST_ML_HYBRID.md` +- **Fix Deploy (24 Nov 2025 - 19:00)**: Corretto `eif==2.0.0` → `eif==2.0.2` (versione 2.0.0 non disponibile su PyPI) \ No newline at end of file