ariG23498 HF Staff commited on
Commit
30f7ba4
·
verified ·
1 Parent(s): 6853de6

Upload Prior-Labs_tabpfn_2_5_0.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. Prior-Labs_tabpfn_2_5_0.py +55 -0
Prior-Labs_tabpfn_2_5_0.py ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # /// script
2
+ # requires-python = ">=3.12"
3
+ # dependencies = [
4
+ # "numpy",
5
+ # "einops",
6
+ # "pandas",
7
+ # "matplotlib",
8
+ # "paddleorc",
9
+ # "protobuf",
10
+ # "torch",
11
+ # "sentencepiece",
12
+ # "torchvision",
13
+ # "transformers",
14
+ # "timm",
15
+ # "diffusers",
16
+ # "sentence-transformers",
17
+ # "accelerate",
18
+ # "peft",
19
+ # "slack-sdk",
20
+ # ]
21
+ # ///
22
+
23
+ try:
24
+ from huggingface_hub import login
25
+ login(new_session=False)
26
+ with open('Prior-Labs_tabpfn_2_5_0.txt', 'w', encoding='utf-8') as f:
27
+ f.write('Everything was good in Prior-Labs_tabpfn_2_5_0.txt')
28
+ except Exception as e:
29
+ import os
30
+ from slack_sdk import WebClient
31
+ client = WebClient(token=os.environ['SLACK_TOKEN'])
32
+ client.chat_postMessage(
33
+ channel='#hub-model-metadata-snippets-sprint',
34
+ text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/Prior-Labs_tabpfn_2_5_0.txt|Prior-Labs_tabpfn_2_5_0.txt>',
35
+ )
36
+
37
+ with open('Prior-Labs_tabpfn_2_5_0.txt', 'a', encoding='utf-8') as f:
38
+ import traceback
39
+ f.write('''```CODE:
40
+ from huggingface_hub import login
41
+ login(new_session=False)
42
+ ```
43
+
44
+ ERROR:
45
+ ''')
46
+ traceback.print_exc(file=f)
47
+
48
+ finally:
49
+ from huggingface_hub import upload_file
50
+ upload_file(
51
+ path_or_fileobj='Prior-Labs_tabpfn_2_5_0.txt',
52
+ repo_id='model-metadata/code_execution_files',
53
+ path_in_repo='Prior-Labs_tabpfn_2_5_0.txt',
54
+ repo_type='dataset',
55
+ )