(pred, label)
| 181 | |
| 182 | |
| 183 | def eval_order(pred, label): |
| 184 | pred_total = label_total = cnt = 0 |
| 185 | if len(pred['orderBy']) > 0: |
| 186 | pred_total = 1 |
| 187 | if len(label['orderBy']) > 0: |
| 188 | label_total = 1 |
| 189 | if len(label['orderBy']) > 0 and pred['orderBy'] == label['orderBy'] and \ |
| 190 | ((pred['limit'] is None and label['limit'] is None) or (pred['limit'] is not None and label['limit'] is not None)): |
| 191 | cnt = 1 |
| 192 | return label_total, pred_total, cnt |
| 193 | |
| 194 | |
| 195 | def eval_and_or(pred, label): |