mirror of
https://github.com/theroyallab/tabbyAPI.git
synced 2026-04-20 14:28:54 +00:00
Main: Remove uvloop/winloop from experimental status
Uvloop/Winloop does provide advantages to asyncio vs the standard Proactor loop, so remove experimental status. Signed-off-by: kingbri <8082010+kingbri1@users.noreply.github.com>
This commit is contained in:
20
main.py
20
main.py
@@ -106,6 +106,14 @@ def entrypoint(arguments: Optional[dict] = None):
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
signal.signal(signal.SIGTERM, signal_handler)
|
||||
|
||||
if platform.system() == "Windows":
|
||||
from winloop import install
|
||||
else:
|
||||
from uvloop import install
|
||||
|
||||
# Set loop event policy
|
||||
install()
|
||||
|
||||
# Parse and override config from args
|
||||
if arguments is None:
|
||||
parser = init_argparser()
|
||||
@@ -133,18 +141,6 @@ def entrypoint(arguments: Optional[dict] = None):
|
||||
os.environ["PYTORCH_CUDA_ALLOC_CONF"] = "backend:cudaMallocAsync"
|
||||
logger.warning("EXPERIMENTAL: Enabled the pytorch CUDA malloc backend.")
|
||||
|
||||
# Use Uvloop/Winloop
|
||||
if config.developer.uvloop:
|
||||
if platform.system() == "Windows":
|
||||
from winloop import install
|
||||
else:
|
||||
from uvloop import install
|
||||
|
||||
# Set loop event policy
|
||||
install()
|
||||
|
||||
logger.warning("EXPERIMENTAL: Running program with Uvloop/Winloop.")
|
||||
|
||||
# Set the process priority
|
||||
if config.developer.realtime_process_priority:
|
||||
import psutil
|
||||
|
||||
Reference in New Issue
Block a user