(examples)
| 170 | |
| 171 | |
| 172 | def _get_unique_examples(examples): |
| 173 | seen_examples, res = set(), [] |
| 174 | for example in examples: |
| 175 | example_string = json.dumps(example) |
| 176 | if example_string not in seen_examples: |
| 177 | res.append(example) |
| 178 | seen_examples.add(example_string) |
| 179 | return res |
| 180 | |
| 181 | |
| 182 | def _argmax(array): |