diff --git a/MyIA.AI.Notebooks/SymbolicAI/Argument_Analysis/Argument_Analysis_Agentic-0-init_agent.ipynb b/MyIA.AI.Notebooks/SymbolicAI/Argument_Analysis/Argument_Analysis_Agentic-0-init_agent.ipynb index 8f5e2b0c52..ce0c9dbd6e 100644 --- a/MyIA.AI.Notebooks/SymbolicAI/Argument_Analysis/Argument_Analysis_Agentic-0-init_agent.ipynb +++ b/MyIA.AI.Notebooks/SymbolicAI/Argument_Analysis/Argument_Analysis_Agentic-0-init_agent.ipynb @@ -4,17 +4,39 @@ "cell_type": "code", "execution_count": 1, "id": "34e4559f", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:46:37.944510Z", + "iopub.status.busy": "2026-09-15T08:46:37.943483Z", + "iopub.status.idle": "2026-09-15T08:46:37.951521Z", + "shell.execute_reply": "2026-09-15T08:46:37.950986Z" + }, + "papermill": { + "duration": 0.02779, + "end_time": "2026-09-15T08:46:37.952422", + "exception": false, + "start_time": "2026-09-15T08:46:37.924632", + "status": "completed" + }, + "tags": [] + }, "outputs": [], "source": [ "# Parameters\n", "BATCH_MODE = \"true\"\n" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "6196daf0", "metadata": { + "papermill": { + "duration": 0.006352, + "end_time": "2026-09-15T08:46:37.964998", + "exception": false, + "start_time": "2026-09-15T08:46:37.958646", + "status": "completed" + }, "tags": [] }, "source": [ @@ -45,6 +67,13 @@ "cell_type": "markdown", "id": "80571e1e", "metadata": { + "papermill": { + "duration": 0.005725, + "end_time": "2026-09-15T08:46:37.976199", + "exception": false, + "start_time": "2026-09-15T08:46:37.970474", + "status": "completed" + }, "tags": [] }, "source": [ @@ -61,6 +90,22 @@ "cell_type": "code", "execution_count": 2, "id": "a3661e07", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:46:37.990704Z", + "iopub.status.busy": "2026-09-15T08:46:37.990478Z", + "iopub.status.idle": "2026-09-15T08:46:40.118714Z", + "shell.execute_reply": "2026-09-15T08:46:40.118220Z" + }, + "papermill": { + "duration": 2.137557, + "end_time": "2026-09-15T08:46:40.119502", + "exception": false, + "start_time": "2026-09-15T08:46:37.981945", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", @@ -122,13 +167,19 @@ " print(\"Si les cellules suivantes echouent, redemarrez le noyau et re-executez.\")\n", "\n", "print(\"--- Fin verification compatibilite ---\")\n" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "pmpm31xh56", "metadata": { + "papermill": { + "duration": 0.006854, + "end_time": "2026-09-15T08:46:40.133527", + "exception": false, + "start_time": "2026-09-15T08:46:40.126673", + "status": "completed" + }, "tags": [] }, "source": [ @@ -147,54 +198,70 @@ "cell_type": "code", "execution_count": 3, "id": "dd1eb173", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:46:40.148397Z", + "iopub.status.busy": "2026-09-15T08:46:40.147971Z", + "iopub.status.idle": "2026-09-15T08:46:40.498041Z", + "shell.execute_reply": "2026-09-15T08:46:40.497556Z" + }, + "papermill": { + "duration": 0.358422, + "end_time": "2026-09-15T08:46:40.498781", + "exception": false, + "start_time": "2026-09-15T08:46:40.140359", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:34 [INFO] [Orchestration.Setup] --- Vérification des dépendances ---\n" + "10:46:40 [INFO] [Orchestration.Setup] --- Vérification des dépendances ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:34 [INFO] [Orchestration.Setup] ✔️ Dépendance 'jpype' trouvée.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✔️ Dépendance 'jpype' trouvée.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:34 [INFO] [Orchestration.Setup] ✔️ Dépendance 'semantic_kernel' trouvée.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✔️ Dépendance 'semantic_kernel' trouvée.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:34 [INFO] [Orchestration.Setup] ✔️ Dépendance 'dotenv' trouvée.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✔️ Dépendance 'dotenv' trouvée.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] ✔️ Dépendance 'pandas' trouvée.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✔️ Dépendance 'pandas' trouvée.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] ✔️ Dépendance 'requests' trouvée.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✔️ Dépendance 'requests' trouvée.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] \n", + "10:46:40 [INFO] [Orchestration.Setup] \n", "✅ Dépendances principales vérifiées.\n" ] }, @@ -202,21 +269,21 @@ "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] --- Chargement Configuration LLM ---\n" + "10:46:40 [INFO] [Orchestration.Setup] --- Chargement Configuration LLM ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] ✅ Configuration OpenAI standard détectée (Modèle: gpt-5-mini). Org ID: Non fourni.\n" + "10:46:40 [INFO] [Orchestration.Setup] ✅ Configuration OpenAI standard détectée (Modèle: gpt-5-mini). Org ID: Non fourni.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Setup] --- Fin Configuration Initiale ---\n" + "10:46:40 [INFO] [Orchestration.Setup] --- Fin Configuration Initiale ---\n" ] } ], @@ -346,13 +413,19 @@ " logger.warning(\"Variable 'use_azure_openai' non définie (erreur config?), défaut à False.\")\n", "\n", "logger.info(\"--- Fin Configuration Initiale ---\")\n" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "c689b59e", "metadata": { + "papermill": { + "duration": 0.011293, + "end_time": "2026-09-15T08:46:40.518923", + "exception": false, + "start_time": "2026-09-15T08:46:40.507630", + "status": "completed" + }, "tags": [] }, "source": [ @@ -365,12 +438,28 @@ "cell_type": "code", "execution_count": 4, "id": "ab60fc96", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:46:40.538726Z", + "iopub.status.busy": "2026-09-15T08:46:40.538209Z", + "iopub.status.idle": "2026-09-15T08:46:40.544386Z", + "shell.execute_reply": "2026-09-15T08:46:40.543891Z" + }, + "papermill": { + "duration": 0.017084, + "end_time": "2026-09-15T08:46:40.545213", + "exception": false, + "start_time": "2026-09-15T08:46:40.528129", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.Config] ✅ Configuration OpenAI standard chargée (Modèle: gpt-5-mini). Org ID: Non fourni.\n" + "10:46:40 [INFO] [Orchestration.Config] ✅ Configuration OpenAI standard chargée (Modèle: gpt-5-mini). Org ID: Non fourni.\n" ] }, { @@ -427,13 +516,19 @@ "if 'use_azure_openai' not in locals():\n", " use_azure_openai = False # Défaut si erreur précédente\n", " cfg_logger.warning(\"Variable 'use_azure_openai' non définie due à une erreur de config, défaut à False.\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "s3yp5wc2bg", "metadata": { + "papermill": { + "duration": 0.009656, + "end_time": "2026-09-15T08:46:40.564727", + "exception": false, + "start_time": "2026-09-15T08:46:40.555071", + "status": "completed" + }, "tags": [] }, "source": [ @@ -461,6 +556,13 @@ "cell_type": "markdown", "id": "478a85e7", "metadata": { + "papermill": { + "duration": 0.010332, + "end_time": "2026-09-15T08:46:40.584570", + "exception": false, + "start_time": "2026-09-15T08:46:40.574238", + "status": "completed" + }, "tags": [] }, "source": [ @@ -485,6 +587,13 @@ "execution_count": null, "id": "a59062ad", "metadata": { + "papermill": { + "duration": 0.009183, + "end_time": "2026-09-15T08:46:40.603180", + "exception": false, + "start_time": "2026-09-15T08:46:40.593997", + "status": "completed" + }, "tags": [] }, "outputs": [], @@ -522,12 +631,28 @@ "cell_type": "code", "execution_count": 5, "id": "cc5a8f2e", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:46:40.621531Z", + "iopub.status.busy": "2026-09-15T08:46:40.621329Z", + "iopub.status.idle": "2026-09-15T08:47:18.654272Z", + "shell.execute_reply": "2026-09-15T08:47:18.653810Z" + }, + "papermill": { + "duration": 38.04329, + "end_time": "2026-09-15T08:47:18.655012", + "exception": false, + "start_time": "2026-09-15T08:46:40.611722", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] \n", + "10:46:40 [INFO] [Orchestration.JPype] \n", "--- Configuration Auto-Suffisante de la JVM (Option B - Embarquée) ---\n" ] }, @@ -535,126 +660,126 @@ "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] 🔍 Recherche JDK portable dans l'arborescence projet...\n" + "10:46:40 [INFO] [Orchestration.JPype] 🔍 Recherche JDK portable dans l'arborescence projet...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] ✅ JDK portable trouvé: MyIA.AI.Notebooks\\SymbolicAI\\Argument_Analysis\\jdk-17-portable\\zulu17.50.19-ca-jdk17.0.11-win_x64\n" + "10:46:40 [INFO] [Orchestration.JPype] ✅ JDK portable trouvé: MyIA.AI.Notebooks\\SymbolicAI\\Tweety\\jdk-17-portable\\zulu17.50.19-ca-jdk17.0.11-win_x64\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] 🏠 JAVA_HOME configuré dynamiquement: MyIA.AI.Notebooks\\SymbolicAI\\Argument_Analysis\\jdk-17-portable\\zulu17.50.19-ca-jdk17.0.11-win_x64\n" + "10:46:40 [INFO] [Orchestration.JPype] 🏠 JAVA_HOME configuré dynamiquement: MyIA.AI.Notebooks\\SymbolicAI\\Tweety\\jdk-17-portable\\zulu17.50.19-ca-jdk17.0.11-win_x64\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] 📦 Construction du classpath Tweety...\n" + "10:46:40 [INFO] [Orchestration.JPype] 📦 Construction du classpath Tweety...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] Scan des JARs dans: libs\n" + "10:46:40 [INFO] [Orchestration.JPype] Aucun JAR Tweety dans MyIA.AI.Notebooks\\SymbolicAI\\Tweety\\libs -- bootstrap via download_tweety_tools.py\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] Scan des JARs dans: ..\\libs\n" + "10:47:13 [INFO] [Orchestration.JPype] Scan des JARs dans: MyIA.AI.Notebooks\\SymbolicAI\\Tweety\\libs\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] ✅ 41 JARs trouvés dans ..\\libs\n" + "10:47:13 [INFO] [Orchestration.JPype] ✅ 42 JARs trouvés dans MyIA.AI.Notebooks\\SymbolicAI\\Tweety\\libs\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] ✅ Classpath construit: 41 JARs Tweety\n" + "10:47:13 [INFO] [Orchestration.JPype] ✅ Classpath construit: 42 JARs Tweety\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:35 [INFO] [Orchestration.JPype] 🚀 Démarrage JVM avec 41 JARs Tweety...\n" + "10:47:13 [INFO] [Orchestration.JPype] 🚀 Démarrage JVM avec 42 JARs Tweety...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ JVM démarrée avec succès et domaines enregistrés\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ JVM démarrée avec succès et domaines enregistrés\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ☕ Java 17.0.11 opérationnel\n" + "10:47:18 [INFO] [Orchestration.JPype] ☕ Java 17.0.11 opérationnel\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] 🎯 Test des classes critiques Tweety...\n" + "10:47:18 [INFO] [Orchestration.JPype] 🎯 Test des classes critiques Tweety...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ InformationObject: Accessible\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ InformationObject: Accessible\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ PlParser: Accessible\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ PlParser: Accessible\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ PlFormula: Accessible\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ PlFormula: Accessible\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ BaseRevisionOperator: Accessible\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ BaseRevisionOperator: Accessible\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] 🏆 Test Tweety RÉUSSI: 4/4 classes accessibles\n" + "10:47:18 [INFO] [Orchestration.JPype] 🏆 Test Tweety RÉUSSI: 4/4 classes accessibles\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] \n", + "10:47:18 [INFO] [Orchestration.JPype] \n", "🎉 🏆 SUCCÈS TOTAL - INFRASTRUCTURE TWEETY AUTO-SUFFISANTE! 🏆 🎉\n" ] }, @@ -662,21 +787,21 @@ "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ PropositionalLogicAgent prêt pour exécution native\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ PropositionalLogicAgent prêt pour exécution native\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ Pipeline argumentatif avec intégration formelle/informelle opérationnel\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ Pipeline argumentatif avec intégration formelle/informelle opérationnel\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] \n", + "10:47:18 [INFO] [Orchestration.JPype] \n", "🟢 STATUT FINAL: JVM + Tweety OPÉRATIONNELS\n" ] }, @@ -684,21 +809,21 @@ "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] Pipeline peut atteindre son potentiel maximal (8/10)\n" + "10:47:18 [INFO] [Orchestration.JPype] Pipeline peut atteindre son potentiel maximal (8/10)\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] --- Fin Configuration JPype Auto-Suffisante ---\n" + "10:47:18 [INFO] [Orchestration.JPype] --- Fin Configuration JPype Auto-Suffisante ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.JPype] ✅ Tweety opérationnel - PropositionalLogicAgent en mode natif\n" + "10:47:18 [INFO] [Orchestration.JPype] ✅ Tweety opérationnel - PropositionalLogicAgent en mode natif\n" ] } ], @@ -711,6 +836,7 @@ "import os\n", "import pathlib\n", "import platform\n", + "import subprocess\n", "import sys\n", "import logging\n", "from typing import Optional\n", @@ -720,6 +846,88 @@ "\n", "# --- Fonctions embarquées (extraites des scripts de réparation validés) ---\n", "\n", + "# --- Reference de localisation commune (#16264) ---\n", + "# La shim #4960 (argumentation_lib/_paths.py) resout les chemins en\n", + "# __file__-relatif, donc insensible au cwd du lanceur (Jupyter, papermill --cwd,\n", + "# outil du depot) : c'est la convention de la famille Argument_Analysis, et elle\n", + "# interdit le walk manuel. Repli explicite si le dossier du notebook n'est pas\n", + "# importable, pour que la cellule reste executable (aucun raise, regle C.1).\n", + "try:\n", + " from argumentation_lib._paths import SYMBOLIC_AI_DIR\n", + " TWEETY_DIR = SYMBOLIC_AI_DIR / \"Tweety\"\n", + "except ImportError:\n", + " logger.warning(\"argumentation_lib non importable -- repli sur un chemin relatif au cwd\")\n", + " TWEETY_DIR = pathlib.Path(\"MyIA.AI.Notebooks/SymbolicAI/Tweety\")\n", + "\n", + "#: Reference partagee avec la serie Tweety : c'est le defaut `--lib-dir` de\n", + "#: download_tweety_tools.py, et le seul repertoire que l'outil canonique\n", + "#: alimente (JARs TweetyProject + JDK Zulu 17 portable). Avant #16264 la cellule\n", + "#: cherchait l'ancien emplacement local Argument_Analysis/libs, vide depuis\n", + "#: #1437 (Phase 1 de l'EPIC #1396) : classpath vide, JVM non demarree, sans que\n", + "#: rien ne le signale a l'etudiant.\n", + "TWEETY_LIBS_DIR = \"libs\"\n", + "TWEETY_JDK_DIR = \"jdk-17-portable\"\n", + "\n", + "# --- Affichage des chemins : jamais l'absolu (#16264) ---\n", + "# Un chemin absolu dans une sortie de cellule divulgue la topologie de la machine\n", + "# d'execution (secrets-hygiene rule 6) et fait rougir le ratchet Output-failure\n", + "# (MACHINE_PATH). Ces logs impriment l'absolu depuis toujours ; ils etaient\n", + "# simplement inatteignables tant que la cellule ne trouvait ni JDK ni JARs. On\n", + "# corrige la SOURCE plutot que de nettoyer la sortie : un chemin relatif ne se\n", + "# regenere pas au run suivant, alors qu'une retouche de sortie serait refaite a\n", + "# chaque execution.\n", + "try:\n", + " _REPO_ROOT = SYMBOLIC_AI_DIR.parent.parent\n", + "except NameError: # repli ImportError ci-dessus : chemins deja relatifs au cwd\n", + " _REPO_ROOT = pathlib.Path(\".\")\n", + "\n", + "\n", + "def display_path(path) -> str:\n", + " \"\"\"Rend un chemin affichable : relatif a la racine du depot, jamais absolu.\"\"\"\n", + " if not path:\n", + " return \"(non defini)\"\n", + " p = pathlib.Path(path)\n", + " try:\n", + " return str(p.relative_to(_REPO_ROOT))\n", + " except ValueError:\n", + " # Hors depot : le nom seul, jamais l'absolu.\n", + " return p.name if p.is_absolute() else str(p)\n", + "\n", + "\n", + "def ensure_tweety_jars(jars_dir: pathlib.Path) -> bool:\n", + " \"\"\"Installe les JARs Tweety manquants via l'outil canonique (idempotent).\n", + "\n", + " Depuis #1437 les 71 JARs TweetyProject ne sont plus suivis par git : un clone\n", + " neuf n'en contient aucun et la JVM ne peut pas demarrer. On invoque le script\n", + " de la serie Tweety plutot que de reimplementer un telechargement ici.\n", + " Retourne True si le repertoire contient des JARs a l'issue de l'appel.\n", + " \"\"\"\n", + " if jars_dir.is_dir() and any(jars_dir.glob(\"*.jar\")):\n", + " return True\n", + "\n", + " downloader = TWEETY_DIR / \"scripts\" / \"download_tweety_tools.py\"\n", + " if not downloader.exists():\n", + " logger.error(\"Bootstrap JARs impossible: %s introuvable\", display_path(downloader))\n", + " return False\n", + "\n", + " logger.info(\"Aucun JAR Tweety dans %s -- bootstrap via %s\",\n", + " display_path(jars_dir), downloader.name)\n", + " try:\n", + " proc = subprocess.run(\n", + " [sys.executable, str(downloader), \"--jars\",\n", + " \"--lib-dir\", str(jars_dir), \"--no-interactive\"],\n", + " capture_output=True, text=True, timeout=1800,\n", + " )\n", + " except Exception as exc:\n", + " logger.error(\"Bootstrap JARs echoue: %s\", exc)\n", + " return False\n", + "\n", + " if proc.returncode != 0:\n", + " logger.error(\"Bootstrap JARs echoue (rc=%s): %s\",\n", + " proc.returncode, (proc.stderr or proc.stdout or \"\")[-800:])\n", + " return jars_dir.is_dir() and any(jars_dir.glob(\"*.jar\"))\n", + "\n", + "\n", "def find_portable_jdk() -> Optional[str]:\n", " \"\"\"\n", " Localise automatiquement le JDK portable dans l'arborescence du projet.\n", @@ -729,15 +937,18 @@ " \n", " # Chemins de recherche prioritaires pour le JDK portable\n", " search_paths = [\n", + " # Reference partagee avec la serie Tweety (defaut --jdk de l'outil).\n", + " TWEETY_DIR / TWEETY_JDK_DIR,\n", + " # Ancien emplacement local a Argument_Analysis : repli, plus alimente.\n", " pathlib.Path(\"MyIA.AI.Notebooks/SymbolicAI/Argument_Analysis/jdk-17-portable\"),\n", " pathlib.Path(\"jdk-17-portable\"),\n", " pathlib.Path(\"../jdk-17-portable\"),\n", - " pathlib.Path(\"../../jdk-17-portable\")\n", + " pathlib.Path(\"../../jdk-17-portable\"),\n", " ]\n", " \n", " for base_path in search_paths:\n", " if base_path.exists():\n", - " logger.debug(f\" Scan du répertoire: {base_path}\")\n", + " logger.debug(f\" Scan du répertoire: {display_path(base_path)}\")\n", " \n", " # Chercher des sous-dossiers JDK\n", " jdk_patterns = [\"*jdk*\", \"zulu*\", \"*openjdk*\", \"*corretto*\"]\n", @@ -749,7 +960,7 @@ " exe_suffix = \".exe\" if platform.system() == \"Windows\" else \"\"\n", " java_exe = jdk_dir / \"bin\" / f\"java{exe_suffix}\"\n", " if java_exe.exists():\n", - " logger.info(f\"✅ JDK portable trouvé: {jdk_dir.absolute()}\")\n", + " logger.info(f\"✅ JDK portable trouvé: {display_path(jdk_dir)}\")\n", " return str(jdk_dir.absolute())\n", " \n", " logger.warning(\"⚠️ JDK portable non trouvé dans les chemins standards\")\n", @@ -763,21 +974,26 @@ " logger.info(\"📦 Construction du classpath Tweety...\")\n", " \n", " # Chemins de recherche des JARs\n", - " libs_paths = [\n", - " pathlib.Path(\"libs\"),\n", - " pathlib.Path(\"MyIA.AI.Notebooks/SymbolicAI/libs\"),\n", - " pathlib.Path(\"../libs\")\n", - " ]\n", + " # Reference partagee d'abord (elle seule est alimentee par l'outil\n", + " # canonique) ; les anciens emplacements restent en repli.\n", + " libs_paths = [TWEETY_DIR / TWEETY_LIBS_DIR,\n", + " pathlib.Path(\"libs\"),\n", + " pathlib.Path(\"MyIA.AI.Notebooks/SymbolicAI/libs\"),\n", + " pathlib.Path(\"../libs\")]\n", + "\n", + " # Un clone neuf n'a aucun JAR (gitignores depuis #1437) : bootstrap\n", + " # canonique, declenche uniquement parce que le classpath est vide.\n", + " ensure_tweety_jars(TWEETY_DIR / TWEETY_LIBS_DIR)\n", " \n", " jar_files = []\n", " \n", " for libs_path in libs_paths:\n", " if libs_path.exists() and libs_path.is_dir():\n", - " logger.info(f\" Scan des JARs dans: {libs_path}\")\n", + " logger.info(f\" Scan des JARs dans: {display_path(libs_path)}\")\n", " found_jars = list(libs_path.glob(\"*.jar\"))\n", " if found_jars:\n", " jar_files.extend([str(jar.absolute()) for jar in found_jars])\n", - " logger.info(f\" ✅ {len(found_jars)} JARs trouvés dans {libs_path}\")\n", + " logger.info(f\" ✅ {len(found_jars)} JARs trouvés dans {display_path(libs_path)}\")\n", " break # Utiliser le premier répertoire avec des JARs\n", " \n", " if jar_files:\n", @@ -846,40 +1062,49 @@ " current_java_home = os.getenv('JAVA_HOME')\n", " if not current_java_home or current_java_home != portable_jdk:\n", " os.environ['JAVA_HOME'] = portable_jdk\n", - " logger.info(f\"🏠 JAVA_HOME configuré dynamiquement: {portable_jdk}\")\n", + " logger.info(f\"🏠 JAVA_HOME configuré dynamiquement: {display_path(portable_jdk)}\")\n", " else:\n", - " logger.info(f\"🏠 JAVA_HOME déjà configuré: {current_java_home}\")\n", + " logger.info(f\"🏠 JAVA_HOME déjà configuré: {display_path(current_java_home)}\")\n", " else:\n", " logger.error(\"❌ Impossible de localiser un JDK portable - JVM pourrait échouer\")\n", + " logger.error(\" Attendu: %s (download_tweety_tools.py --jdk) -- JAVA_HOME courant: %s\",\n", + " display_path(TWEETY_DIR / TWEETY_JDK_DIR),\n", + " display_path(os.getenv('JAVA_HOME')))\n", " \n", " # Étape 3: Construire le classpath Tweety complet\n", " tweety_jars = get_tweety_classpath()\n", " \n", - " if not tweety_jars:\n", - " raise Exception(\"Classpath Tweety vide - JARs manquants\")\n", - " \n", - " # Étape 4: Démarrer la JVM avec configuration optimale\n", - " logger.info(f\"🚀 Démarrage JVM avec {len(tweety_jars)} JARs Tweety...\")\n", - " \n", - " jvm_args = [\n", - " \"-Xmx2g\", # Mémoire suffisante pour Tweety\n", - " \"-Djava.awt.headless=true\", # Mode headless pour notebooks\n", - " ]\n", - " \n", - " jpype.startJVM(\n", - " *jvm_args,\n", - " classpath=tweety_jars,\n", - " convertStrings=False,\n", - " ignoreUnrecognized=True\n", - " )\n", - " \n", - " # Étape 5: Enregistrer les domaines Java\n", - " jpype.imports.registerDomain(\"org\", alias=\"org\")\n", - " jpype.imports.registerDomain(\"java\", alias=\"java\")\n", - " jpype.imports.registerDomain(\"net\", alias=\"net\")\n", - " \n", - " logger.info(\"✅ JVM démarrée avec succès et domaines enregistrés\")\n", - " jvm_ready = True\n", + " # Étape 4: Démarrer la JVM avec configuration optimale.\n", + " # #16264 : aucun raise si le classpath reste vide (regle C.1) -- la\n", + " # cellule degrade proprement et le diagnostic final dit exactement ce\n", + " # qui manque, au lieu de faire echouer le notebook.\n", + " if tweety_jars:\n", + " logger.info(f\"🚀 Démarrage JVM avec {len(tweety_jars)} JARs Tweety...\")\n", + "\n", + " jvm_args = [\n", + " \"-Xmx2g\", # Mémoire suffisante pour Tweety\n", + " \"-Djava.awt.headless=true\", # Mode headless pour notebooks\n", + " ]\n", + "\n", + " jpype.startJVM(\n", + " *jvm_args,\n", + " classpath=tweety_jars,\n", + " convertStrings=False,\n", + " ignoreUnrecognized=True\n", + " )\n", + "\n", + " # Étape 5: Enregistrer les domaines Java\n", + " jpype.imports.registerDomain(\"org\", alias=\"org\")\n", + " jpype.imports.registerDomain(\"java\", alias=\"java\")\n", + " jpype.imports.registerDomain(\"net\", alias=\"net\")\n", + "\n", + " logger.info(\"✅ JVM démarrée avec succès et domaines enregistrés\")\n", + " jvm_ready = True\n", + " else:\n", + " logger.error(\"❌ Classpath Tweety vide après bootstrap -- JVM non démarrée\")\n", + " logger.error(\" Attendu: %s (JARs TweetyProject, outil canonique \"\n", + " \"download_tweety_tools.py --jars)\",\n", + " display_path(TWEETY_DIR / TWEETY_LIBS_DIR))\n", " \n", " # Étape 6: Test de validation Tweety\n", " if jvm_ready:\n", @@ -959,13 +1184,19 @@ "# Diagnostic automatique à l'initialisation\n", "if 'jvm_ready' in locals():\n", " validate_tweety_ready()" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "7hq2u546fkr", "metadata": { + "papermill": { + "duration": 0.010261, + "end_time": "2026-09-15T08:47:18.674730", + "exception": false, + "start_time": "2026-09-15T08:47:18.664469", + "status": "completed" + }, "tags": [] }, "source": [ @@ -999,6 +1230,13 @@ "cell_type": "markdown", "id": "d201514e", "metadata": { + "papermill": { + "duration": 0.009922, + "end_time": "2026-09-15T08:47:18.694436", + "exception": false, + "start_time": "2026-09-15T08:47:18.684514", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1015,6 +1253,13 @@ "cell_type": "markdown", "id": "a13a208e", "metadata": { + "papermill": { + "duration": 0.009549, + "end_time": "2026-09-15T08:47:18.713748", + "exception": false, + "start_time": "2026-09-15T08:47:18.704199", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1061,12 +1306,28 @@ "cell_type": "code", "execution_count": 6, "id": "a303fa9c", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:18.734213Z", + "iopub.status.busy": "2026-09-15T08:47:18.734004Z", + "iopub.status.idle": "2026-09-15T08:47:18.737796Z", + "shell.execute_reply": "2026-09-15T08:47:18.737368Z" + }, + "papermill": { + "duration": 0.014673, + "end_time": "2026-09-15T08:47:18.738513", + "exception": false, + "start_time": "2026-09-15T08:47:18.723840", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [root] Classe RhetoricalAnalysisState définie (via argumentation_lib shim, Phase 2 #2137).\n" + "10:47:18 [INFO] [root] Classe RhetoricalAnalysisState définie (via argumentation_lib shim, Phase 2 #2137).\n" ] } ], @@ -1091,13 +1352,19 @@ "state_logger = logging.getLogger(\"RhetoricalAnalysisState\")\n", "\n", "logging.info(\"Classe RhetoricalAnalysisState définie (via argumentation_lib shim, Phase 2 #2137).\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "0d4166a2", "metadata": { + "papermill": { + "duration": 0.009903, + "end_time": "2026-09-15T08:47:18.757940", + "exception": false, + "start_time": "2026-09-15T08:47:18.748037", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1148,12 +1415,28 @@ "cell_type": "code", "execution_count": 7, "id": "61903410", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:18.777268Z", + "iopub.status.busy": "2026-09-15T08:47:18.777062Z", + "iopub.status.idle": "2026-09-15T08:47:18.782966Z", + "shell.execute_reply": "2026-09-15T08:47:18.782475Z" + }, + "papermill": { + "duration": 0.016534, + "end_time": "2026-09-15T08:47:18.783719", + "exception": false, + "start_time": "2026-09-15T08:47:18.767185", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [root] Classe StateManagerPlugin définie (via argumentation_lib shim, Phase 2 #2137).\n" + "10:47:18 [INFO] [root] Classe StateManagerPlugin définie (via argumentation_lib shim, Phase 2 #2137).\n" ] } ], @@ -1180,13 +1463,19 @@ "sm_logger = logging.getLogger(\"Orchestration.StateManager\")\n", "\n", "logging.info(\"Classe StateManagerPlugin définie (via argumentation_lib shim, Phase 2 #2137).\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "a754dbe1", "metadata": { + "papermill": { + "duration": 0.009493, + "end_time": "2026-09-15T08:47:18.802785", + "exception": false, + "start_time": "2026-09-15T08:47:18.793292", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1226,33 +1515,49 @@ "cell_type": "code", "execution_count": 8, "id": "95c09e20", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:18.822893Z", + "iopub.status.busy": "2026-09-15T08:47:18.822564Z", + "iopub.status.idle": "2026-09-15T08:47:19.489061Z", + "shell.execute_reply": "2026-09-15T08:47:19.488413Z" + }, + "papermill": { + "duration": 0.677983, + "end_time": "2026-09-15T08:47:19.490036", + "exception": false, + "start_time": "2026-09-15T08:47:18.812053", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.LLM] --- Configuration du Service LLM Global ---\n" + "10:47:18 [INFO] [Orchestration.LLM] --- Configuration du Service LLM Global ---\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:37 [INFO] [Orchestration.LLM] Configuration Service Global: OpenAIChatCompletion...\n" + "10:47:18 [INFO] [Orchestration.LLM] Configuration Service Global: OpenAIChatCompletion...\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:38 [INFO] [Orchestration.LLM] Service LLM global OpenAI (gpt-5-mini) créé.\n" + "10:47:19 [INFO] [Orchestration.LLM] Service LLM global OpenAI (gpt-5-mini) créé.\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "11:29:38 [INFO] [root] --- Fin Définitions Composants Partagés ---\n" + "10:47:19 [INFO] [root] --- Fin Définitions Composants Partagés ---\n" ] } ], @@ -1307,13 +1612,19 @@ "logging.info(\"--- Fin Définitions Composants Partagés ---\")\n", "\n", "# Rappel: PAS d'instance de RhetoricalAnalysisState ou StateManagerPlugin ou Kernel ici.\n" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "76c485ec", "metadata": { + "papermill": { + "duration": 0.009363, + "end_time": "2026-09-15T08:47:19.509430", + "exception": false, + "start_time": "2026-09-15T08:47:19.500067", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1339,6 +1650,13 @@ "cell_type": "markdown", "id": "f7a615c6", "metadata": { + "papermill": { + "duration": 0.010433, + "end_time": "2026-09-15T08:47:19.529974", + "exception": false, + "start_time": "2026-09-15T08:47:19.519541", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1386,12 +1704,28 @@ "cell_type": "code", "execution_count": 9, "id": "8bafcee0", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:19.551198Z", + "iopub.status.busy": "2026-09-15T08:47:19.550821Z", + "iopub.status.idle": "2026-09-15T08:47:19.556984Z", + "shell.execute_reply": "2026-09-15T08:47:19.556140Z" + }, + "papermill": { + "duration": 0.018587, + "end_time": "2026-09-15T08:47:19.558033", + "exception": false, + "start_time": "2026-09-15T08:47:19.539446", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:38 [INFO] [Orchestration.AgentPM.Defs] Plugin PM (vide) et prompts semantiques (V17 - CODE-ONLY) definis.\n" + "10:47:19 [INFO] [Orchestration.AgentPM.Defs] Plugin PM (vide) et prompts semantiques (V17 - CODE-ONLY) definis.\n" ] } ], @@ -1495,13 +1829,19 @@ "prompt_write_conclusion_v7 = prompt_write_conclusion_v8\n", "\n", "logger.info(\"Plugin PM (vide) et prompts semantiques (V17 - CODE-ONLY) definis.\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "036e58ad", "metadata": { + "papermill": { + "duration": 0.010589, + "end_time": "2026-09-15T08:47:19.578262", + "exception": false, + "start_time": "2026-09-15T08:47:19.567673", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1537,6 +1877,22 @@ "cell_type": "code", "execution_count": 10, "id": "7a1a3c2e", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:19.599723Z", + "iopub.status.busy": "2026-09-15T08:47:19.599475Z", + "iopub.status.idle": "2026-09-15T08:47:19.607929Z", + "shell.execute_reply": "2026-09-15T08:47:19.607359Z" + }, + "papermill": { + "duration": 0.02051, + "end_time": "2026-09-15T08:47:19.608682", + "exception": false, + "start_time": "2026-09-15T08:47:19.588172", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stdout", @@ -1694,13 +2050,19 @@ " logger.info(f\"Kernel {plugin_name} configure (V11).\")\n", "\n", "print(\"Fonction setup_pm_kernel definie : configuration kernel ProjectManager avec plugins et fonctions semantiques\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "1b9bb59a", "metadata": { + "papermill": { + "duration": 0.009499, + "end_time": "2026-09-15T08:47:19.628096", + "exception": false, + "start_time": "2026-09-15T08:47:19.618597", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1742,12 +2104,28 @@ "cell_type": "code", "execution_count": 11, "id": "f2a524ce", + "metadata": { + "execution": { + "iopub.execute_input": "2026-09-15T08:47:19.648060Z", + "iopub.status.busy": "2026-09-15T08:47:19.647854Z", + "iopub.status.idle": "2026-09-15T08:47:19.651475Z", + "shell.execute_reply": "2026-09-15T08:47:19.650953Z" + }, + "papermill": { + "duration": 0.014567, + "end_time": "2026-09-15T08:47:19.652149", + "exception": false, + "start_time": "2026-09-15T08:47:19.637582", + "status": "completed" + }, + "tags": [] + }, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ - "11:29:38 [INFO] [Orchestration.AgentPM.Instructions] Instructions Systeme PM_INSTRUCTIONS (V15 - CODE-ONLY) definies.\n" + "10:47:19 [INFO] [Orchestration.AgentPM.Instructions] Instructions Systeme PM_INSTRUCTIONS (V15 - CODE-ONLY) definies.\n" ] } ], @@ -1792,13 +2170,19 @@ "PM_INSTRUCTIONS = PM_INSTRUCTIONS_V15\n", "\n", "logger.info(\"Instructions Systeme PM_INSTRUCTIONS (V15 - CODE-ONLY) definies.\")" - ], - "metadata": {} + ] }, { "cell_type": "markdown", "id": "61dwms8dzi", "metadata": { + "papermill": { + "duration": 0.009577, + "end_time": "2026-09-15T08:47:19.671667", + "exception": false, + "start_time": "2026-09-15T08:47:19.662090", + "status": "completed" + }, "tags": [] }, "source": [ @@ -1850,20 +2234,20 @@ ], "metadata": { "cost": { - "api_usd_est": 0.0, "api_provider": "OpenAI (gpt-5-mini, configuré via .env)", + "api_usd_est": 0.0, "cpu_min": 2, + "external_account": "OpenAI requis (OPENAI_API_KEY + OPENAI_CHAT_MODEL_ID lus via dotenv cell[7]) pour amorcer le pipeline Argument_Analysis ; ce carnet d'init crée le service mais n'effectue aucun appel API dans le run commis", "gpu_min": 0, "gpu_required": false, - "vram_gb": 0, - "vram_tier": "NONE", + "metadata_written": "2026-08-05", "network": true, - "external_account": "OpenAI requis (OPENAI_API_KEY + OPENAI_CHAT_MODEL_ID lus via dotenv cell[7]) pour amorcer le pipeline Argument_Analysis ; ce carnet d'init crée le service mais n'effectue aucun appel API dans le run commis", + "notes": "Carnet d'INIT (cell[0]) de la série Argument_Analysis_Agentic : configure Semantic Kernel + OpenAIChatCompletion (gpt-5-mini lu depuis .env) + JVM JPype/Tweety (42 JARs, Java 17.0.18 opérationnel dans le run commis), crée le service LLM global (cell[19]). Run commis : config chargée + service créé, AUCUNE complétion API (0 token, 0 USD) — l'init ne définit que les composants (état partagé, plugins, prompts PM). Le coût API réel est porté par les carnets aval (1-informal, 3-orchestration, capstone) qui enchaînent les invocations LLM. external_account déclaré car cell[7] lit OPENAI_API_KEY : un compte OpenAI configuré est nécessaire pour que l'init réussisse.", "reduced_pedagogical": "sans clé OpenAI : avertissement 'Configuration OpenAI standard incomplète' (cell[5]/cell[7]), service LLM non créé, pipeline aval bloqué ; les cellules utilisant le LLM basculent en mode dégradé", "reproducibility": "HIGH", - "metadata_written": "2026-08-05", "validator": "manual", - "notes": "Carnet d'INIT (cell[0]) de la série Argument_Analysis_Agentic : configure Semantic Kernel + OpenAIChatCompletion (gpt-5-mini lu depuis .env) + JVM JPype/Tweety (42 JARs, Java 17.0.18 opérationnel dans le run commis), crée le service LLM global (cell[19]). Run commis : config chargée + service créé, AUCUNE complétion API (0 token, 0 USD) — l'init ne définit que les composants (état partagé, plugins, prompts PM). Le coût API réel est porté par les carnets aval (1-informal, 3-orchestration, capstone) qui enchaînent les invocations LLM. external_account déclaré car cell[7] lit OPENAI_API_KEY : un compte OpenAI configuré est nécessaire pour que l'init réussisse." + "vram_gb": 0, + "vram_tier": "NONE" }, "kernelspec": { "display_name": "Python 3", @@ -1880,9 +2264,21 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.13.12" + "version": "3.13.3" + }, + "papermill": { + "default_parameters": {}, + "duration": 44.065052, + "end_time": "2026-09-15T08:47:20.252697", + "environment_variables": {}, + "exception": null, + "input_path": "D:\\Dev\\CoursIA-16264\\MyIA.AI.Notebooks\\SymbolicAI\\Argument_Analysis\\Argument_Analysis_Agentic-0-init_agent.ipynb", + "output_path": "D:\\Dev\\CoursIA-16264\\MyIA.AI.Notebooks\\SymbolicAI\\Argument_Analysis\\Argument_Analysis_Agentic-0-init_agent_output.ipynb", + "parameters": {}, + "start_time": "2026-09-15T08:46:36.187645", + "version": "2.6.0" } }, "nbformat": 4, "nbformat_minor": 5 -} +} \ No newline at end of file