Spaces:
Sleeping
Sleeping
Fix grader Series comparison length crash
Browse files
server/data_clean_env_environment.py
CHANGED
|
@@ -147,8 +147,11 @@ class DataCleanEnvironment(Environment):
|
|
| 147 |
|
| 148 |
if task == "easy_clean":
|
| 149 |
if "age" in self._df.columns and self._df["age"].isna().sum() == 0:
|
| 150 |
-
|
| 151 |
-
|
|
|
|
|
|
|
|
|
|
| 152 |
|
| 153 |
elif task == "medium_clean":
|
| 154 |
max_score = 3.0
|
|
|
|
| 147 |
|
| 148 |
if task == "easy_clean":
|
| 149 |
if "age" in self._df.columns and self._df["age"].isna().sum() == 0:
|
| 150 |
+
try:
|
| 151 |
+
if len(self._df["age"]) == len(self._target_df["age"]) and (self._df["age"] == self._target_df["age"]).all():
|
| 152 |
+
score = 1.0
|
| 153 |
+
except Exception:
|
| 154 |
+
pass
|
| 155 |
|
| 156 |
elif task == "medium_clean":
|
| 157 |
max_score = 3.0
|