Add common, refactor eval with eval_policy
This commit is contained in:
12
lerobot/common/utils.py
Normal file
12
lerobot/common/utils.py
Normal 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)
|
||||
Reference in New Issue
Block a user