dev
Browse files- app.py +1 -1
- gradio-3.wpu +107 -106
app.py
CHANGED
|
@@ -301,7 +301,7 @@ def run_train(dataset_name, hub_id, api_key, num_epochs, batch_size, lr, grad):
|
|
| 301 |
lora_dropout=0.1, # Dropout for LoRA layers
|
| 302 |
bias="none" # Bias handling
|
| 303 |
)
|
| 304 |
-
model = get_peft_model(model, lora_config)
|
| 305 |
result = fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size, lr, grad)
|
| 306 |
return result
|
| 307 |
|
|
|
|
| 301 |
lora_dropout=0.1, # Dropout for LoRA layers
|
| 302 |
bias="none" # Bias handling
|
| 303 |
)
|
| 304 |
+
#model = get_peft_model(model, lora_config)
|
| 305 |
result = fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size, lr, grad)
|
| 306 |
return result
|
| 307 |
|
gradio-3.wpu
CHANGED
|
@@ -425,98 +425,17 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
|
|
| 425 |
'wide',
|
| 426 |
1,
|
| 427 |
{})],
|
| 428 |
-
'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('
|
| 429 |
-
{'attrib-starts': [
|
| 430 |
-
|
| 431 |
-
|
| 432 |
-
143)],
|
| 433 |
-
'code-line': ' raise exception_class(message, screen, stacktrace)\n',
|
| 434 |
-
'first-line': 218,
|
| 435 |
'folded-linenos': [],
|
| 436 |
-
'sel-line':
|
| 437 |
-
'sel-line-start':
|
| 438 |
-
'selection_end':
|
| 439 |
-
'selection_start':
|
| 440 |
'zoom': 0},
|
| 441 |
-
|
| 442 |
-
[loc('selenium_click.py'),
|
| 443 |
-
{'attrib-starts': [],
|
| 444 |
-
'code-line': " text_areas = driver.find_elements(By.TAG_NAME, 'textarea')\n",
|
| 445 |
-
'first-line': 11,
|
| 446 |
-
'folded-linenos': [],
|
| 447 |
-
'sel-line': 21,
|
| 448 |
-
'sel-line-start': 771,
|
| 449 |
-
'selection_end': 833,
|
| 450 |
-
'selection_start': 833,
|
| 451 |
-
'zoom': 0},
|
| 452 |
-
1733883947.2524962],
|
| 453 |
-
[loc('app.py'),
|
| 454 |
-
{'attrib-starts': [],
|
| 455 |
-
'code-line': 'import spaces\n',
|
| 456 |
-
'first-line': 0,
|
| 457 |
-
'folded-linenos': [],
|
| 458 |
-
'sel-line': 0,
|
| 459 |
-
'sel-line-start': 0,
|
| 460 |
-
'selection_end': 0,
|
| 461 |
-
'selection_start': 0,
|
| 462 |
-
'zoom': 0},
|
| 463 |
-
1733883957.4314425],
|
| 464 |
-
[loc('app.py'),
|
| 465 |
-
{'attrib-starts': [('fine_tune_model|0|',
|
| 466 |
-
30)],
|
| 467 |
-
'code-line': " os.remove(os.path.join('/data/results', check))\n",
|
| 468 |
-
'first-line': 240,
|
| 469 |
-
'folded-linenos': [],
|
| 470 |
-
'sel-line': 252,
|
| 471 |
-
'sel-line-start': 11667,
|
| 472 |
-
'selection_end': 11734,
|
| 473 |
-
'selection_start': 11734,
|
| 474 |
-
'zoom': 0},
|
| 475 |
-
1733884182.266322],
|
| 476 |
-
[loc('app.py'),
|
| 477 |
-
{'attrib-starts': [],
|
| 478 |
-
'code-line': '@spaces.GPU\n',
|
| 479 |
-
'first-line': 261,
|
| 480 |
-
'folded-linenos': [],
|
| 481 |
-
'sel-line': 269,
|
| 482 |
-
'sel-line-start': 12530,
|
| 483 |
-
'selection_end': 12541,
|
| 484 |
-
'selection_start': 12541,
|
| 485 |
-
'zoom': 0},
|
| 486 |
-
1733888916.495776],
|
| 487 |
-
[loc('app.py'),
|
| 488 |
-
{'attrib-starts': [],
|
| 489 |
-
'code-line': ' description="This interface allows you to test shorecode/t5-efficient-tiny-nh8-summarizer."\n',
|
| 490 |
-
'first-line': 301,
|
| 491 |
-
'folded-linenos': [],
|
| 492 |
-
'sel-line': 316,
|
| 493 |
-
'sel-line-start': 14328,
|
| 494 |
-
'selection_end': 14425,
|
| 495 |
-
'selection_start': 14393,
|
| 496 |
-
'zoom': 0},
|
| 497 |
-
1733889109.1047828],
|
| 498 |
-
[loc('app.py'),
|
| 499 |
-
{'attrib-starts': [],
|
| 500 |
-
'code-line': ' ],\n',
|
| 501 |
-
'first-line': 301,
|
| 502 |
-
'folded-linenos': [],
|
| 503 |
-
'sel-line': 313,
|
| 504 |
-
'sel-line-start': 14201,
|
| 505 |
-
'selection_end': 14201,
|
| 506 |
-
'selection_start': 14201,
|
| 507 |
-
'zoom': 0},
|
| 508 |
-
1733889187.7480035],
|
| 509 |
-
[loc('app.py'),
|
| 510 |
-
{'attrib-starts': [],
|
| 511 |
-
'code-line': 'except Exception as e:\n',
|
| 512 |
-
'first-line': 325,
|
| 513 |
-
'folded-linenos': [],
|
| 514 |
-
'sel-line': 344,
|
| 515 |
-
'sel-line-start': 15456,
|
| 516 |
-
'selection_end': 15478,
|
| 517 |
-
'selection_start': 15478,
|
| 518 |
-
'zoom': 0},
|
| 519 |
-
1733889189.8301165],
|
| 520 |
[loc('app.py'),
|
| 521 |
{'attrib-starts': [],
|
| 522 |
'code-line': "'''",
|
|
@@ -650,19 +569,101 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
|
|
| 650 |
'selection_end': 50,
|
| 651 |
'selection_start': 50,
|
| 652 |
'zoom': 0},
|
| 653 |
-
1733890425.432772]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 654 |
20),
|
| 655 |
-
'current-loc': loc('
|
| 656 |
'editor-state-list': [(loc('app.py'),
|
| 657 |
-
{'attrib-starts': [('
|
| 658 |
-
|
| 659 |
-
'code-line': '
|
| 660 |
-
'first-line':
|
| 661 |
'folded-linenos': [],
|
| 662 |
-
'sel-line':
|
| 663 |
-
'sel-line-start':
|
| 664 |
-
'selection_end':
|
| 665 |
-
'selection_start':
|
| 666 |
'zoom': 0}),
|
| 667 |
(loc('selenium_click.py'),
|
| 668 |
{'attrib-starts': [],
|
|
@@ -678,8 +679,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
|
|
| 678 |
'locked': False},
|
| 679 |
[loc('app.py'),
|
| 680 |
loc('selenium_click.py')]),
|
| 681 |
-
'open_files': ['
|
| 682 |
-
'
|
| 683 |
'saved_notebook_display': None,
|
| 684 |
'split_percents': {0: 0.4410585404971933,
|
| 685 |
1: 0.5,
|
|
@@ -696,14 +697,14 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
|
|
| 696 |
'tab_location': 'left',
|
| 697 |
'traversal_pos': ((1,
|
| 698 |
0),
|
| 699 |
-
|
| 700 |
'user_data': {}},
|
| 701 |
'window-alloc': (0,
|
| 702 |
0,
|
| 703 |
1920,
|
| 704 |
-
|
| 705 |
-
guimgr.recent-documents = [loc('
|
| 706 |
-
loc('
|
| 707 |
guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py'): {'attrib-starts': [('ErrorHandler|0|',
|
| 708 |
140),
|
| 709 |
('ErrorHandler|0|.check_response|0|',
|
|
|
|
| 425 |
'wide',
|
| 426 |
1,
|
| 427 |
{})],
|
| 428 |
+
'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('app.py'),
|
| 429 |
+
{'attrib-starts': [],
|
| 430 |
+
'code-line': 'except Exception as e:\n',
|
| 431 |
+
'first-line': 325,
|
|
|
|
|
|
|
|
|
|
| 432 |
'folded-linenos': [],
|
| 433 |
+
'sel-line': 344,
|
| 434 |
+
'sel-line-start': 15456,
|
| 435 |
+
'selection_end': 15478,
|
| 436 |
+
'selection_start': 15478,
|
| 437 |
'zoom': 0},
|
| 438 |
+
1733889189.8301165],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 439 |
[loc('app.py'),
|
| 440 |
{'attrib-starts': [],
|
| 441 |
'code-line': "'''",
|
|
|
|
| 569 |
'selection_end': 50,
|
| 570 |
'selection_start': 50,
|
| 571 |
'zoom': 0},
|
| 572 |
+
1733890425.432772],
|
| 573 |
+
[loc('app.py'),
|
| 574 |
+
{'attrib-starts': [('run_train|0|',
|
| 575 |
+
286)],
|
| 576 |
+
'code-line': ' config = AutoConfig.from_pretrained("google/t5-efficient-tiny-nh8")\n',
|
| 577 |
+
'first-line': 273,
|
| 578 |
+
'folded-linenos': [],
|
| 579 |
+
'sel-line': 294,
|
| 580 |
+
'sel-line-start': 13525,
|
| 581 |
+
'selection_end': 13594,
|
| 582 |
+
'selection_start': 13566,
|
| 583 |
+
'zoom': 0},
|
| 584 |
+
1733890482.8022997],
|
| 585 |
+
[loc('selenium_click.py'),
|
| 586 |
+
{'attrib-starts': [],
|
| 587 |
+
'code-line': 'def test(text): \n',
|
| 588 |
+
'first-line': 0,
|
| 589 |
+
'folded-linenos': [],
|
| 590 |
+
'sel-line': 2,
|
| 591 |
+
'sel-line-start': 35,
|
| 592 |
+
'selection_end': 50,
|
| 593 |
+
'selection_start': 50,
|
| 594 |
+
'zoom': 0},
|
| 595 |
+
1733890703.8402333],
|
| 596 |
+
[loc('app.py'),
|
| 597 |
+
{'attrib-starts': [('run_train|0|',
|
| 598 |
+
286)],
|
| 599 |
+
'code-line': ' lora_alpha=8, # Scaling factor\n',
|
| 600 |
+
'first-line': 285,
|
| 601 |
+
'folded-linenos': [],
|
| 602 |
+
'sel-line': 299,
|
| 603 |
+
'sel-line-start': 13759,
|
| 604 |
+
'selection_end': 13779,
|
| 605 |
+
'selection_start': 13779,
|
| 606 |
+
'zoom': 0},
|
| 607 |
+
1733890990.4531481],
|
| 608 |
+
[loc('selenium_click.py'),
|
| 609 |
+
{'attrib-starts': [],
|
| 610 |
+
'code-line': 'def test(text): \n',
|
| 611 |
+
'first-line': 0,
|
| 612 |
+
'folded-linenos': [],
|
| 613 |
+
'sel-line': 2,
|
| 614 |
+
'sel-line-start': 35,
|
| 615 |
+
'selection_end': 50,
|
| 616 |
+
'selection_start': 50,
|
| 617 |
+
'zoom': 0},
|
| 618 |
+
1733890992.9117355],
|
| 619 |
+
[loc('app.py'),
|
| 620 |
+
{'attrib-starts': [('run_train|0|',
|
| 621 |
+
286)],
|
| 622 |
+
'code-line': ' lora_alpha=8, # Scaling factor\n',
|
| 623 |
+
'first-line': 285,
|
| 624 |
+
'folded-linenos': [],
|
| 625 |
+
'sel-line': 299,
|
| 626 |
+
'sel-line-start': 13759,
|
| 627 |
+
'selection_end': 13779,
|
| 628 |
+
'selection_start': 13779,
|
| 629 |
+
'zoom': 0},
|
| 630 |
+
1733891097.8497958],
|
| 631 |
+
[loc('app.py'),
|
| 632 |
+
{'attrib-starts': [('fine_tune_model|0|',
|
| 633 |
+
30)],
|
| 634 |
+
'code-line': " return 'TOKENS DONE'\n",
|
| 635 |
+
'first-line': 153,
|
| 636 |
+
'folded-linenos': [],
|
| 637 |
+
'sel-line': 162,
|
| 638 |
+
'sel-line-start': 7058,
|
| 639 |
+
'selection_end': 7093,
|
| 640 |
+
'selection_start': 7093,
|
| 641 |
+
'zoom': 0},
|
| 642 |
+
1733891492.4296558],
|
| 643 |
+
[loc('app.py'),
|
| 644 |
+
{'attrib-starts': [('fine_tune_model|0|',
|
| 645 |
+
30)],
|
| 646 |
+
'code-line': ' #greater_is_better=True,\n',
|
| 647 |
+
'first-line': 66,
|
| 648 |
+
'folded-linenos': [],
|
| 649 |
+
'sel-line': 82,
|
| 650 |
+
'sel-line-start': 3317,
|
| 651 |
+
'selection_end': 3330,
|
| 652 |
+
'selection_start': 3330,
|
| 653 |
+
'zoom': 0},
|
| 654 |
+
1733913275.840877]],
|
| 655 |
20),
|
| 656 |
+
'current-loc': loc('selenium_click.py'),
|
| 657 |
'editor-state-list': [(loc('app.py'),
|
| 658 |
+
{'attrib-starts': [('fine_tune_model|0|',
|
| 659 |
+
30)],
|
| 660 |
+
'code-line': ' #greater_is_better=True,\n',
|
| 661 |
+
'first-line': 66,
|
| 662 |
'folded-linenos': [],
|
| 663 |
+
'sel-line': 82,
|
| 664 |
+
'sel-line-start': 3317,
|
| 665 |
+
'selection_end': 3330,
|
| 666 |
+
'selection_start': 3330,
|
| 667 |
'zoom': 0}),
|
| 668 |
(loc('selenium_click.py'),
|
| 669 |
{'attrib-starts': [],
|
|
|
|
| 679 |
'locked': False},
|
| 680 |
[loc('app.py'),
|
| 681 |
loc('selenium_click.py')]),
|
| 682 |
+
'open_files': ['app.py',
|
| 683 |
+
'selenium_click.py']},
|
| 684 |
'saved_notebook_display': None,
|
| 685 |
'split_percents': {0: 0.4410585404971933,
|
| 686 |
1: 0.5,
|
|
|
|
| 697 |
'tab_location': 'left',
|
| 698 |
'traversal_pos': ((1,
|
| 699 |
0),
|
| 700 |
+
1733890676.3558738),
|
| 701 |
'user_data': {}},
|
| 702 |
'window-alloc': (0,
|
| 703 |
0,
|
| 704 |
1920,
|
| 705 |
+
823)}]}
|
| 706 |
+
guimgr.recent-documents = [loc('selenium_click.py'),
|
| 707 |
+
loc('app.py')]
|
| 708 |
guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py'): {'attrib-starts': [('ErrorHandler|0|',
|
| 709 |
140),
|
| 710 |
('ErrorHandler|0|.check_response|0|',
|