Given all records from a single (dataset, algorithm, test env) pair, return a sorted list of (run_acc, records) tuples.
(self, records)
| 25 | |
| 26 | @classmethod |
| 27 | def hparams_accs(self, records): |
| 28 | """ |
| 29 | Given all records from a single (dataset, algorithm, test env) pair, |
| 30 | return a sorted list of (run_acc, records) tuples. |
| 31 | """ |
| 32 | return (records.group('args.hparams_seed') |
| 33 | .map(lambda _, run_records: |
| 34 | ( |
| 35 | self.run_acc(run_records), |
| 36 | run_records |
| 37 | ) |
| 38 | ).filter(lambda x: x[0] is not None) |
| 39 | .sorted(key=lambda x: x[0]['val_acc'])[::-1] |
| 40 | ) |
| 41 | |
| 42 | @classmethod |
| 43 | def sweep_acc(self, records): |