Commit
·
6b11a89
1
Parent(s):
9685f7b
My own trivial baseline
Browse files- tasks/text.py +6 -3
tasks/text.py
CHANGED
@@ -9,7 +9,7 @@ from .utils.emissions import tracker, clean_emissions_data, get_space_info
|
|
9 |
|
10 |
router = APIRouter()
|
11 |
|
12 |
-
DESCRIPTION = "
|
13 |
ROUTE = "/text"
|
14 |
|
15 |
@router.post(ROUTE, tags=["Text Task"],
|
@@ -57,8 +57,11 @@ async def evaluate_text(request: TextEvaluationRequest):
|
|
57 |
#--------------------------------------------------------------------------------------------
|
58 |
|
59 |
# Make random predictions (placeholder for actual model inference)
|
60 |
-
true_labels = test_dataset["label"]
|
61 |
-
predictions = [random.randint(0, 7) for _ in range(len(true_labels))]
|
|
|
|
|
|
|
62 |
|
63 |
#--------------------------------------------------------------------------------------------
|
64 |
# YOUR MODEL INFERENCE STOPS HERE
|
|
|
9 |
|
10 |
router = APIRouter()
|
11 |
|
12 |
+
DESCRIPTION = "Most common class baseline"
|
13 |
ROUTE = "/text"
|
14 |
|
15 |
@router.post(ROUTE, tags=["Text Task"],
|
|
|
57 |
#--------------------------------------------------------------------------------------------
|
58 |
|
59 |
# Make random predictions (placeholder for actual model inference)
|
60 |
+
#true_labels = test_dataset["label"]
|
61 |
+
#predictions = [random.randint(0, 7) for _ in range(len(true_labels))]
|
62 |
+
|
63 |
+
# My favorate baseline is the most common class.
|
64 |
+
predictions = [0] * len(true_labels)
|
65 |
|
66 |
#--------------------------------------------------------------------------------------------
|
67 |
# YOUR MODEL INFERENCE STOPS HERE
|