Kevin Fink commited on
Commit
3aaa543
·
1 Parent(s): 138f67f
Files changed (3) hide show
  1. app.py +0 -3
  2. gradio-3.wpu +0 -187
  3. selenium_click.py +1 -12
app.py CHANGED
@@ -241,8 +241,6 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
241
  int_index = s.find('-')
242
  return int(s[int_index+1:])
243
 
244
- <<<<<<< HEAD
245
- =======
246
  checkpoint_dir = training_args.output_dir
247
  # If the trainer_state.json is missing, look for the previous checkpoint
248
  previous_checkpoints = sorted(os.listdir("/data/results"), key=get_checkpoint_int, reverse=True)
@@ -253,7 +251,6 @@ def fine_tune_model(model, dataset_name, hub_id, api_key, num_epochs, batch_size
253
  shutil.rmtree(os.path.join('/data/results', check))
254
  except:
255
  pass
256
- >>>>>>> 35c5766 (dev)
257
  try:
258
  train_result = trainer.train(resume_from_checkpoint=True)
259
  except Exception as e:
 
241
  int_index = s.find('-')
242
  return int(s[int_index+1:])
243
 
 
 
244
  checkpoint_dir = training_args.output_dir
245
  # If the trainer_state.json is missing, look for the previous checkpoint
246
  previous_checkpoints = sorted(os.listdir("/data/results"), key=get_checkpoint_int, reverse=True)
 
251
  shutil.rmtree(os.path.join('/data/results', check))
252
  except:
253
  pass
 
254
  try:
255
  train_result = trainer.train(resume_from_checkpoint=True)
256
  except Exception as e:
gradio-3.wpu CHANGED
@@ -272,11 +272,7 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
272
  'primary_view_state': {'area': 'wide',
273
  'constraint': None,
274
  'current_pages': [2,
275
- <<<<<<< HEAD
276
- 2],
277
- =======
278
  1],
279
- >>>>>>> 35c5766 (dev)
280
  'notebook_display': 'normal',
281
  'notebook_percent': 0.28547008547008546,
282
  'override_title': None,
@@ -429,142 +425,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
429
  'wide',
430
  1,
431
  {})],
432
- <<<<<<< HEAD
433
- 'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('app.py'),
434
- {'attrib-starts': [],
435
- 'code-line': 'except Exception as e:\n',
436
- 'first-line': 325,
437
- 'folded-linenos': [],
438
- 'sel-line': 344,
439
- 'sel-line-start': 15456,
440
- 'selection_end': 15478,
441
- 'selection_start': 15478,
442
- 'zoom': 0},
443
- 1733889189.8301165],
444
- [loc('app.py'),
445
- {'attrib-starts': [],
446
- 'code-line': "'''",
447
- 'first-line': 325,
448
- 'folded-linenos': [],
449
- 'sel-line': 346,
450
- 'sel-line-start': 15551,
451
- 'selection_end': 15554,
452
- 'selection_start': 15554,
453
- 'zoom': 0},
454
- 1733889294.4289477],
455
- [loc('app.py'),
456
- {'attrib-starts': [],
457
- 'code-line': 'def test(text):\n',
458
- 'first-line': 268,
459
- 'folded-linenos': [],
460
- 'sel-line': 269,
461
- 'sel-line-start': 12530,
462
- 'selection_end': 12530,
463
- 'selection_start': 12530,
464
- 'zoom': 0},
465
- 1733889581.404085],
466
- [loc('app.py'),
467
- {'attrib-starts': [],
468
- 'code-line': 'def test(text):\n',
469
- 'first-line': 295,
470
- 'folded-linenos': [],
471
- 'sel-line': 269,
472
- 'sel-line-start': 12530,
473
- 'selection_end': 12530,
474
- 'selection_start': 12530,
475
- 'zoom': 0},
476
- 1733889584.5569227],
477
- [loc('app.py'),
478
- {'attrib-starts': [],
479
- 'code-line': "'''\n",
480
- 'first-line': 292,
481
- 'folded-linenos': [],
482
- 'sel-line': 307,
483
- 'sel-line-start': 14083,
484
- 'selection_end': 14086,
485
- 'selection_start': 14086,
486
- 'zoom': 0},
487
- 1733889937.3925433],
488
- [loc('app.py'),
489
- {'attrib-starts': [],
490
- 'code-line': '',
491
- 'first-line': 340,
492
- 'folded-linenos': [],
493
- 'sel-line': 346,
494
- 'sel-line-start': 15554,
495
- 'selection_end': 15554,
496
- 'selection_start': 15554,
497
- 'zoom': 0},
498
- 1733889940.8484015],
499
- [loc('app.py'),
500
- {'attrib-starts': [],
501
- 'code-line': 'def test(text):\n',
502
- 'first-line': 268,
503
- 'folded-linenos': [],
504
- 'sel-line': 270,
505
- 'sel-line-start': 12542,
506
- 'selection_end': 12962,
507
- 'selection_start': 12542,
508
- 'zoom': 0},
509
- 1733889952.5545285],
510
- [loc('selenium_click.py'),
511
- {'attrib-starts': [],
512
- 'code-line': 'print',
513
- 'first-line': 0,
514
- 'folded-linenos': [],
515
- 'sel-line': 14,
516
- 'sel-line-start': 421,
517
- 'selection_end': 426,
518
- 'selection_start': 426,
519
- 'zoom': 0},
520
- 1733889960.5871687],
521
- [loc('selenium_click.py'),
522
- {'attrib-starts': [],
523
- 'code-line': 'import transformers\n',
524
- 'first-line': 0,
525
- 'folded-linenos': [],
526
- 'sel-line': 0,
527
- 'sel-line-start': 0,
528
- 'selection_end': 0,
529
- 'selection_start': 0,
530
- 'zoom': 0},
531
- 1733890178.8795424],
532
- [loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'),
533
- {'attrib-starts': [('infer_framework_load_model|0|',
534
- 205)],
535
- 'code-line': ' raise RuntimeError(\n',
536
- 'first-line': 217,
537
- 'folded-linenos': [],
538
- 'sel-line': 239,
539
- 'sel-line-start': 9148,
540
- 'selection_end': 9148,
541
- 'selection_start': 9148,
542
- 'zoom': 0},
543
- 1733890192.0519993],
544
- [loc('selenium_click.py'),
545
- {'attrib-starts': [],
546
- 'code-line': 'def test(text): \n',
547
- 'first-line': 0,
548
- 'folded-linenos': [],
549
- 'sel-line': 2,
550
- 'sel-line-start': 35,
551
- 'selection_end': 50,
552
- 'selection_start': 50,
553
- 'zoom': 0},
554
- 1733890223.0760849],
555
- [loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'),
556
- {'attrib-starts': [('infer_framework_load_model|0|',
557
- 205)],
558
- 'code-line': ' raise RuntimeError(\n',
559
- 'first-line': 226,
560
- 'folded-linenos': [],
561
- 'sel-line': 239,
562
- 'sel-line-start': 9148,
563
- 'selection_end': 9148,
564
- 'selection_start': 9148,
565
- 'zoom': 0},
566
- 1733890299.157337],
567
- =======
568
  'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'),
