jbilcke-hf HF staff commited on
Commit
a2c4d6f
·
verified ·
1 Parent(s): 9a3f2e6

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -367,7 +367,7 @@ class EndpointHandler:
367
  #pprint.pprint(config)
368
 
369
  try:
370
- with torch.no_grad():
371
  # Set random seeds
372
  random.seed(config.seed)
373
  np.random.seed(config.seed)
 
367
  #pprint.pprint(config)
368
 
369
  try:
370
+ with torch.inference_mode():
371
  # Set random seeds
372
  random.seed(config.seed)
373
  np.random.seed(config.seed)