(seed)
| 26 | return '-'.join(x) |
| 27 | |
| 28 | def set_seed(seed): |
| 29 | random.seed(seed) |
| 30 | np.random.seed(seed) |
| 31 | torch.manual_seed(seed) |
| 32 | if torch.cuda.is_available(): |
| 33 | torch.cuda.manual_seed(seed) |
| 34 | torch.cuda.manual_seed_all(seed) # if you are using multi-GPU. |
| 35 | # torch.backends.cudnn.deterministic = True |
| 36 | # torch.backends.cudnn.benchmark = False |
| 37 | |
| 38 | def main( |
| 39 | base_model: str = "", |