(seed)
| 88 | print(e) |
| 89 | |
| 90 | def seed_everything(seed): |
| 91 | torch.manual_seed(seed) |
| 92 | torch.cuda.manual_seed(seed) |
| 93 | np.random.seed(seed) |
| 94 | random.seed(seed) |
| 95 | torch.backends.cudnn.benchmark = False |
| 96 | torch.backends.cudnn.deterministic = True |
| 97 | torch.cuda.manual_seed_all(seed) |
| 98 | |
| 99 | if __name__ == '__main__': |
| 100 | # input format: {"prompt": "xxx", "plan": "xxx", ...} |