lvwerra HF staff commited on
Commit
d066a9f
1 Parent(s): cb2b45f

Update python_interpreter_tool.py

Browse files
Files changed (1) hide show
  1. python_interpreter_tool.py +4 -3
python_interpreter_tool.py CHANGED
@@ -99,9 +99,10 @@ def reliability_guard(maximum_memory_bytes=None):
99
  builtins.quit = None
100
 
101
  import os
102
-
103
- os.environ["OMP_NUM_THREADS"] = "1"
104
-
 
105
  os.kill = None
106
  os.system = None
107
  os.putenv = None
 
99
  builtins.quit = None
100
 
101
  import os
102
+ try:
103
+ os.environ["OMP_NUM_THREADS"] = "1"
104
+ except:
105
+ pass
106
  os.kill = None
107
  os.system = None
108
  os.putenv = None