569
  {'attrib-starts': [('infer_framework_load_model|0|',
570
  205)],
@@ -577,7 +437,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
577
  'selection_start': 9148,
578
  'zoom': 0},
579
  1733890299.157337],
580
- >>>>>>> 35c5766 (dev)
581
  [loc('selenium_click.py'),
582
  {'attrib-starts': [],
583
  'code-line': 'def test(text): \n',
@@ -670,31 +529,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
670
  'selection_end': 3330,
671
  'selection_start': 3330,
672
  'zoom': 0},
673
- <<<<<<< HEAD
674
- 1733913275.840877]],
675
- 20),
676
- 'current-loc': loc('selenium_click.py'),
677
- 'editor-state-list': [(loc('app.py'),
678
- {'attrib-starts': [('fine_tune_model|0|',
679
- 30)],
680
- 'code-line': ' #greater_is_better=True,\n',
681
- 'first-line': 66,
682
- 'folded-linenos': [],
683
- 'sel-line': 82,
684
- 'sel-line-start': 3317,
685
- 'selection_end': 3330,
686
- 'selection_start': 3330,
687
- 'zoom': 0}),
688
- (loc('selenium_click.py'),
689
- {'attrib-starts': [],
690
- 'code-line': 'def test(text): \n',
691
- 'first-line': 0,
692
- 'folded-linenos': [],
693
- 'sel-line': 2,
694
- 'sel-line-start': 35,
695
- 'selection_end': 50,
696
- 'selection_start': 50,
697
- =======
698
  1733913275.840877],
699
  [loc('selenium_click.py'),
700
  {'attrib-starts': [],
@@ -885,15 +719,10 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
885
  'sel-line-start': 74204,
886
  'selection_end': 74204,
887
  'selection_start': 74204,
888
- >>>>>>> 35c5766 (dev)
889
  'zoom': 0})],
890
  'has-focus': True,
891
  'locked': False},
892
  [loc('app.py'),
893
- <<<<<<< HEAD
894
- loc('selenium_click.py')]),
895
- 'open_files': ['app.py',
896
- =======
897
  loc('selenium_click.py'),
898
  loc('../tidal_slides_com/src/ts_ai.py'),
899
  loc('../tidal_slides_com/src/ts_main.py'),
@@ -901,7 +730,6 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
901
  'open_files': ['app.py',
902
  '../tidal_slides_com/src/ts_ai.py',
903
  '../tidal_slides_com/src/ts_main.py',
904
- >>>>>>> 35c5766 (dev)
905
  'selenium_click.py']},
