File size: 50,428 Bytes
2910fdf |
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 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 |
{
"nbformat": 4,
"nbformat_minor": 0,
"metadata": {
"colab": {
"provenance": [],
"gpuType": "T4"
},
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
},
"language_info": {
"name": "python"
},
"accelerator": "GPU"
},
"cells": [
{
"cell_type": "markdown",
"source": [
"# osiria/bert-italian-cased-question-answering\n",
"## test set metrics"
],
"metadata": {
"id": "oub2ir8ZDkrH"
}
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "02K9xO6Gvto1",
"outputId": "d913515b-49cc-437e-a9d9-a4ccc4fed2d4"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Collecting git+https://github.com/huggingface/transformers\n",
" Cloning https://github.com/huggingface/transformers to /tmp/pip-req-build-0dr9nm3r\n",
" Running command git clone --filter=blob:none --quiet https://github.com/huggingface/transformers /tmp/pip-req-build-0dr9nm3r\n",
" Resolved https://github.com/huggingface/transformers to commit 8f093fb799246f7dd9104ff44728da0c53a9f67a\n",
" Installing build dependencies ... \u001b[?25l\u001b[?25hdone\n",
" Getting requirements to build wheel ... \u001b[?25l\u001b[?25hdone\n",
" Preparing metadata (pyproject.toml) ... \u001b[?25l\u001b[?25hdone\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (3.12.0)\n",
"Requirement already satisfied: huggingface-hub<1.0,>=0.14.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (0.15.1)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (1.22.4)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (23.1)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (6.0)\n",
"Requirement already satisfied: regex!=2019.12.17 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (2022.10.31)\n",
"Requirement already satisfied: requests in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (2.27.1)\n",
"Requirement already satisfied: tokenizers!=0.11.3,<0.14,>=0.11.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (0.13.3)\n",
"Requirement already satisfied: safetensors>=0.3.1 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (0.3.1)\n",
"Requirement already satisfied: tqdm>=4.27 in /usr/local/lib/python3.10/dist-packages (from transformers==4.31.0.dev0) (4.65.0)\n",
"Requirement already satisfied: fsspec in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers==4.31.0.dev0) (2023.4.0)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0,>=0.14.1->transformers==4.31.0.dev0) (4.5.0)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.31.0.dev0) (1.26.15)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.31.0.dev0) (2022.12.7)\n",
"Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.31.0.dev0) (2.0.12)\n",
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests->transformers==4.31.0.dev0) (3.4)\n"
]
}
],
"source": [
"!pip install git+https://github.com/huggingface/transformers"
]
},
{
"cell_type": "code",
"source": [
"!pip install datasets"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "VKgybrUswa1q",
"outputId": "eaf295cd-277a-4112-e4d2-2083661fbeff"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Requirement already satisfied: datasets in /usr/local/lib/python3.10/dist-packages (2.12.0)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from datasets) (1.22.4)\n",
"Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (9.0.0)\n",
"Requirement already satisfied: dill<0.3.7,>=0.3.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.3.6)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from datasets) (1.5.3)\n",
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (2.27.1)\n",
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (4.65.0)\n",
"Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from datasets) (3.2.0)\n",
"Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from datasets) (0.70.14)\n",
"Requirement already satisfied: fsspec[http]>=2021.11.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (2023.4.0)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets) (3.8.4)\n",
"Requirement already satisfied: huggingface-hub<1.0.0,>=0.11.0 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.15.1)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from datasets) (23.1)\n",
"Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.10/dist-packages (from datasets) (0.18.0)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets) (6.0)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (23.1.0)\n",
"Requirement already satisfied: charset-normalizer<4.0,>=2.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (2.0.12)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (6.0.4)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (4.0.2)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.9.2)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets) (1.3.1)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets) (3.12.0)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub<1.0.0,>=0.11.0->datasets) (4.5.0)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (1.26.15)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (2022.12.7)\n",
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->datasets) (3.4)\n",
"Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->datasets) (2022.7.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->datasets) (1.16.0)\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install accelerate"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "xYEW0Hjqz2lo",
"outputId": "e1485ec9-7436-479b-c6ea-c332f5e8742f"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Requirement already satisfied: accelerate in /usr/local/lib/python3.10/dist-packages (0.20.3)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from accelerate) (1.22.4)\n",
"Requirement already satisfied: packaging>=20.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (23.1)\n",
"Requirement already satisfied: psutil in /usr/local/lib/python3.10/dist-packages (from accelerate) (5.9.5)\n",
"Requirement already satisfied: pyyaml in /usr/local/lib/python3.10/dist-packages (from accelerate) (6.0)\n",
"Requirement already satisfied: torch>=1.6.0 in /usr/local/lib/python3.10/dist-packages (from accelerate) (2.0.1+cu118)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.12.0)\n",
"Requirement already satisfied: typing-extensions in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (4.5.0)\n",
"Requirement already satisfied: sympy in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (1.11.1)\n",
"Requirement already satisfied: networkx in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1)\n",
"Requirement already satisfied: jinja2 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (3.1.2)\n",
"Requirement already satisfied: triton==2.0.0 in /usr/local/lib/python3.10/dist-packages (from torch>=1.6.0->accelerate) (2.0.0)\n",
"Requirement already satisfied: cmake in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (3.25.2)\n",
"Requirement already satisfied: lit in /usr/local/lib/python3.10/dist-packages (from triton==2.0.0->torch>=1.6.0->accelerate) (16.0.5)\n",
"Requirement already satisfied: MarkupSafe>=2.0 in /usr/local/lib/python3.10/dist-packages (from jinja2->torch>=1.6.0->accelerate) (2.1.2)\n",
"Requirement already satisfied: mpmath>=0.19 in /usr/local/lib/python3.10/dist-packages (from sympy->torch>=1.6.0->accelerate) (1.3.0)\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!pip install evaluate"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "9OFz3JdR0cQ_",
"outputId": "d19842dd-32c0-4c32-a222-44eaad205ba1"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/\n",
"Requirement already satisfied: evaluate in /usr/local/lib/python3.10/dist-packages (0.4.0)\n",
"Requirement already satisfied: datasets>=2.0.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2.12.0)\n",
"Requirement already satisfied: numpy>=1.17 in /usr/local/lib/python3.10/dist-packages (from evaluate) (1.22.4)\n",
"Requirement already satisfied: dill in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.3.6)\n",
"Requirement already satisfied: pandas in /usr/local/lib/python3.10/dist-packages (from evaluate) (1.5.3)\n",
"Requirement already satisfied: requests>=2.19.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2.27.1)\n",
"Requirement already satisfied: tqdm>=4.62.1 in /usr/local/lib/python3.10/dist-packages (from evaluate) (4.65.0)\n",
"Requirement already satisfied: xxhash in /usr/local/lib/python3.10/dist-packages (from evaluate) (3.2.0)\n",
"Requirement already satisfied: multiprocess in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.70.14)\n",
"Requirement already satisfied: fsspec[http]>=2021.05.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (2023.4.0)\n",
"Requirement already satisfied: huggingface-hub>=0.7.0 in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.15.1)\n",
"Requirement already satisfied: packaging in /usr/local/lib/python3.10/dist-packages (from evaluate) (23.1)\n",
"Requirement already satisfied: responses<0.19 in /usr/local/lib/python3.10/dist-packages (from evaluate) (0.18.0)\n",
"Requirement already satisfied: pyarrow>=8.0.0 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (9.0.0)\n",
"Requirement already satisfied: aiohttp in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (3.8.4)\n",
"Requirement already satisfied: pyyaml>=5.1 in /usr/local/lib/python3.10/dist-packages (from datasets>=2.0.0->evaluate) (6.0)\n",
"Requirement already satisfied: filelock in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.7.0->evaluate) (3.12.0)\n",
"Requirement already satisfied: typing-extensions>=3.7.4.3 in /usr/local/lib/python3.10/dist-packages (from huggingface-hub>=0.7.0->evaluate) (4.5.0)\n",
"Requirement already satisfied: urllib3<1.27,>=1.21.1 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (1.26.15)\n",
"Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (2022.12.7)\n",
"Requirement already satisfied: charset-normalizer~=2.0.0 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (2.0.12)\n",
"Requirement already satisfied: idna<4,>=2.5 in /usr/local/lib/python3.10/dist-packages (from requests>=2.19.0->evaluate) (3.4)\n",
"Requirement already satisfied: python-dateutil>=2.8.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate) (2.8.2)\n",
"Requirement already satisfied: pytz>=2020.1 in /usr/local/lib/python3.10/dist-packages (from pandas->evaluate) (2022.7.1)\n",
"Requirement already satisfied: attrs>=17.3.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (23.1.0)\n",
"Requirement already satisfied: multidict<7.0,>=4.5 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (6.0.4)\n",
"Requirement already satisfied: async-timeout<5.0,>=4.0.0a3 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (4.0.2)\n",
"Requirement already satisfied: yarl<2.0,>=1.0 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.9.2)\n",
"Requirement already satisfied: frozenlist>=1.1.1 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.3.3)\n",
"Requirement already satisfied: aiosignal>=1.1.2 in /usr/local/lib/python3.10/dist-packages (from aiohttp->datasets>=2.0.0->evaluate) (1.3.1)\n",
"Requirement already satisfied: six>=1.5 in /usr/local/lib/python3.10/dist-packages (from python-dateutil>=2.8.1->pandas->evaluate) (1.16.0)\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/run_qa.py\n",
"!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/trainer_qa.py\n",
"!wget https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/utils_qa.py"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "JJhpBNwpxOTK",
"outputId": "cfa59bca-e9fd-4ea8-a008-8bf30cef3a9d"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"--2023-06-11 20:53:20-- https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/run_qa.py\n",
"Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.111.133, 185.199.108.133, 185.199.110.133, ...\n",
"Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.111.133|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 31717 (31K) [text/plain]\n",
"Saving to: ‘run_qa.py.2’\n",
"\n",
"\rrun_qa.py.2 0%[ ] 0 --.-KB/s \rrun_qa.py.2 100%[===================>] 30.97K --.-KB/s in 0.002s \n",
"\n",
"2023-06-11 20:53:20 (13.6 MB/s) - ‘run_qa.py.2’ saved [31717/31717]\n",
"\n",
"--2023-06-11 20:53:20-- https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/trainer_qa.py\n",
"Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n",
"Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 6253 (6.1K) [text/plain]\n",
"Saving to: ‘trainer_qa.py.2’\n",
"\n",
"trainer_qa.py.2 100%[===================>] 6.11K --.-KB/s in 0s \n",
"\n",
"2023-06-11 20:53:20 (86.0 MB/s) - ‘trainer_qa.py.2’ saved [6253/6253]\n",
"\n",
"--2023-06-11 20:53:20-- https://raw.githubusercontent.com/huggingface/transformers/main/examples/pytorch/question-answering/utils_qa.py\n",
"Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.109.133, 185.199.110.133, ...\n",
"Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 22777 (22K) [text/plain]\n",
"Saving to: ‘utils_qa.py.2’\n",
"\n",
"utils_qa.py.2 100%[===================>] 22.24K --.-KB/s in 0.002s \n",
"\n",
"2023-06-11 20:53:20 (14.0 MB/s) - ‘utils_qa.py.2’ saved [22777/22777]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!ls"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "Loa6y9XqzXJ4",
"outputId": "b39fa79a-5cd7-4fa2-9426-522048f4b76f"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"eval_results run_qa.py.1 trainer_qa.py utils_qa.py\n",
"__pycache__ run_qa.py.2 trainer_qa.py.1 utils_qa.py.1\n",
"run_qa.py sample_data trainer_qa.py.2 utils_qa.py.2\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!mkdir eval_results"
],
"metadata": {
"id": "QDNxV31P0reW",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "f2054dd3-7097-46c9-f192-ea87d32285f7"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"mkdir: cannot create directory ‘eval_results’: File exists\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"!python -m run_qa --model_name_or_path osiria/bert-italian-cased-question-answering --dataset_name squad_it --do_predict --per_device_eval_batch_size=5 --output_dir eval_results"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "B5O5Lom8x_c4",
"outputId": "e565d920-7313-43dd-f5bb-3d3d454fb377"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"2023-06-11 20:53:25.728657: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT\n",
"06/11/2023 20:53:27 - WARNING - __main__ - Process rank: 0, device: cuda:0, n_gpu: 1distributed training: True, 16-bits training: False\n",
"06/11/2023 20:53:27 - INFO - __main__ - Training/evaluation parameters TrainingArguments(\n",
"_n_gpu=1,\n",
"adafactor=False,\n",
"adam_beta1=0.9,\n",
"adam_beta2=0.999,\n",
"adam_epsilon=1e-08,\n",
"auto_find_batch_size=False,\n",
"bf16=False,\n",
"bf16_full_eval=False,\n",
"data_seed=None,\n",
"dataloader_drop_last=False,\n",
"dataloader_num_workers=0,\n",
"dataloader_pin_memory=True,\n",
"ddp_backend=None,\n",
"ddp_bucket_cap_mb=None,\n",
"ddp_find_unused_parameters=None,\n",
"ddp_timeout=1800,\n",
"debug=[],\n",
"deepspeed=None,\n",
"disable_tqdm=False,\n",
"do_eval=False,\n",
"do_predict=True,\n",
"do_train=False,\n",
"eval_accumulation_steps=None,\n",
"eval_delay=0,\n",
"eval_steps=None,\n",
"evaluation_strategy=no,\n",
"fp16=False,\n",
"fp16_backend=auto,\n",
"fp16_full_eval=False,\n",
"fp16_opt_level=O1,\n",
"fsdp=[],\n",
"fsdp_config={'fsdp_min_num_params': 0, 'xla': False, 'xla_fsdp_grad_ckpt': False},\n",
"fsdp_min_num_params=0,\n",
"fsdp_transformer_layer_cls_to_wrap=None,\n",
"full_determinism=False,\n",
"gradient_accumulation_steps=1,\n",
"gradient_checkpointing=False,\n",
"greater_is_better=None,\n",
"group_by_length=False,\n",
"half_precision_backend=auto,\n",
"hub_model_id=None,\n",
"hub_private_repo=False,\n",
"hub_strategy=every_save,\n",
"hub_token=<HUB_TOKEN>,\n",
"ignore_data_skip=False,\n",
"include_inputs_for_metrics=False,\n",
"jit_mode_eval=False,\n",
"label_names=None,\n",
"label_smoothing_factor=0.0,\n",
"learning_rate=5e-05,\n",
"length_column_name=length,\n",
"load_best_model_at_end=False,\n",
"local_rank=0,\n",
"log_level=passive,\n",
"log_level_replica=warning,\n",
"log_on_each_node=True,\n",
"logging_dir=eval_results/runs/Jun11_20-53-27_6b4f0ceaae37,\n",
"logging_first_step=False,\n",
"logging_nan_inf_filter=True,\n",
"logging_steps=500,\n",
"logging_strategy=steps,\n",
"lr_scheduler_type=linear,\n",
"max_grad_norm=1.0,\n",
"max_steps=-1,\n",
"metric_for_best_model=None,\n",
"mp_parameters=,\n",
"no_cuda=False,\n",
"num_train_epochs=3.0,\n",
"optim=adamw_hf,\n",
"optim_args=None,\n",
"output_dir=eval_results,\n",
"overwrite_output_dir=False,\n",
"past_index=-1,\n",
"per_device_eval_batch_size=5,\n",
"per_device_train_batch_size=8,\n",
"prediction_loss_only=False,\n",
"push_to_hub=False,\n",
"push_to_hub_model_id=None,\n",
"push_to_hub_organization=None,\n",
"push_to_hub_token=<PUSH_TO_HUB_TOKEN>,\n",
"ray_scope=last,\n",
"remove_unused_columns=True,\n",
"report_to=['tensorboard'],\n",
"resume_from_checkpoint=None,\n",
"run_name=eval_results,\n",
"save_on_each_node=False,\n",
"save_safetensors=False,\n",
"save_steps=500,\n",
"save_strategy=steps,\n",
"save_total_limit=None,\n",
"seed=42,\n",
"sharded_ddp=[],\n",
"skip_memory_metrics=True,\n",
"tf32=None,\n",
"torch_compile=False,\n",
"torch_compile_backend=None,\n",
"torch_compile_mode=None,\n",
"torchdynamo=None,\n",
"tpu_metrics_debug=False,\n",
"tpu_num_cores=None,\n",
"use_ipex=False,\n",
"use_legacy_prediction_loop=False,\n",
"use_mps_device=False,\n",
"warmup_ratio=0.0,\n",
"warmup_steps=0,\n",
"weight_decay=0.0,\n",
"xpu_backend=None,\n",
")\n",
"06/11/2023 20:53:28 - INFO - datasets.info - Loading Dataset Infos from /root/.cache/huggingface/modules/datasets_modules/datasets/squad_it/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
"06/11/2023 20:53:28 - INFO - datasets.builder - Overwrite dataset info from restored data version if exists.\n",
"06/11/2023 20:53:28 - INFO - datasets.info - Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
"06/11/2023 20:53:28 - WARNING - datasets.builder - Found cached dataset squad_it (/root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71)\n",
"06/11/2023 20:53:28 - INFO - datasets.info - Loading Dataset info from /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71\n",
"100% 2/2 [00:00<00:00, 540.12it/s]\n",
"[INFO|configuration_utils.py:669] 2023-06-11 20:53:28,527 >> loading configuration file config.json from cache at /root/.cache/huggingface/hub/models--osiria--bert-italian-cased-question-answering/snapshots/d289e6216d2c615b2e1eb5dd25cb7239c51b5088/config.json\n",
"[INFO|configuration_utils.py:725] 2023-06-11 20:53:28,530 >> Model config BertConfig {\n",
" \"_name_or_path\": \"osiria/bert-italian-cased-question-answering\",\n",
" \"architectures\": [\n",
" \"BertForQuestionAnswering\"\n",
" ],\n",
" \"attention_probs_dropout_prob\": 0.1,\n",
" \"classifier_dropout\": null,\n",
" \"directionality\": \"bidi\",\n",
" \"hidden_act\": \"gelu\",\n",
" \"hidden_dropout_prob\": 0.1,\n",
" \"hidden_size\": 768,\n",
" \"initializer_range\": 0.02,\n",
" \"intermediate_size\": 3072,\n",
" \"layer_norm_eps\": 1e-12,\n",
" \"max_position_embeddings\": 512,\n",
" \"model_type\": \"bert\",\n",
" \"num_attention_heads\": 12,\n",
" \"num_hidden_layers\": 12,\n",
" \"pad_token_id\": 0,\n",
" \"pooler_fc_size\": 768,\n",
" \"pooler_num_attention_heads\": 12,\n",
" \"pooler_num_fc_layers\": 3,\n",
" \"pooler_size_per_head\": 128,\n",
" \"pooler_type\": \"first_token_transform\",\n",
" \"position_embedding_type\": \"absolute\",\n",
" \"torch_dtype\": \"float32\",\n",
" \"transformers_version\": \"4.31.0.dev0\",\n",
" \"type_vocab_size\": 2,\n",
" \"use_cache\": true,\n",
" \"vocab_size\": 30785\n",
"}\n",
"\n",
"[INFO|tokenization_utils_base.py:1823] 2023-06-11 20:53:29,081 >> loading file vocab.txt from cache at /root/.cache/huggingface/hub/models--osiria--bert-italian-cased-question-answering/snapshots/d289e6216d2c615b2e1eb5dd25cb7239c51b5088/vocab.txt\n",
"[INFO|tokenization_utils_base.py:1823] 2023-06-11 20:53:29,082 >> loading file tokenizer.json from cache at None\n",
"[INFO|tokenization_utils_base.py:1823] 2023-06-11 20:53:29,082 >> loading file added_tokens.json from cache at None\n",
"[INFO|tokenization_utils_base.py:1823] 2023-06-11 20:53:29,082 >> loading file special_tokens_map.json from cache at /root/.cache/huggingface/hub/models--osiria--bert-italian-cased-question-answering/snapshots/d289e6216d2c615b2e1eb5dd25cb7239c51b5088/special_tokens_map.json\n",
"[INFO|tokenization_utils_base.py:1823] 2023-06-11 20:53:29,082 >> loading file tokenizer_config.json from cache at /root/.cache/huggingface/hub/models--osiria--bert-italian-cased-question-answering/snapshots/d289e6216d2c615b2e1eb5dd25cb7239c51b5088/tokenizer_config.json\n",
"[INFO|modeling_utils.py:2578] 2023-06-11 20:53:29,866 >> loading weights file pytorch_model.bin from cache at /root/.cache/huggingface/hub/models--osiria--bert-italian-cased-question-answering/snapshots/d289e6216d2c615b2e1eb5dd25cb7239c51b5088/pytorch_model.bin\n",
"[INFO|modeling_utils.py:3295] 2023-06-11 20:53:31,723 >> All model checkpoint weights were used when initializing BertForQuestionAnswering.\n",
"\n",
"[INFO|modeling_utils.py:3303] 2023-06-11 20:53:31,723 >> All the weights of BertForQuestionAnswering were initialized from the model checkpoint at osiria/bert-italian-cased-question-answering.\n",
"If your task is similar to the task the model of the checkpoint was trained on, you can already use BertForQuestionAnswering for predictions without further training.\n",
"Running tokenizer on prediction dataset: 0% 0/7609 [00:00<?, ? examples/s]06/11/2023 20:53:32 - INFO - datasets.arrow_dataset - Caching processed dataset at /root/.cache/huggingface/datasets/squad_it/default/0.1.0/d442bdb4794b4bae227ab19105b76d706ed7cf2ac342e4c9da4a5c36bde19d71/cache-f05ac3c41e20dd08.arrow\n",
"06/11/2023 20:53:41 - INFO - __main__ - *** Predict ***\n",
"[INFO|trainer.py:776] 2023-06-11 20:53:41,522 >> The following columns in the test set don't have a corresponding argument in `BertForQuestionAnswering.forward` and have been ignored: offset_mapping, example_id. If offset_mapping, example_id are not expected by `BertForQuestionAnswering.forward`, you can safely ignore this message.\n",
"[INFO|trainer.py:3200] 2023-06-11 20:53:41,526 >> ***** Running Prediction *****\n",
"[INFO|trainer.py:3202] 2023-06-11 20:53:41,526 >> Num examples = 7992\n",
"[INFO|trainer.py:3205] 2023-06-11 20:53:41,526 >> Batch size = 5\n",
"100% 1598/1599 [03:13<00:00, 7.89it/s]06/11/2023 20:57:07 - INFO - utils_qa - Post-processing 7609 example predictions split into 7992 features.\n",
"\n",
" 0% 0/7609 [00:00<?, ?it/s]\u001b[A\n",
" 0% 20/7609 [00:00<00:38, 195.14it/s]\u001b[A\n",
" 1% 41/7609 [00:00<00:37, 203.05it/s]\u001b[A\n",
" 1% 72/7609 [00:00<00:30, 249.92it/s]\u001b[A\n",
" 1% 102/7609 [00:00<00:27, 268.69it/s]\u001b[A\n",
" 2% 133/7609 [00:00<00:26, 281.18it/s]\u001b[A\n",
" 2% 164/7609 [00:00<00:25, 289.10it/s]\u001b[A\n",
" 3% 196/7609 [00:00<00:24, 298.41it/s]\u001b[A\n",
" 3% 232/7609 [00:00<00:23, 315.67it/s]\u001b[A\n",
" 3% 264/7609 [00:00<00:23, 313.05it/s]\u001b[A\n",
" 4% 297/7609 [00:01<00:23, 316.84it/s]\u001b[A\n",
" 4% 330/7609 [00:01<00:22, 317.64it/s]\u001b[A\n",
" 5% 362/7609 [00:01<00:24, 301.76it/s]\u001b[A\n",
" 5% 397/7609 [00:01<00:23, 312.78it/s]\u001b[A\n",
" 6% 429/7609 [00:01<00:23, 311.35it/s]\u001b[A\n",
" 6% 461/7609 [00:01<00:22, 312.95it/s]\u001b[A\n",
" 7% 495/7609 [00:01<00:22, 318.76it/s]\u001b[A\n",
" 7% 527/7609 [00:01<00:23, 306.27it/s]\u001b[A\n",
" 7% 558/7609 [00:01<00:23, 303.87it/s]\u001b[A\n",
" 8% 590/7609 [00:01<00:22, 306.50it/s]\u001b[A\n",
" 8% 621/7609 [00:02<00:22, 305.90it/s]\u001b[A\n",
" 9% 655/7609 [00:02<00:22, 315.47it/s]\u001b[A\n",
" 9% 689/7609 [00:02<00:21, 321.92it/s]\u001b[A\n",
" 9% 722/7609 [00:02<00:21, 321.69it/s]\u001b[A\n",
" 10% 755/7609 [00:02<00:21, 312.94it/s]\u001b[A\n",
" 10% 787/7609 [00:02<00:21, 310.60it/s]\u001b[A\n",
" 11% 819/7609 [00:02<00:22, 295.48it/s]\u001b[A\n",
" 11% 853/7609 [00:02<00:21, 307.31it/s]\u001b[A\n",
" 12% 886/7609 [00:02<00:21, 312.94it/s]\u001b[A\n",
" 12% 918/7609 [00:03<00:21, 307.77it/s]\u001b[A\n",
" 12% 949/7609 [00:03<00:21, 307.49it/s]\u001b[A\n",
" 13% 982/7609 [00:03<00:21, 314.01it/s]\u001b[A\n",
" 13% 1014/7609 [00:03<00:20, 314.12it/s]\u001b[A\n",
" 14% 1050/7609 [00:03<00:20, 326.69it/s]\u001b[A\n",
" 14% 1086/7609 [00:03<00:19, 332.63it/s]\u001b[A\n",
" 15% 1120/7609 [00:03<00:20, 314.31it/s]\u001b[A\n",
" 15% 1152/7609 [00:03<00:20, 309.50it/s]\u001b[A\n",
" 16% 1184/7609 [00:03<00:21, 294.61it/s]\u001b[A\n",
" 16% 1218/7609 [00:03<00:20, 305.58it/s]\u001b[A\n",
" 16% 1252/7609 [00:04<00:20, 312.62it/s]\u001b[A\n",
" 17% 1284/7609 [00:04<00:20, 312.65it/s]\u001b[A\n",
" 17% 1317/7609 [00:04<00:19, 316.39it/s]\u001b[A\n",
" 18% 1352/7609 [00:04<00:19, 324.19it/s]\u001b[A\n",
" 18% 1385/7609 [00:04<00:19, 323.06it/s]\u001b[A\n",
" 19% 1418/7609 [00:04<00:19, 310.79it/s]\u001b[A\n",
" 19% 1450/7609 [00:04<00:19, 312.09it/s]\u001b[A\n",
" 19% 1482/7609 [00:04<00:20, 301.57it/s]\u001b[A\n",
" 20% 1513/7609 [00:04<00:20, 296.75it/s]\u001b[A\n",
" 20% 1545/7609 [00:05<00:20, 302.42it/s]\u001b[A\n",
" 21% 1581/7609 [00:05<00:19, 316.37it/s]\u001b[A\n",
" 21% 1613/7609 [00:05<00:19, 303.34it/s]\u001b[A\n",
" 22% 1646/7609 [00:05<00:19, 310.08it/s]\u001b[A\n",
" 22% 1681/7609 [00:05<00:18, 318.67it/s]\u001b[A\n",
" 23% 1715/7609 [00:05<00:18, 323.25it/s]\u001b[A\n",
" 23% 1748/7609 [00:05<00:18, 323.99it/s]\u001b[A\n",
" 23% 1781/7609 [00:05<00:18, 315.58it/s]\u001b[A\n",
" 24% 1815/7609 [00:05<00:18, 320.26it/s]\u001b[A\n",
" 24% 1849/7609 [00:05<00:17, 324.51it/s]\u001b[A\n",
" 25% 1882/7609 [00:06<00:17, 325.18it/s]\u001b[A\n",
" 25% 1915/7609 [00:06<00:17, 321.37it/s]\u001b[A\n",
" 26% 1949/7609 [00:06<00:17, 326.45it/s]\u001b[A\n",
" 26% 1982/7609 [00:06<00:20, 280.92it/s]\u001b[A\n",
" 26% 2012/7609 [00:06<00:23, 241.28it/s]\u001b[A\n",
" 27% 2038/7609 [00:06<00:25, 218.91it/s]\u001b[A\n",
" 27% 2064/7609 [00:06<00:24, 227.96it/s]\u001b[A\n",
" 27% 2088/7609 [00:07<00:32, 171.75it/s]\u001b[A\n",
" 28% 2108/7609 [00:07<00:33, 164.67it/s]\u001b[A\n",
" 28% 2142/7609 [00:07<00:27, 201.85it/s]\u001b[A\n",
" 29% 2179/7609 [00:07<00:22, 240.40it/s]\u001b[A\n",
" 29% 2213/7609 [00:07<00:20, 265.02it/s]\u001b[A\n",
" 29% 2242/7609 [00:07<00:20, 262.30it/s]\u001b[A\n",
" 30% 2270/7609 [00:07<00:20, 264.20it/s]\u001b[A\n",
" 30% 2304/7609 [00:07<00:18, 284.39it/s]\u001b[A\n",
" 31% 2337/7609 [00:07<00:17, 296.90it/s]\u001b[A\n",
" 31% 2373/7609 [00:08<00:16, 314.24it/s]\u001b[A\n",
" 32% 2407/7609 [00:08<00:16, 320.90it/s]\u001b[A\n",
" 32% 2441/7609 [00:08<00:15, 324.50it/s]\u001b[A\n",
" 33% 2474/7609 [00:08<00:16, 305.55it/s]\u001b[A\n",
" 33% 2509/7609 [00:08<00:16, 317.58it/s]\u001b[A\n",
" 33% 2543/7609 [00:08<00:15, 322.81it/s]\u001b[A\n",
" 34% 2576/7609 [00:08<00:15, 321.99it/s]\u001b[A\n",
" 34% 2609/7609 [00:08<00:16, 304.24it/s]\u001b[A\n",
" 35% 2642/7609 [00:08<00:15, 311.37it/s]\u001b[A\n",
" 35% 2676/7609 [00:09<00:15, 318.53it/s]\u001b[A\n",
" 36% 2710/7609 [00:09<00:15, 323.02it/s]\u001b[A\n",
" 36% 2743/7609 [00:09<00:15, 321.88it/s]\u001b[A\n",
" 37% 2778/7609 [00:09<00:14, 328.50it/s]\u001b[A\n",
" 37% 2811/7609 [00:09<00:14, 327.81it/s]\u001b[A\n",
" 37% 2845/7609 [00:09<00:14, 330.00it/s]\u001b[A\n",
" 38% 2881/7609 [00:09<00:14, 337.70it/s]\u001b[A\n",
" 38% 2915/7609 [00:09<00:14, 327.57it/s]\u001b[A\n",
" 39% 2951/7609 [00:09<00:13, 334.48it/s]\u001b[A\n",
" 39% 2986/7609 [00:09<00:13, 336.64it/s]\u001b[A\n",
" 40% 3020/7609 [00:10<00:13, 335.05it/s]\u001b[A\n",
" 40% 3055/7609 [00:10<00:13, 338.07it/s]\u001b[A\n",
" 41% 3089/7609 [00:10<00:15, 299.60it/s]\u001b[A\n",
" 41% 3120/7609 [00:10<00:18, 238.88it/s]\u001b[A\n",
" 41% 3147/7609 [00:10<00:20, 222.56it/s]\u001b[A\n",
" 42% 3171/7609 [00:10<00:21, 207.53it/s]\u001b[A\n",
" 42% 3193/7609 [00:10<00:25, 173.59it/s]\u001b[A\n",
" 42% 3212/7609 [00:11<00:26, 163.35it/s]\u001b[A\n",
" 42% 3230/7609 [00:11<00:26, 165.02it/s]\u001b[A\n",
" 43% 3250/7609 [00:11<00:25, 171.98it/s]\u001b[A\n",
" 43% 3268/7609 [00:11<00:25, 167.09it/s]\u001b[A\n",
" 43% 3288/7609 [00:11<00:24, 174.21it/s]\u001b[A\n",
" 43% 3307/7609 [00:11<00:24, 177.85it/s]\u001b[A\n",
" 44% 3326/7609 [00:11<00:25, 167.85it/s]\u001b[A\n",
" 44% 3345/7609 [00:11<00:24, 172.38it/s]\u001b[A\n",
" 44% 3364/7609 [00:11<00:24, 176.78it/s]\u001b[A\n",
" 44% 3382/7609 [00:12<00:24, 173.27it/s]\u001b[A\n",
" 45% 3401/7609 [00:12<00:23, 177.82it/s]\u001b[A\n",
" 45% 3421/7609 [00:12<00:22, 183.82it/s]\u001b[A\n",
" 45% 3441/7609 [00:12<00:22, 186.31it/s]\u001b[A\n",
" 45% 3460/7609 [00:12<00:22, 186.86it/s]\u001b[A\n",
" 46% 3480/7609 [00:12<00:21, 189.06it/s]\u001b[A\n",
" 46% 3500/7609 [00:12<00:21, 192.11it/s]\u001b[A\n",
" 46% 3520/7609 [00:12<00:21, 190.39it/s]\u001b[A\n",
" 47% 3540/7609 [00:12<00:21, 192.97it/s]\u001b[A\n",
" 47% 3560/7609 [00:13<00:21, 191.51it/s]\u001b[A\n",
" 47% 3580/7609 [00:13<00:20, 193.29it/s]\u001b[A\n",
" 47% 3600/7609 [00:13<00:20, 193.66it/s]\u001b[A\n",
" 48% 3620/7609 [00:13<00:20, 192.90it/s]\u001b[A\n",
" 48% 3640/7609 [00:13<00:21, 187.99it/s]\u001b[A\n",
" 48% 3661/7609 [00:13<00:20, 193.31it/s]\u001b[A\n",
" 48% 3681/7609 [00:13<00:20, 188.25it/s]\u001b[A\n",
" 49% 3702/7609 [00:13<00:20, 191.63it/s]\u001b[A\n",
" 49% 3722/7609 [00:13<00:20, 190.32it/s]\u001b[A\n",
" 49% 3742/7609 [00:13<00:20, 189.32it/s]\u001b[A\n",
" 49% 3762/7609 [00:14<00:20, 191.77it/s]\u001b[A\n",
" 50% 3782/7609 [00:14<00:19, 192.69it/s]\u001b[A\n",
" 50% 3802/7609 [00:14<00:19, 193.14it/s]\u001b[A\n",
" 50% 3831/7609 [00:14<00:17, 220.54it/s]\u001b[A\n",
" 51% 3867/7609 [00:14<00:14, 260.43it/s]\u001b[A\n",
" 51% 3898/7609 [00:14<00:13, 275.01it/s]\u001b[A\n",
" 52% 3933/7609 [00:14<00:12, 296.05it/s]\u001b[A\n",
" 52% 3967/7609 [00:14<00:11, 308.86it/s]\u001b[A\n",
" 53% 3998/7609 [00:14<00:11, 306.03it/s]\u001b[A\n",
" 53% 4033/7609 [00:14<00:11, 316.89it/s]\u001b[A\n",
" 53% 4065/7609 [00:15<00:11, 315.00it/s]\u001b[A\n",
" 54% 4097/7609 [00:15<00:11, 308.17it/s]\u001b[A\n",
" 54% 4131/7609 [00:15<00:10, 316.47it/s]\u001b[A\n",
" 55% 4166/7609 [00:15<00:10, 324.79it/s]\u001b[A\n",
" 55% 4201/7609 [00:15<00:10, 330.88it/s]\u001b[A\n",
" 56% 4235/7609 [00:15<00:10, 332.20it/s]\u001b[A\n",
" 56% 4270/7609 [00:15<00:09, 336.21it/s]\u001b[A\n",
" 57% 4307/7609 [00:15<00:09, 343.82it/s]\u001b[A\n",
" 57% 4342/7609 [00:15<00:09, 336.95it/s]\u001b[A\n",
" 58% 4376/7609 [00:16<00:09, 335.66it/s]\u001b[A\n",
" 58% 4412/7609 [00:16<00:09, 340.46it/s]\u001b[A\n",
" 58% 4447/7609 [00:16<00:09, 322.13it/s]\u001b[A\n",
" 59% 4484/7609 [00:16<00:09, 333.16it/s]\u001b[A\n",
" 59% 4520/7609 [00:16<00:09, 338.43it/s]\u001b[A\n",
" 60% 4556/7609 [00:16<00:08, 342.73it/s]\u001b[A\n",
" 60% 4591/7609 [00:16<00:08, 340.68it/s]\u001b[A\n",
" 61% 4626/7609 [00:16<00:08, 342.85it/s]\u001b[A\n",
" 61% 4663/7609 [00:16<00:08, 349.40it/s]\u001b[A\n",
" 62% 4698/7609 [00:16<00:08, 336.93it/s]\u001b[A\n",
" 62% 4736/7609 [00:17<00:08, 347.12it/s]\u001b[A\n",
" 63% 4771/7609 [00:17<00:08, 342.80it/s]\u001b[A\n",
" 63% 4806/7609 [00:17<00:08, 340.14it/s]\u001b[A\n",
" 64% 4843/7609 [00:17<00:07, 346.67it/s]\u001b[A\n",
" 64% 4879/7609 [00:17<00:07, 349.23it/s]\u001b[A\n",
" 65% 4914/7609 [00:17<00:07, 340.33it/s]\u001b[A\n",
" 65% 4949/7609 [00:17<00:07, 333.04it/s]\u001b[A\n",
" 65% 4983/7609 [00:17<00:07, 332.52it/s]\u001b[A\n",
" 66% 5017/7609 [00:17<00:08, 319.67it/s]\u001b[A\n",
" 66% 5050/7609 [00:18<00:07, 320.93it/s]\u001b[A\n",
" 67% 5084/7609 [00:18<00:07, 324.47it/s]\u001b[A\n",
" 67% 5118/7609 [00:18<00:07, 326.48it/s]\u001b[A\n",
" 68% 5153/7609 [00:18<00:07, 331.63it/s]\u001b[A\n",
" 68% 5187/7609 [00:18<00:07, 333.97it/s]\u001b[A\n",
" 69% 5222/7609 [00:18<00:07, 337.50it/s]\u001b[A\n",
" 69% 5258/7609 [00:18<00:06, 341.40it/s]\u001b[A\n",
" 70% 5293/7609 [00:18<00:06, 340.17it/s]\u001b[A\n",
" 70% 5328/7609 [00:18<00:06, 342.70it/s]\u001b[A\n",
" 70% 5363/7609 [00:18<00:06, 334.83it/s]\u001b[A\n",
" 71% 5397/7609 [00:19<00:06, 334.27it/s]\u001b[A\n",
" 71% 5431/7609 [00:19<00:06, 333.55it/s]\u001b[A\n",
" 72% 5466/7609 [00:19<00:06, 338.03it/s]\u001b[A\n",
" 72% 5500/7609 [00:19<00:06, 335.44it/s]\u001b[A\n",
" 73% 5535/7609 [00:19<00:06, 337.65it/s]\u001b[A\n",
" 73% 5570/7609 [00:19<00:05, 341.28it/s]\u001b[A\n",
" 74% 5605/7609 [00:19<00:05, 338.55it/s]\u001b[A\n",
" 74% 5640/7609 [00:19<00:05, 340.98it/s]\u001b[A\n",
" 75% 5676/7609 [00:19<00:05, 345.49it/s]\u001b[A\n",
" 75% 5711/7609 [00:19<00:05, 337.68it/s]\u001b[A\n",
" 76% 5747/7609 [00:20<00:05, 342.84it/s]\u001b[A\n",
" 76% 5785/7609 [00:20<00:05, 353.49it/s]\u001b[A\n",
" 77% 5821/7609 [00:20<00:05, 352.63it/s]\u001b[A\n",
" 77% 5857/7609 [00:20<00:04, 352.02it/s]\u001b[A\n",
" 77% 5893/7609 [00:20<00:04, 353.00it/s]\u001b[A\n",
" 78% 5929/7609 [00:20<00:04, 345.39it/s]\u001b[A\n",
" 78% 5964/7609 [00:20<00:04, 330.71it/s]\u001b[A\n",
" 79% 6000/7609 [00:20<00:04, 338.18it/s]\u001b[A\n",
" 79% 6034/7609 [00:20<00:04, 327.30it/s]\u001b[A\n",
" 80% 6068/7609 [00:21<00:04, 328.53it/s]\u001b[A\n",
" 80% 6104/7609 [00:21<00:04, 336.55it/s]\u001b[A\n",
" 81% 6138/7609 [00:21<00:04, 304.04it/s]\u001b[A\n",
" 81% 6170/7609 [00:21<00:05, 280.05it/s]\u001b[A\n",
" 81% 6200/7609 [00:21<00:04, 283.64it/s]\u001b[A\n",
" 82% 6236/7609 [00:21<00:04, 302.84it/s]\u001b[A\n",
" 82% 6274/7609 [00:21<00:04, 322.67it/s]\u001b[A\n",
" 83% 6309/7609 [00:21<00:03, 329.48it/s]\u001b[A\n",
" 83% 6346/7609 [00:21<00:03, 340.00it/s]\u001b[A\n",
" 84% 6381/7609 [00:21<00:03, 341.59it/s]\u001b[A\n",
" 84% 6416/7609 [00:22<00:03, 340.91it/s]\u001b[A\n",
" 85% 6451/7609 [00:22<00:03, 343.01it/s]\u001b[A\n",
" 85% 6489/7609 [00:22<00:03, 351.88it/s]\u001b[A\n",
" 86% 6525/7609 [00:22<00:03, 349.91it/s]\u001b[A\n",
" 86% 6562/7609 [00:22<00:02, 354.01it/s]\u001b[A\n",
" 87% 6598/7609 [00:22<00:02, 355.09it/s]\u001b[A\n",
" 87% 6634/7609 [00:22<00:02, 338.17it/s]\u001b[A\n",
" 88% 6670/7609 [00:22<00:02, 342.02it/s]\u001b[A\n",
" 88% 6705/7609 [00:22<00:02, 334.34it/s]\u001b[A\n",
" 89% 6739/7609 [00:23<00:02, 323.10it/s]\u001b[A\n",
" 89% 6772/7609 [00:23<00:02, 323.96it/s]\u001b[A\n",
" 89% 6805/7609 [00:23<00:02, 311.85it/s]\u001b[A\n",
" 90% 6840/7609 [00:23<00:02, 321.24it/s]\u001b[A\n",
" 90% 6873/7609 [00:23<00:02, 316.97it/s]\u001b[A\n",
" 91% 6907/7609 [00:23<00:02, 321.75it/s]\u001b[A\n",
" 91% 6942/7609 [00:23<00:02, 328.07it/s]\u001b[A\n",
" 92% 6976/7609 [00:23<00:01, 331.30it/s]\u001b[A\n",
" 92% 7010/7609 [00:23<00:01, 330.95it/s]\u001b[A\n",
" 93% 7045/7609 [00:23<00:01, 335.28it/s]\u001b[A\n",
" 93% 7079/7609 [00:24<00:01, 306.99it/s]\u001b[A\n",
" 93% 7111/7609 [00:24<00:01, 302.98it/s]\u001b[A\n",
" 94% 7142/7609 [00:24<00:01, 290.42it/s]\u001b[A\n",
" 94% 7172/7609 [00:24<00:01, 254.75it/s]\u001b[A\n",
" 95% 7199/7609 [00:24<00:01, 219.10it/s]\u001b[A\n",
" 95% 7223/7609 [00:24<00:01, 209.03it/s]\u001b[A\n",
" 95% 7245/7609 [00:24<00:01, 204.13it/s]\u001b[A\n",
" 95% 7266/7609 [00:25<00:01, 187.45it/s]\u001b[A\n",
" 96% 7286/7609 [00:25<00:01, 188.71it/s]\u001b[A\n",
" 96% 7306/7609 [00:25<00:01, 190.24it/s]\u001b[A\n",
" 96% 7326/7609 [00:25<00:01, 179.65it/s]\u001b[A\n",
" 97% 7346/7609 [00:25<00:01, 183.20it/s]\u001b[A\n",
" 97% 7365/7609 [00:25<00:01, 182.16it/s]\u001b[A\n",
" 97% 7385/7609 [00:25<00:01, 184.72it/s]\u001b[A\n",
" 97% 7404/7609 [00:25<00:01, 186.02it/s]\u001b[A\n",
" 98% 7424/7609 [00:25<00:00, 187.70it/s]\u001b[A\n",
" 98% 7443/7609 [00:26<00:00, 187.57it/s]\u001b[A\n",
" 98% 7462/7609 [00:26<00:00, 179.01it/s]\u001b[A\n",
" 98% 7480/7609 [00:26<00:00, 172.84it/s]\u001b[A\n",
" 99% 7498/7609 [00:26<00:00, 167.57it/s]\u001b[A\n",
" 99% 7517/7609 [00:26<00:00, 172.12it/s]\u001b[A\n",
" 99% 7535/7609 [00:26<00:00, 164.33it/s]\u001b[A\n",
" 99% 7552/7609 [00:26<00:00, 154.64it/s]\u001b[A\n",
" 99% 7569/7609 [00:26<00:00, 157.53it/s]\u001b[A\n",
"100% 7588/7609 [00:26<00:00, 165.34it/s]\u001b[A\n",
"100% 7609/7609 [00:27<00:00, 281.47it/s]\n",
"06/11/2023 20:57:34 - INFO - utils_qa - Saving predictions to eval_results/predict_predictions.json.\n",
"06/11/2023 20:57:34 - INFO - utils_qa - Saving nbest_preds to eval_results/predict_nbest_predictions.json.\n",
"***** predict metrics *****\n",
" predict_samples = 7992\n",
" test_exact_match = 65.7248\n",
" test_f1 = 77.0614\n",
" test_runtime = 0:03:14.17\n",
" test_samples_per_second = 41.158\n",
" test_steps_per_second = 8.235\n",
"[INFO|modelcard.py:451] 2023-06-11 20:57:38,434 >> Dropping the following result as it does not have all the necessary fields:\n",
"{'task': {'name': 'Question Answering', 'type': 'question-answering'}, 'dataset': {'name': 'squad_it', 'type': 'squad_it'}}\n",
"100% 1599/1599 [03:56<00:00, 6.77it/s]\n"
]
}
]
},
{
"cell_type": "code",
"source": [],
"metadata": {
"id": "rMyhUFpnItIQ"
},
"execution_count": null,
"outputs": []
}
]
} |