Upload custom_code/17-06-25/deepseek-ai_DeepSeek-R1-0528_0.py with huggingface_hub
Browse files
custom_code/17-06-25/deepseek-ai_DeepSeek-R1-0528_0.py
CHANGED
@@ -16,13 +16,15 @@ try:
|
|
16 |
]
|
17 |
pipe(messages)
|
18 |
except Exception as e:
|
19 |
-
|
|
|
20 |
import traceback
|
21 |
traceback.print_exc(file=f)
|
|
|
22 |
from huggingface_hub import upload_file
|
23 |
upload_file(
|
24 |
-
path_or_fileobj=
|
25 |
repo_id='model-metadata/model-code-exception',
|
26 |
-
path_in_repo=
|
27 |
repo_type='dataset',
|
28 |
)
|
|
|
16 |
]
|
17 |
pipe(messages)
|
18 |
except Exception as e:
|
19 |
+
exception_file = 'deepseek-ai_DeepSeek-R1-0528_0_exception.txt'
|
20 |
+
with open(exception_file, 'w') as f:
|
21 |
import traceback
|
22 |
traceback.print_exc(file=f)
|
23 |
+
# Upload exception log to HuggingFace
|
24 |
from huggingface_hub import upload_file
|
25 |
upload_file(
|
26 |
+
path_or_fileobj=exception_file,
|
27 |
repo_id='model-metadata/model-code-exception',
|
28 |
+
path_in_repo='17-06-25/deepseek-ai_DeepSeek-R1-0528_0_exception.txt',
|
29 |
repo_type='dataset',
|
30 |
)
|