Spaces:
Runtime error
Runtime error
import os | |
import random | |
import numpy as np | |
import torch | |
from tasks import task_mapper | |
def setup_plain_seed(SEED): | |
os.environ["PYTHONHASHSEED"] = str(SEED) | |
random.seed(SEED) | |
np.random.seed(SEED) | |
def setup_cpu(seed): | |
os.environ["TOKENIZERS_PARALLELISM"] = "false" | |
setup_plain_seed(seed) | |
torch.manual_seed(seed) | |
torch.random.manual_seed(seed) | |