Upload inclusionAI_Ring-flash-linear-2.0-128k_1.py with huggingface_hub
Browse files
inclusionAI_Ring-flash-linear-2.0-128k_1.py
CHANGED
|
@@ -17,17 +17,25 @@ try:
|
|
| 17 |
with open('inclusionAI_Ring-flash-linear-2.0-128k_1.txt', 'w', encoding='utf-8') as f:
|
| 18 |
f.write('Everything was good in inclusionAI_Ring-flash-linear-2.0-128k_1.txt')
|
| 19 |
except Exception as e:
|
| 20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
import traceback
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 22 |
traceback.print_exc(file=f)
|
| 23 |
-
|
| 24 |
-
import os
|
| 25 |
-
from slack_sdk import WebClient
|
| 26 |
-
client = WebClient(token=os.environ['SLACK_TOKEN'])
|
| 27 |
-
client.chat_postMessage(
|
| 28 |
-
channel='#exp-slack-alerts',
|
| 29 |
-
text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/inclusionAI_Ring-flash-linear-2.0-128k_1.txt|inclusionAI_Ring-flash-linear-2.0-128k_1.txt>',
|
| 30 |
-
)
|
| 31 |
finally:
|
| 32 |
from huggingface_hub import upload_file
|
| 33 |
upload_file(
|
|
|
|
| 17 |
with open('inclusionAI_Ring-flash-linear-2.0-128k_1.txt', 'w', encoding='utf-8') as f:
|
| 18 |
f.write('Everything was good in inclusionAI_Ring-flash-linear-2.0-128k_1.txt')
|
| 19 |
except Exception as e:
|
| 20 |
+
import os
|
| 21 |
+
from slack_sdk import WebClient
|
| 22 |
+
client = WebClient(token=os.environ['SLACK_TOKEN'])
|
| 23 |
+
client.chat_postMessage(
|
| 24 |
+
channel='#exp-slack-alerts',
|
| 25 |
+
text='Problem in <https://huggingface.co/datasets/model-metadata/code_execution_files/blob/main/inclusionAI_Ring-flash-linear-2.0-128k_1.txt|inclusionAI_Ring-flash-linear-2.0-128k_1.txt>',
|
| 26 |
+
)
|
| 27 |
+
|
| 28 |
+
with open('inclusionAI_Ring-flash-linear-2.0-128k_1.txt', 'a', encoding='utf-8') as f:
|
| 29 |
import traceback
|
| 30 |
+
f.write('```CODE:
|
| 31 |
+
# Load model directly
|
| 32 |
+
from transformers import AutoModelForCausalLM
|
| 33 |
+
model = AutoModelForCausalLM.from_pretrained("inclusionAI/Ring-flash-linear-2.0-128k", trust_remote_code=True, torch_dtype="auto")
|
| 34 |
+
```
|
| 35 |
+
ERROR:
|
| 36 |
+
')
|
| 37 |
traceback.print_exc(file=f)
|
| 38 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
finally:
|
| 40 |
from huggingface_hub import upload_file
|
| 41 |
upload_file(
|