fix: add Optional/Any import to cl_collator, ipdb try/except in score.py
Browse files
root_gainlora/score.py
CHANGED
|
@@ -1,7 +1,10 @@
|
|
| 1 |
import json
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
-
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
def load_json(path):
|
| 7 |
with open(path, 'r', encoding='utf-8') as f:
|
|
|
|
| 1 |
import json
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
+
try:
|
| 5 |
+
import ipdb
|
| 6 |
+
except ImportError:
|
| 7 |
+
ipdb = None
|
| 8 |
|
| 9 |
def load_json(path):
|
| 10 |
with open(path, 'r', encoding='utf-8') as f:
|
root_gainlora/src/cl_collator.py
CHANGED
|
@@ -1,4 +1,5 @@
|
|
| 1 |
import logging
|
|
|
|
| 2 |
|
| 3 |
import torch
|
| 4 |
from transformers.data.data_collator import *
|
|
|
|
| 1 |
import logging
|
| 2 |
+
from typing import Any, Optional
|
| 3 |
|
| 4 |
import torch
|
| 5 |
from transformers.data.data_collator import *
|