906
  'saved_notebook_display': None,
907
  'split_percents': {0: 0.4410585404971933,
@@ -910,13 +738,8 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
910
  'splits': 2,
911
  'tab_location': 'top',
912
  'traversal_pos': ((1,
913
- <<<<<<< HEAD
914
- 2),
915
- 1733890264.8827372),
916
- =======
917
  1),
918
  1733913397.6458473),
919
- >>>>>>> 35c5766 (dev)
920
  'user_data': {}},
921
  'saved_notebook_display': None,
922
  'split_percents': {0: 0.49743589743589745},
@@ -924,23 +747,16 @@ guimgr.overall-gui-state = {'windowing-policy': 'combined-window',
924
  'tab_location': 'left',
925
  'traversal_pos': ((1,
926
  0),
927
- <<<<<<< HEAD
928
- 1733890676.3558738),
929
- =======
930
  1733913397.6374698),
931
- >>>>>>> 35c5766 (dev)
932
  'user_data': {}},
933
  'window-alloc': (0,
934
  0,
935
  1920,
936
  823)}]}
937
  guimgr.recent-documents = [loc('selenium_click.py'),
938
- <<<<<<< HEAD
939
- =======
940
  loc('../tidal_slides_com/src/ts_main.py'),
941
  loc('../tidal_slides_com/src/ts_ai.py'),
942
  loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/generation/utils.py'),
943
- >>>>>>> 35c5766 (dev)
944
  loc('app.py')]
945
  guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py'): {'attrib-starts': [('ErrorHandler|0|',
946
  140),
@@ -966,8 +782,6 @@ guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/sel
966
  'selection_end': 4266,
967
  'selection_start': 4266,
968
  'zoom': 0},
969
- <<<<<<< HEAD
970
- =======
971
  loc('../../envs/gradio-3/lib/python3.12/site-packages/torch/nn/modules/module.py'): {'attrib-starts': [('Module|0|',
972
  398),
973
  ('Module|0|._call_impl|0|',
@@ -980,7 +794,6 @@ guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/sel
980
  'selection_end': 69769,
981
  'selection_start': 69769,
982
  'zoom': 0},
983
- >>>>>>> 35c5766 (dev)
984
  loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'): {'attrib-starts': [('infer_framework_load_model|0|',
985
  205)],
986
  'code-line': ' raise RuntimeError(\n',
 
272
  'primary_view_state': {'area': 'wide',
273
  'constraint': None,
274
  'current_pages': [2,
 
 
 
275
  1],
 
276
  'notebook_display': 'normal',
277
  'notebook_percent': 0.28547008547008546,
278
  'override_title': None,
 
425
  'wide',
426
  1,
427
  {})],
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
428
  'primary_view_state': {'editor_states': ({'bookmarks': ([[loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'),
429
  {'attrib-starts': [('infer_framework_load_model|0|',
430
  205)],
 
437
  'selection_start': 9148,
438
  'zoom': 0},
439
  1733890299.157337],
 
440
  [loc('selenium_click.py'),
441
  {'attrib-starts': [],
442
  'code-line': 'def test(text): \n',
 
529
  'selection_end': 3330,
530
  'selection_start': 3330,
531
  'zoom': 0},
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
532
  1733913275.840877],
533
  [loc('selenium_click.py'),
534
  {'attrib-starts': [],
 
719
  'sel-line-start': 74204,
720
  'selection_end': 74204,
721
  'selection_start': 74204,
 
722
  'zoom': 0})],
723
  'has-focus': True,
724
  'locked': False},
725
  [loc('app.py'),
 
 
 
 
726
  loc('selenium_click.py'),
727
  loc('../tidal_slides_com/src/ts_ai.py'),
728
  loc('../tidal_slides_com/src/ts_main.py'),
 
730
  'open_files': ['app.py',
731
  '../tidal_slides_com/src/ts_ai.py',
732
  '../tidal_slides_com/src/ts_main.py',
 
733
  'selenium_click.py']},
734
  'saved_notebook_display': None,
735
  'split_percents': {0: 0.4410585404971933,
 
738
  'splits': 2,
739
  'tab_location': 'top',
740
  'traversal_pos': ((1,
 
 
 
 
741
  1),
742
  1733913397.6458473),
 
743
  'user_data': {}},
744
  'saved_notebook_display': None,
745
  'split_percents': {0: 0.49743589743589745},
 
747
  'tab_location': 'left',
748
  'traversal_pos': ((1,
749
  0),
 
 
 
750
  1733913397.6374698),
 
751
  'user_data': {}},
752
  'window-alloc': (0,
753
  0,
754
  1920,
755
  823)}]}
