Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@
"id": "138bdfcd",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:14.868102Z",
"iopub.status.busy": "2026-07-30T06:50:14.858162Z",
"iopub.status.idle": "2026-07-30T06:50:17.250540Z",
"shell.execute_reply": "2026-07-30T06:50:17.243629Z"
"iopub.execute_input": "2026-10-08T12:45:30.572301Z",
"iopub.status.busy": "2026-10-08T12:45:30.560695Z",
"iopub.status.idle": "2026-10-08T12:45:33.763334Z",
"shell.execute_reply": "2026-10-08T12:45:33.759036Z"
},
"papermill": {
"duration": 2.09477,
Expand All @@ -133,7 +133,7 @@
"text/html": [
"\r\n",
"<div>\r\n",
" <div id='dotnet-interactive-this-cell-$CACHE_BUSTER$' style='display: none'>\r\n",
" <div id='dotnet-interactive-this-cell-415588.Microsoft.DotNet.Interactive.Http.HttpPort' style='display: none'>\r\n",
" The below script needs to be able to find the current output cell; this is an easy method to get it.\r\n",
" </div>\r\n",
" <script type='text/javascript'>\r\n",
Expand Down Expand Up @@ -183,7 +183,7 @@
" // use probing to find host url and api resources\r\n",
" // load interactive helpers and language services\r\n",
" let dotnetInteractiveRequire = require.config({\r\n",
" context: '35772.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
" context: '415588.Microsoft.DotNet.Interactive.Http.HttpPort',\r\n",
" paths:\r\n",
" {\r\n",
" 'dotnet-interactive': `${root}resources`\r\n",
Expand Down Expand Up @@ -247,7 +247,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Donnees presentes : Ciqual, Recettes, RecipeML\r\n"
"Donnees presentes : Ciqual, RecipeML -- RecipeML 110/110 batches\r\n"
]
}
],
Expand All @@ -265,10 +265,50 @@
"using System.Diagnostics;\n",
"\n",
"var BASE = \"data/meals\";\n",
"if (!Directory.Exists(Path.Combine(BASE, \"Ciqual\")) || !Directory.Exists(Path.Combine(BASE, \"RecipeML\")))\n",
" Console.WriteLine(\"Donnees absentes. Lancez d'abord : python download_meal_data.py --areas Ciqual RecipeML\");\n",
"else\n",
" Console.WriteLine(\"Donnees presentes : \" + string.Join(\", \", Directory.GetDirectories(BASE).Select(Path.GetFileName)));\n"
"\n",
"// ---- garde-fou de COMPLETUDE du corpus (miroir du jumeau Python Z3-16b, #18520) ----\n",
"// Un dossier present ne prouve PAS sa completude : le telechargement Wayback refuse\n",
"// parfois des batches, que `download_meal_data.py` ignore en silence en concluant [ok].\n",
"// Le cache est un artefact EPINGLE (#8901) : le construire sur un corpus tronque\n",
"// ecrirait un millesime faux, et rien en aval ne le signalerait. On compte donc les\n",
"// batches PORTANT des XML, et on refuse de continuer sous le pin.\n",
"const int RML_BATCHES_PIN = 110; // millesime epingle : archive RecipeML complete\n",
"int RmlBatches(string dest)\n",
"{\n",
" var rml = Path.Combine(dest, \"RecipeML\");\n",
" if (!Directory.Exists(rml)) return 0;\n",
" return Directory.GetDirectories(rml, \"RecipeMLArchive*\")\n",
" .Count(d => Directory.GetFiles(d, \"*.xml\").Length > 0);\n",
"}\n",
"\n",
"int nRml = RmlBatches(BASE);\n",
"if (!Directory.Exists(Path.Combine(BASE, \"Ciqual\")) || nRml < RML_BATCHES_PIN)\n",
"{\n",
" Console.WriteLine($\"Donnees absentes ou RecipeML incomplet ({nRml}/{RML_BATCHES_PIN} batches) : appel du downloader...\");\n",
" try\n",
" {\n",
" var psi = new ProcessStartInfo(\"python\",\n",
" $\"download_meal_data.py --areas Ciqual RecipeML --dest {BASE}\")\n",
" { UseShellExecute = false, RedirectStandardOutput = true, RedirectStandardError = true };\n",
" using var proc = Process.Start(psi);\n",
" proc.WaitForExit();\n",
" }\n",
" catch (Exception ex) { Console.WriteLine(\" (downloader non lance : \" + ex.Message + \")\"); }\n",
" nRml = RmlBatches(BASE);\n",
"}\n",
"\n",
"if (!Directory.Exists(Path.Combine(BASE, \"Ciqual\")))\n",
" throw new Exception(\"Corpus Ciqual absent. Lancez : python download_meal_data.py --areas Ciqual RecipeML\");\n",
"\n",
"Console.WriteLine($\"Donnees presentes : {string.Join(\", \", Directory.GetDirectories(BASE).Select(Path.GetFileName))}\"\n",
" + $\" -- RecipeML {nRml}/{RML_BATCHES_PIN} batches\");\n",
"\n",
"if (nRml < RML_BATCHES_PIN)\n",
" throw new Exception(\n",
" $\"Corpus RecipeML incomplet : {nRml}/{RML_BATCHES_PIN} batches portant des XML. Wayback refuse \"\n",
" + \"parfois des batches (ignores en silence par le downloader) : le cache derive serait celui d'un \"\n",
" + \"millesime tronque. Relancez le carnet -- les batches deja presents sont sautes, seule la \"\n",
" + \"reprise complete le corpus.\");"
]
},
{
Expand Down Expand Up @@ -296,10 +336,10 @@
"id": "b4e8ab6f",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:17.252684Z",
"iopub.status.busy": "2026-07-30T06:50:17.252350Z",
"iopub.status.idle": "2026-07-30T06:50:19.431327Z",
"shell.execute_reply": "2026-07-30T06:50:19.430957Z"
"iopub.execute_input": "2026-10-08T12:45:33.766401Z",
"iopub.status.busy": "2026-10-08T12:45:33.766026Z",
"iopub.status.idle": "2026-10-08T12:45:37.530637Z",
"shell.execute_reply": "2026-10-08T12:45:37.529413Z"
},
"papermill": {
"duration": 3.536671,
Expand All @@ -315,7 +355,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Ciqual charge en 1,5s : 74 constituants, 3484 aliments, 3484 avec composition.\r\n"
"Ciqual charge en 3,3s : 74 constituants, 3484 aliments, 3484 avec composition.\r\n"
]
},
{
Expand Down Expand Up @@ -462,10 +502,10 @@
"id": "fb9c15eb",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:19.435838Z",
"iopub.status.busy": "2026-07-30T06:50:19.433309Z",
"iopub.status.idle": "2026-07-30T06:50:19.839052Z",
"shell.execute_reply": "2026-07-30T06:50:19.838704Z"
"iopub.execute_input": "2026-10-08T12:45:37.533763Z",
"iopub.status.busy": "2026-10-08T12:45:37.533258Z",
"iopub.status.idle": "2026-10-08T12:45:38.321321Z",
"shell.execute_reply": "2026-10-08T12:45:38.320708Z"
},
"papermill": {
"duration": 0.664154,
Expand Down Expand Up @@ -682,10 +722,10 @@
"id": "64ba09d6",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:19.841022Z",
"iopub.status.busy": "2026-07-30T06:50:19.840681Z",
"iopub.status.idle": "2026-07-30T06:50:21.762701Z",
"shell.execute_reply": "2026-07-30T06:50:21.762194Z"
"iopub.execute_input": "2026-10-08T12:45:38.326177Z",
"iopub.status.busy": "2026-10-08T12:45:38.324559Z",
"iopub.status.idle": "2026-10-08T12:46:32.286827Z",
"shell.execute_reply": "2026-10-08T12:46:32.286399Z"
},
"papermill": {
"duration": 2.370161,
Expand All @@ -701,7 +741,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"RecipeML : 8286 recettes, 76289 ingredients (90% avec quantite, 77% avec unite), 27 fichiers XML irrecuperables ignores.\r\n"
"RecipeML : 10850 recettes, 101128 ingredients (90% avec quantite, 78% avec unite), 40 fichiers XML irrecuperables ignores.\r\n"
]
},
{
Expand Down Expand Up @@ -838,10 +878,10 @@
"id": "b9415167",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:21.764466Z",
"iopub.status.busy": "2026-07-30T06:50:21.764210Z",
"iopub.status.idle": "2026-07-30T06:50:21.898465Z",
"shell.execute_reply": "2026-07-30T06:50:21.897980Z"
"iopub.execute_input": "2026-10-08T12:46:32.290482Z",
"iopub.status.busy": "2026-10-08T12:46:32.289686Z",
"iopub.status.idle": "2026-10-08T12:46:32.568109Z",
"shell.execute_reply": "2026-10-08T12:46:32.567553Z"
},
"papermill": {
"duration": 0.27606,
Expand Down Expand Up @@ -972,10 +1012,10 @@
"id": "8aab2456",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:21.900844Z",
"iopub.status.busy": "2026-07-30T06:50:21.900560Z",
"iopub.status.idle": "2026-07-30T06:50:22.591888Z",
"shell.execute_reply": "2026-07-30T06:50:22.591028Z"
"iopub.execute_input": "2026-10-08T12:46:32.571289Z",
"iopub.status.busy": "2026-10-08T12:46:32.570785Z",
"iopub.status.idle": "2026-10-08T12:46:34.156987Z",
"shell.execute_reply": "2026-10-08T12:46:34.156453Z"
},
"papermill": {
"duration": 1.268625,
Expand All @@ -991,35 +1031,35 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Agregation : 8286 recettes, couverture moyenne d'appariement = 73,3%\r\n"
"Agregation : 10850 recettes, couverture moyenne d'appariement = 73,5%\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" couverture 100% : 1133 recettes\r\n"
" couverture 100% : 1481 recettes\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" couverture >=80% (solveur): 3756 recettes\r\n"
" couverture >=80% (solveur): 4984 recettes\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" couverture >=50% : 7528 recettes\r\n"
" couverture >=50% : 9873 recettes\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" couverture <50% : 758 recettes\r\n"
" couverture <50% : 977 recettes\r\n"
]
},
{
Expand Down Expand Up @@ -1124,10 +1164,10 @@
"id": "97771d00",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:22.594053Z",
"iopub.status.busy": "2026-07-30T06:50:22.593648Z",
"iopub.status.idle": "2026-07-30T06:50:22.867314Z",
"shell.execute_reply": "2026-07-30T06:50:22.866684Z"
"iopub.execute_input": "2026-10-08T12:46:34.159722Z",
"iopub.status.busy": "2026-10-08T12:46:34.159362Z",
"iopub.status.idle": "2026-10-08T12:46:34.405819Z",
"shell.execute_reply": "2026-10-08T12:46:34.405013Z"
},
"papermill": {
"duration": 0.326725,
Expand All @@ -1143,7 +1183,7 @@
"name": "stdout",
"output_type": "stream",
"text": [
"Cache ecrit : mealplan_cache.json -- 3717 recettes solveur-usables, 418 Ko.\r\n"
"Cache ecrit : mealplan_cache.json -- 4934 recettes solveur-usables, 555 Ko.\r\n"
]
},
{
Expand All @@ -1157,21 +1197,21 @@
"name": "stdout",
"output_type": "stream",
"text": [
" subset propre 100% : 1107 recettes\r\n"
" subset propre 100% : 1446 recettes\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" subset >=80% (cache) : 3717 recettes <- livre au solveur\r\n"
" subset >=80% (cache) : 4934 recettes <- livre au solveur\r\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
" subset >=50% : 7405 recettes\r\n"
" subset >=50% : 9710 recettes\r\n"
]
},
{
Expand Down Expand Up @@ -1254,10 +1294,10 @@
"id": "1c09dd0f",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:22.869368Z",
"iopub.status.busy": "2026-07-30T06:50:22.869058Z",
"iopub.status.idle": "2026-07-30T06:50:23.012656Z",
"shell.execute_reply": "2026-07-30T06:50:23.012071Z"
"iopub.execute_input": "2026-10-08T12:46:34.407921Z",
"iopub.status.busy": "2026-10-08T12:46:34.407609Z",
"iopub.status.idle": "2026-10-08T12:46:34.507716Z",
"shell.execute_reply": "2026-10-08T12:46:34.507170Z"
},
"papermill": {
"duration": 0.128681,
Expand Down Expand Up @@ -1317,10 +1357,10 @@
"id": "272d05ca",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:23.014825Z",
"iopub.status.busy": "2026-07-30T06:50:23.014367Z",
"iopub.status.idle": "2026-07-30T06:50:23.075961Z",
"shell.execute_reply": "2026-07-30T06:50:23.075512Z"
"iopub.execute_input": "2026-10-08T12:46:34.510821Z",
"iopub.status.busy": "2026-10-08T12:46:34.510274Z",
"iopub.status.idle": "2026-10-08T12:46:34.588873Z",
"shell.execute_reply": "2026-10-08T12:46:34.587830Z"
},
"papermill": {
"duration": 0.082721,
Expand Down Expand Up @@ -1378,10 +1418,10 @@
"id": "7cdbe69d",
"metadata": {
"execution": {
"iopub.execute_input": "2026-07-30T06:50:23.078277Z",
"iopub.status.busy": "2026-07-30T06:50:23.077933Z",
"iopub.status.idle": "2026-07-30T06:50:23.192425Z",
"shell.execute_reply": "2026-07-30T06:50:23.192091Z"
"iopub.execute_input": "2026-10-08T12:46:34.592725Z",
"iopub.status.busy": "2026-10-08T12:46:34.592119Z",
"iopub.status.idle": "2026-10-08T12:46:34.732444Z",
"shell.execute_reply": "2026-10-08T12:46:34.731804Z"
},
"papermill": {
"duration": 0.119336,
Expand Down Expand Up @@ -1456,18 +1496,6 @@
"name": "C#",
"pygments_lexer": "csharp",
"version": "13.0"
},
"papermill": {
"default_parameters": {},
"duration": 13.864058,
"end_time": "2026-07-01T03:28:28.956504",
"environment_variables": {},
"exception": null,
"input_path": "07_Meal_Planner_Data_External.ipynb",
"output_path": "07_Meal_Planner_Data_External.ipynb",
"parameters": {},
"start_time": "2026-07-01T03:28:15.092446",
"version": "2.6.0"
}
},
"nbformat": 4,
Expand Down
Loading
Loading