(self, sql)
| 361 | self.partial_scores = None |
| 362 | |
| 363 | def eval_hardness(self, sql): |
| 364 | count_comp1_ = count_component1(sql) |
| 365 | count_comp2_ = count_component2(sql) |
| 366 | count_others_ = count_others(sql) |
| 367 | |
| 368 | if count_comp1_ <= 1 and count_others_ == 0 and count_comp2_ == 0: |
| 369 | return "easy" |
| 370 | elif (count_others_ <= 2 and count_comp1_ <= 1 and count_comp2_ == 0) or \ |
| 371 | (count_comp1_ <= 2 and count_others_ < 2 and count_comp2_ == 0): |
| 372 | return "medium" |
| 373 | elif (count_others_ > 2 and count_comp1_ <= 2 and count_comp2_ == 0) or \ |
| 374 | (2 < count_comp1_ <= 3 and count_others_ <= 2 and count_comp2_ == 0) or \ |
| 375 | (count_comp1_ <= 1 and count_others_ == 0 and count_comp2_ <= 1): |
| 376 | return "hard" |
| 377 | else: |
| 378 | return "extra" |
| 379 | |
| 380 | def eval_exact_match(self, pred, label): |
| 381 | partial_scores = self.eval_partial_match(pred, label) |
no test coverage detected