File size: 658 Bytes
5fa1a76
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
To get identical reproducible results set, you
will need to fix the seed:
thon
seed = 42
python RNG
import random
random.seed(seed)
pytorch RNGs
import torch
torch.manual_seed(seed)
torch.backends.cudnn.deterministic = True
if torch.cuda.is_available():
    torch.cuda.manual_seed_all(seed)
numpy RNG
import numpy as np
np.random.seed(seed)
tf RNG
tf.random.set_seed(seed)

Debugging tests
To start a debugger at the point of the warning, do this:

pytest tests/utils/test_logging.py -W error::UserWarning --pdb
Working with github actions workflows
To trigger a self-push workflow CI job, you must:

Create a new branch on transformers origin (not a fork!).