diff --git a/neural_compressor/utils/utility.py b/neural_compressor/utils/utility.py index ff699cfaf7f..0c9e2d828a5 100644 --- a/neural_compressor/utils/utility.py +++ b/neural_compressor/utils/utility.py @@ -136,7 +136,9 @@ def _singleton(*args, **kw): def time_limit(seconds): """Limit the time for context execution.""" if seconds == 0: - seconds = threading.TIMEOUT_MAX + #seconds = threading.TIMEOUT_MAX + # TODO WA for fixed the crash for py 3.11.3 + seconds = 3600 * 24 * 365 timer = threading.Timer(seconds, lambda: _thread.interrupt_main()) timer.start() try: