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