Add common, refactor eval with eval_policy

This commit is contained in:
Cadene
2024-01-31 13:48:12 +00:00
parent 1e52499490
commit 5a5b190f70
10 changed files with 1590 additions and 64 deletions

12
lerobot/common/utils.py Normal file
View File

@@ -0,0 +1,12 @@
import random
import numpy as np
import torch
def set_seed(seed):
"""Set seed for reproducibility."""
random.seed(seed)
np.random.seed(seed)
torch.manual_seed(seed)
torch.cuda.manual_seed_all(seed)