34
34
from compiler_opt .rl import corpus
35
35
from compiler_opt .rl import policy_saver
36
36
37
- _COMPILATION_TIMEOUT = flags .DEFINE_integer (
37
+ COMPILATION_TIMEOUT = flags .DEFINE_integer (
38
38
'compilation_timeout' , 60 ,
39
39
'Max duration (in seconds) after which we cancel any compilation job.' )
40
40
_QUIET = flags .DEFINE_bool (
@@ -341,7 +341,6 @@ def __init__(self,
341
341
clang_path : Optional [str ] = None ,
342
342
launcher_path : Optional [str ] = None ,
343
343
moving_average_decay_rate : float = 1 ,
344
- compilation_timeout = None ,
345
344
create_observer_fns : Optional [List [Callable [
346
345
[], CompilationResultObserver ]]] = None ):
347
346
"""Initialization of CompilationRunner class.
@@ -361,8 +360,7 @@ def __init__(self,
361
360
self ._launcher_path = launcher_path
362
361
self ._moving_average_decay_rate = moving_average_decay_rate
363
362
# Avoid reading the flag during the first interpretation of this module.
364
- self ._compilation_timeout = (
365
- compilation_timeout or _COMPILATION_TIMEOUT .value )
363
+ self ._compilation_timeout = COMPILATION_TIMEOUT .value
366
364
self ._cancellation_manager = WorkerCancellationManager ()
367
365
self ._observers = ([f () for f in create_observer_fns ]
368
366
if create_observer_fns else [])
0 commit comments