Spaces:
Runtime error
Runtime error
File size: 23,066 Bytes
1e43666 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 | {
"cells": [
{
"cell_type": "markdown",
"id": "04aecfba-d254-4c28-b472-025932bc8a28",
"metadata": {},
"source": [
"# Evaluation part I\n",
"\n",
"Evaluate LLM responses when there is a single \"right answer\"."
]
},
{
"cell_type": "markdown",
"id": "5f3ebd6b-8982-4b34-8c2f-90139749f122",
"metadata": {},
"source": [
"## Setup\n",
"#### Load the API key and relevant Python libaries.\n",
"In this course, we've provided some code that loads the OpenAI API key for you."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "739371db",
"metadata": {},
"outputs": [],
"source": [
"import os\n",
"import openai\n",
"import sys\n",
"sys.path.append('../..')\n",
"import utils\n",
"from dotenv import load_dotenv, find_dotenv\n",
"_ = load_dotenv(find_dotenv()) # read local .env file\n",
"\n",
"openai.api_key = os.environ['OPENAI_API_KEY']"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7b84b08a",
"metadata": {},
"outputs": [],
"source": [
"def get_completion_from_messages(messages, model=\"gpt-3.5-turbo\", temperature=0, max_tokens=500):\n",
" response = openai.ChatCompletion.create(\n",
" model=model,\n",
" messages=messages,\n",
" temperature=temperature, \n",
" max_tokens=max_tokens, \n",
" )\n",
" return response.choices[0].message[\"content\"]"
]
},
{
"cell_type": "markdown",
"id": "b90ab304-3357-4f00-bac6-061878868de2",
"metadata": {},
"source": [
"#### Get the relevant products and categories\n",
"Here is the list of products and categories that are in the product catalog."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "423f24ff",
"metadata": {},
"outputs": [],
"source": [
"products_and_category = utils.get_products_and_category()\n",
"products_and_category"
]
},
{
"cell_type": "markdown",
"id": "7f1d1cb4-72f0-4a1a-9dd2-c5a7305ce249",
"metadata": {},
"source": [
"### Find relevant product and category names (version 1)\n",
"This could be the version that is running in production."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "7aad328a",
"metadata": {},
"outputs": [],
"source": [
"def find_category_and_product_v1(user_input,products_and_category):\n",
"\n",
" delimiter = \"####\"\n",
" system_message = f\"\"\"\n",
" You will be provided with customer service queries. \\\n",
" The customer service query will be delimited with {delimiter} characters.\n",
" Output a python list of json objects, where each object has the following format:\n",
" 'category': <one of Computers and Laptops, Smartphones and Accessories, Televisions and Home Theater Systems, \\\n",
" Gaming Consoles and Accessories, Audio Equipment, Cameras and Camcorders>,\n",
" AND\n",
" 'products': <a list of products that must be found in the allowed products below>\n",
"\n",
"\n",
" Where the categories and products must be found in the customer service query.\n",
" If a product is mentioned, it must be associated with the correct category in the allowed products list below.\n",
" If no products or categories are found, output an empty list.\n",
" \n",
"\n",
" List out all products that are relevant to the customer service query based on how closely it relates\n",
" to the product name and product category.\n",
" Do not assume, from the name of the product, any features or attributes such as relative quality or price.\n",
"\n",
" The allowed products are provided in JSON format.\n",
" The keys of each item represent the category.\n",
" The values of each item is a list of products that are within that category.\n",
" Allowed products: {products_and_category}\n",
" \n",
"\n",
" \"\"\"\n",
" \n",
" few_shot_user_1 = \"\"\"I want the most expensive computer.\"\"\"\n",
" few_shot_assistant_1 = \"\"\" \n",
" [{'category': 'Computers and Laptops', \\\n",
"'products': ['TechPro Ultrabook', 'BlueWave Gaming Laptop', 'PowerLite Convertible', 'TechPro Desktop', 'BlueWave Chromebook']}]\n",
" \"\"\"\n",
" \n",
" messages = [ \n",
" {'role':'system', 'content': system_message}, \n",
" {'role':'user', 'content': f\"{delimiter}{few_shot_user_1}{delimiter}\"}, \n",
" {'role':'assistant', 'content': few_shot_assistant_1 },\n",
" {'role':'user', 'content': f\"{delimiter}{user_input}{delimiter}\"}, \n",
" ] \n",
" return get_completion_from_messages(messages)\n"
]
},
{
"cell_type": "markdown",
"id": "0f13cb2b-e36e-4166-8332-826288e92c61",
"metadata": {},
"source": [
"### Evaluate on some queries"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "cce5b29f",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_0 = f\"\"\"Which TV can I buy if I'm on a budget?\"\"\"\n",
"\n",
"products_by_category_0 = find_category_and_product_v1(customer_msg_0,\n",
" products_and_category)\n",
"print(products_by_category_0)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "8ad30ad4",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_1 = f\"\"\"I need a charger for my smartphone\"\"\"\n",
"\n",
"products_by_category_1 = find_category_and_product_v1(customer_msg_1,\n",
" products_and_category)\n",
"print(products_by_category_1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eeed8094",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_2 = f\"\"\"\n",
"What computers do you have?\"\"\"\n",
"\n",
"products_by_category_2 = find_category_and_product_v1(customer_msg_2,\n",
" products_and_category)\n",
"products_by_category_2"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "01e48b0f",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_3 = f\"\"\"\n",
"tell me about the smartx pro phone and the fotosnap camera, the dslr one.\n",
"Also, what TVs do you have?\"\"\"\n",
"\n",
"products_by_category_3 = find_category_and_product_v1(customer_msg_3,\n",
" products_and_category)\n",
"print(products_by_category_3)"
]
},
{
"cell_type": "markdown",
"id": "4b09d273-b88a-4d1c-a5b8-f1e5066b4a2f",
"metadata": {},
"source": [
"### Harder test cases\n",
"Identify queries found in production, where the model is not working as expected."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "9b5bb99e",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_4 = f\"\"\"\n",
"tell me about the CineView TV, the 8K one, Gamesphere console, the X one.\n",
"I'm on a budget, what computers do you have?\"\"\"\n",
"\n",
"products_by_category_4 = find_category_and_product_v1(customer_msg_4,\n",
" products_and_category)\n",
"print(products_by_category_4)"
]
},
{
"cell_type": "markdown",
"id": "a7d12681-997d-43a5-8732-8f3aa9fc8cb3",
"metadata": {},
"source": [
"### Modify the prompt to work on the hard test cases"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "609ce420",
"metadata": {},
"outputs": [],
"source": [
"def find_category_and_product_v2(user_input,products_and_category):\n",
" \"\"\"\n",
" Added: Do not output any additional text that is not in JSON format.\n",
" Added a second example (for few-shot prompting) where user asks for \n",
" the cheapest computer. In both few-shot examples, the shown response \n",
" is the full list of products in JSON only.\n",
" \"\"\"\n",
" delimiter = \"####\"\n",
" system_message = f\"\"\"\n",
" You will be provided with customer service queries. \\\n",
" The customer service query will be delimited with {delimiter} characters.\n",
" Output a python list of json objects, where each object has the following format:\n",
" 'category': <one of Computers and Laptops, Smartphones and Accessories, Televisions and Home Theater Systems, \\\n",
" Gaming Consoles and Accessories, Audio Equipment, Cameras and Camcorders>,\n",
" AND\n",
" 'products': <a list of products that must be found in the allowed products below>\n",
" Do not output any additional text that is not in JSON format.\n",
" Do not write any explanatory text after outputting the requested JSON.\n",
"\n",
"\n",
" Where the categories and products must be found in the customer service query.\n",
" If a product is mentioned, it must be associated with the correct category in the allowed products list below.\n",
" If no products or categories are found, output an empty list.\n",
" \n",
"\n",
" List out all products that are relevant to the customer service query based on how closely it relates\n",
" to the product name and product category.\n",
" Do not assume, from the name of the product, any features or attributes such as relative quality or price.\n",
"\n",
" The allowed products are provided in JSON format.\n",
" The keys of each item represent the category.\n",
" The values of each item is a list of products that are within that category.\n",
" Allowed products: {products_and_category}\n",
" \n",
"\n",
" \"\"\"\n",
" \n",
" few_shot_user_1 = \"\"\"I want the most expensive computer. What do you recommend?\"\"\"\n",
" few_shot_assistant_1 = \"\"\" \n",
" [{'category': 'Computers and Laptops', \\\n",
"'products': ['TechPro Ultrabook', 'BlueWave Gaming Laptop', 'PowerLite Convertible', 'TechPro Desktop', 'BlueWave Chromebook']}]\n",
" \"\"\"\n",
" \n",
" few_shot_user_2 = \"\"\"I want the most cheapest computer. What do you recommend?\"\"\"\n",
" few_shot_assistant_2 = \"\"\" \n",
" [{'category': 'Computers and Laptops', \\\n",
"'products': ['TechPro Ultrabook', 'BlueWave Gaming Laptop', 'PowerLite Convertible', 'TechPro Desktop', 'BlueWave Chromebook']}]\n",
" \"\"\"\n",
" \n",
" messages = [ \n",
" {'role':'system', 'content': system_message}, \n",
" {'role':'user', 'content': f\"{delimiter}{few_shot_user_1}{delimiter}\"}, \n",
" {'role':'assistant', 'content': few_shot_assistant_1 },\n",
" {'role':'user', 'content': f\"{delimiter}{few_shot_user_2}{delimiter}\"}, \n",
" {'role':'assistant', 'content': few_shot_assistant_2 },\n",
" {'role':'user', 'content': f\"{delimiter}{user_input}{delimiter}\"}, \n",
" ] \n",
" return get_completion_from_messages(messages)\n"
]
},
{
"cell_type": "markdown",
"id": "32c833b2-0494-4e7b-bfbc-38f67889fb15",
"metadata": {},
"source": [
"### Evaluate the modified prompt on the hard tests cases"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "6ae1f7ef",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_3 = f\"\"\"\n",
"tell me about the smartx pro phone and the fotosnap camera, the dslr one.\n",
"Also, what TVs do you have?\"\"\"\n",
"\n",
"products_by_category_3 = find_category_and_product_v2(customer_msg_3,\n",
" products_and_category)\n",
"print(products_by_category_3)"
]
},
{
"cell_type": "markdown",
"id": "6175e6a4-983c-44f7-8310-95a24bdf0c88",
"metadata": {},
"source": [
"### Regression testing: verify that the model still works on previous test cases\n",
"Check that modifying the model to fix the hard test cases does not negatively affect its performance on previous test cases."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e65041cd",
"metadata": {},
"outputs": [],
"source": [
"customer_msg_0 = f\"\"\"Which TV can I buy if I'm on a budget?\"\"\"\n",
"\n",
"products_by_category_0 = find_category_and_product_v2(customer_msg_0,\n",
" products_and_category)\n",
"print(products_by_category_0)"
]
},
{
"cell_type": "markdown",
"id": "bf40ac24-fd1e-4d5d-b41f-760b3e0d4d68",
"metadata": {},
"source": [
"### Gather development set for automated testing"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "36e257c2",
"metadata": {},
"outputs": [],
"source": [
"msg_ideal_pairs_set = [\n",
" \n",
" # eg 0\n",
" {'customer_msg':\"\"\"Which TV can I buy if I'm on a budget?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Televisions and Home Theater Systems':set(\n",
" ['CineView 4K TV', 'SoundMax Home Theater', 'CineView 8K TV', 'SoundMax Soundbar', 'CineView OLED TV']\n",
" )}\n",
" },\n",
"\n",
" # eg 1\n",
" {'customer_msg':\"\"\"I need a charger for my smartphone\"\"\",\n",
" 'ideal_answer':{\n",
" 'Smartphones and Accessories':set(\n",
" ['MobiTech PowerCase', 'MobiTech Wireless Charger', 'SmartX EarBuds']\n",
" )}\n",
" },\n",
" # eg 2\n",
" {'customer_msg':f\"\"\"What computers do you have?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Computers and Laptops':set(\n",
" ['TechPro Ultrabook', 'BlueWave Gaming Laptop', 'PowerLite Convertible', 'TechPro Desktop', 'BlueWave Chromebook'\n",
" ])\n",
" }\n",
" },\n",
"\n",
" # eg 3\n",
" {'customer_msg':f\"\"\"tell me about the smartx pro phone and \\\n",
" the fotosnap camera, the dslr one.\\\n",
" Also, what TVs do you have?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Smartphones and Accessories':set(\n",
" ['SmartX ProPhone']),\n",
" 'Cameras and Camcorders':set(\n",
" ['FotoSnap DSLR Camera']),\n",
" 'Televisions and Home Theater Systems':set(\n",
" ['CineView 4K TV', 'SoundMax Home Theater','CineView 8K TV', 'SoundMax Soundbar', 'CineView OLED TV'])\n",
" }\n",
" }, \n",
" \n",
" # eg 4\n",
" {'customer_msg':\"\"\"tell me about the CineView TV, the 8K one, Gamesphere console, the X one.\n",
"I'm on a budget, what computers do you have?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Televisions and Home Theater Systems':set(\n",
" ['CineView 8K TV']),\n",
" 'Gaming Consoles and Accessories':set(\n",
" ['GameSphere X']),\n",
" 'Computers and Laptops':set(\n",
" ['TechPro Ultrabook', 'BlueWave Gaming Laptop', 'PowerLite Convertible', 'TechPro Desktop', 'BlueWave Chromebook'])\n",
" }\n",
" },\n",
" \n",
" # eg 5\n",
" {'customer_msg':f\"\"\"What smartphones do you have?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Smartphones and Accessories':set(\n",
" ['SmartX ProPhone', 'MobiTech PowerCase', 'SmartX MiniPhone', 'MobiTech Wireless Charger', 'SmartX EarBuds'\n",
" ])\n",
" }\n",
" },\n",
" # eg 6\n",
" {'customer_msg':f\"\"\"I'm on a budget. Can you recommend some smartphones to me?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Smartphones and Accessories':set(\n",
" ['SmartX EarBuds', 'SmartX MiniPhone', 'MobiTech PowerCase', 'SmartX ProPhone', 'MobiTech Wireless Charger']\n",
" )}\n",
" },\n",
"\n",
" # eg 7 # this will output a subset of the ideal answer\n",
" {'customer_msg':f\"\"\"What Gaming consoles would be good for my friend who is into racing games?\"\"\",\n",
" 'ideal_answer':{\n",
" 'Gaming Consoles and Accessories':set([\n",
" 'GameSphere X',\n",
" 'ProGamer Controller',\n",
" 'GameSphere Y',\n",
" 'ProGamer Racing Wheel',\n",
" 'GameSphere VR Headset'\n",
" ])}\n",
" },\n",
" # eg 8\n",
" {'customer_msg':f\"\"\"What could be a good present for my videographer friend?\"\"\",\n",
" 'ideal_answer': {\n",
" 'Cameras and Camcorders':set([\n",
" 'FotoSnap DSLR Camera', 'ActionCam 4K', 'FotoSnap Mirrorless Camera', 'ZoomMaster Camcorder', 'FotoSnap Instant Camera'\n",
" ])}\n",
" },\n",
" \n",
" # eg 9\n",
" {'customer_msg':f\"\"\"I would like a hot tub time machine.\"\"\",\n",
" 'ideal_answer': []\n",
" }\n",
" \n",
"]\n"
]
},
{
"cell_type": "markdown",
"id": "8aaccb7a-3cee-4189-9660-110427a4bb83",
"metadata": {},
"source": [
"### Evaluate test cases by comparing to the ideal answers"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "66a7df29",
"metadata": {},
"outputs": [],
"source": [
"import json\n",
"def eval_response_with_ideal(response,\n",
" ideal,\n",
" debug=False):\n",
" \n",
" if debug:\n",
" print(\"response\")\n",
" print(response)\n",
" \n",
" # json.loads() expects double quotes, not single quotes\n",
" json_like_str = response.replace(\"'\",'\"')\n",
" \n",
" # parse into a list of dictionaries\n",
" l_of_d = json.loads(json_like_str)\n",
" \n",
" # special case when response is empty list\n",
" if l_of_d == [] and ideal == []:\n",
" return 1\n",
" \n",
" # otherwise, response is empty \n",
" # or ideal should be empty, there's a mismatch\n",
" elif l_of_d == [] or ideal == []:\n",
" return 0\n",
" \n",
" correct = 0 \n",
" \n",
" if debug:\n",
" print(\"l_of_d is\")\n",
" print(l_of_d)\n",
" for d in l_of_d:\n",
"\n",
" cat = d.get('category')\n",
" prod_l = d.get('products')\n",
" if cat and prod_l:\n",
" # convert list to set for comparison\n",
" prod_set = set(prod_l)\n",
" # get ideal set of products\n",
" ideal_cat = ideal.get(cat)\n",
" if ideal_cat:\n",
" prod_set_ideal = set(ideal.get(cat))\n",
" else:\n",
" if debug:\n",
" print(f\"did not find category {cat} in ideal\")\n",
" print(f\"ideal: {ideal}\")\n",
" continue\n",
" \n",
" if debug:\n",
" print(\"prod_set\\n\",prod_set)\n",
" print()\n",
" print(\"prod_set_ideal\\n\",prod_set_ideal)\n",
"\n",
" if prod_set == prod_set_ideal:\n",
" if debug:\n",
" print(\"correct\")\n",
" correct +=1\n",
" else:\n",
" print(\"incorrect\")\n",
" print(f\"prod_set: {prod_set}\")\n",
" print(f\"prod_set_ideal: {prod_set_ideal}\")\n",
" if prod_set <= prod_set_ideal:\n",
" print(\"response is a subset of the ideal answer\")\n",
" elif prod_set >= prod_set_ideal:\n",
" print(\"response is a superset of the ideal answer\")\n",
"\n",
" # count correct over total number of items in list\n",
" pc_correct = correct / len(l_of_d)\n",
" \n",
" return pc_correct"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "e7337ba6",
"metadata": {},
"outputs": [],
"source": [
"print(f'Customer message: {msg_ideal_pairs_set[7][\"customer_msg\"]}')\n",
"print(f'Ideal answer: {msg_ideal_pairs_set[7][\"ideal_answer\"]}')\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f109f542",
"metadata": {},
"outputs": [],
"source": [
"response = find_category_and_product_v2(msg_ideal_pairs_set[7][\"customer_msg\"],\n",
" products_and_category)\n",
"print(f'Resonse: {response}')\n",
"\n",
"eval_response_with_ideal(response,\n",
" msg_ideal_pairs_set[7][\"ideal_answer\"])"
]
},
{
"cell_type": "markdown",
"id": "38ebaf7b-ee94-4b8c-b191-bf23864aed56",
"metadata": {},
"source": [
"### Run evaluation on all test cases and calculate the fraction of cases that are correct"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "bb75bebc",
"metadata": {},
"outputs": [],
"source": [
"# Note, this will not work if any of the api calls time out\n",
"score_accum = 0\n",
"for i, pair in enumerate(msg_ideal_pairs_set):\n",
" print(f\"example {i}\")\n",
" \n",
" customer_msg = pair['customer_msg']\n",
" ideal = pair['ideal_answer']\n",
" \n",
" # print(\"Customer message\",customer_msg)\n",
" # print(\"ideal:\",ideal)\n",
" response = find_category_and_product_v2(customer_msg,\n",
" products_and_category)\n",
"\n",
" \n",
" # print(\"products_by_category\",products_by_category)\n",
" score = eval_response_with_ideal(response,ideal,debug=False)\n",
" print(f\"{i}: {score}\")\n",
" score_accum += score\n",
" \n",
"\n",
"n_examples = len(msg_ideal_pairs_set)\n",
"fraction_correct = score_accum / n_examples\n",
"print(f\"Fraction correct out of {n_examples}: {fraction_correct}\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.9"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|