756
  guimgr.recent-documents = [loc('selenium_click.py'),
 
 
757
  loc('../tidal_slides_com/src/ts_main.py'),
758
  loc('../tidal_slides_com/src/ts_ai.py'),
759
  loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/generation/utils.py'),
 
760
  loc('app.py')]
761
  guimgr.visual-state = {loc('../../envs/gradio-3/lib/python3.12/site-packages/selenium/webdriver/remote/errorhandler.py'): {'attrib-starts': [('ErrorHandler|0|',
762
  140),
 
782
  'selection_end': 4266,
783
  'selection_start': 4266,
784
  'zoom': 0},
 
 
785
  loc('../../envs/gradio-3/lib/python3.12/site-packages/torch/nn/modules/module.py'): {'attrib-starts': [('Module|0|',
786
  398),
787
  ('Module|0|._call_impl|0|',
 
794
  'selection_end': 69769,
795
  'selection_start': 69769,
796
  'zoom': 0},
 
797
  loc('../../envs/gradio-3/lib/python3.12/site-packages/transformers/pipelines/base.py'): {'attrib-starts': [('infer_framework_load_model|0|',
798
  205)],
799
  'code-line': ' raise RuntimeError(\n',
selenium_click.py CHANGED
@@ -6,12 +6,8 @@ def test(text):
6
  "summarization",
7
  model=model_name,
8
  tokenizer=model_name,
9
- <<<<<<< HEAD
10
- clean_up_tokenization_spaces=True,
11
- =======
12
  clean_up_tokenization_spaces=True,
13
  model_kwargs={'cache_dir': './cache'}
14
- >>>>>>> 35c5766 (dev)
15
  )
16
 
17
  max_length = 500
@@ -21,11 +17,4 @@ def test(text):
21
  from pprint import pprint as pp
22
 
23
 
24
- <<<<<<< HEAD
25
- pp(test(''' Shorecode is a leading professional software development and IT service provider.
26
- Our objective is to provide our clients with valuable tools to improve workflows with AI, automation or other techniques. We create impressive state-of-the-art data manipulation and automation tools. At your request, your software solution interface will be implemented as a GUI (Graphical User Interface), webpage, as a chat-bot (Telegram, Discord, etc.) or any other interface requirements you have. For those that are at ease with using a command line interface, we can skip the bells and whistles.
27
- When you choose to enlist our services, we will meet the expectation that your request will be completed with regular progress updates. We take pride in developing turn-key solutions that are intuitive.
28
- The code that we write will always be maintainable and well documented according to industry standards. Any bugs arising from defects in our workmanship are covered under warranty. We strive to provide a solution with long-term value to our clients.'''))
29
- =======
30
- pp(test(''' We generally recommend a DeepNarrow strategy where the model’s depth is preferentially increased before considering any other forms of uniform scaling across other dimensions. This is largely due to how much depth influences the Pareto-frontier as shown in earlier sections of the paper. Specifically, a tall small (deep and narrow) model is generally more efficient compared to the base model. Likewise, a tall base model might also generally more efficient compared to a large model. We generally find that, regardless of size, even if absolute performance might increase as we continue to stack layers, the relative gain of Pareto-efficiency diminishes as we increase the layers, converging at 32 to 36 layers. Finally, we note that our notion of efficiency here relates to any one compute dimension, i.e., params, FLOPs or throughput (speed). We report all three key efficiency metrics (number of params, FLOPS and speed) and leave this decision to the practitioner to decide which compute dimension to consider.'''))
31
- >>>>>>> 35c5766 (dev)
 
6
  "summarization",
7
  model=model_name,
8
  tokenizer=model_name,
 
 
 
9
  clean_up_tokenization_spaces=True,
10
  model_kwargs={'cache_dir': './cache'}
 
11
  )
12
 
13
  max_length = 500
 
17
  from pprint import pprint as pp
18
 
19
 
20
+ pp(test(''' We generally recommend a DeepNarrow strategy where the model’s depth is preferentially increased before considering any other forms of uniform scaling across other dimensions. This is largely due to how much depth influences the Pareto-frontier as shown in earlier sections of the paper. Specifically, a tall small (deep and narrow) model is generally more efficient compared to the base model. Likewise, a tall base model might also generally more efficient compared to a large model. We generally find that, regardless of size, even if absolute performance might increase as we continue to stack layers, the relative gain of Pareto-efficiency diminishes as we increase the layers, converging at 32 to 36 layers. Finally, we note that our notion of efficiency here relates to any one compute dimension, i.e., params, FLOPs or throughput (speed). We report all three key efficiency metrics (number of params, FLOPS and speed) and leave this decision to the practitioner to decide which compute dimension to consider.'''))