Upload evaluation/benchmarks/text_classification/eval.py with huggingface_hub
Browse files
evaluation/benchmarks/text_classification/eval.py
CHANGED
|
@@ -1,14 +1,11 @@
|
|
| 1 |
import argparse
|
| 2 |
import os
|
| 3 |
import sys
|
|
|
|
|
|
|
| 4 |
# Add parent directory to path to import utils
|
| 5 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
|
| 6 |
from utils.benchmark_utils import get_benchmark_score
|
| 7 |
-
# Some benchmarks mistakenly import 'util' instead of 'utils' — tolerate that for portability
|
| 8 |
-
try:
|
| 9 |
-
import util
|
| 10 |
-
except Exception:
|
| 11 |
-
util = None
|
| 12 |
|
| 13 |
def main():
|
| 14 |
parser = argparse.ArgumentParser(description="Evaluate text classification")
|
|
|
|
| 1 |
import argparse
|
| 2 |
import os
|
| 3 |
import sys
|
| 4 |
+
import util
|
| 5 |
+
|
| 6 |
# Add parent directory to path to import utils
|
| 7 |
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..'))
|
| 8 |
from utils.benchmark_utils import get_benchmark_score
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
def main():
|
| 11 |
parser = argparse.ArgumentParser(description="Evaluate text classification")
|