diff --git a/requirements.txt b/requirements.txt index a112f431b194f6d531851b7091d17ed48d9354a8..4608003cbc7d985b0f0c0846c5266018406cfb58 100644 --- a/requirements.txt +++ b/requirements.txt @@ -8,7 +8,6 @@ requests six >= 1.14.0 matplotlib pandas -multiprocess packaging x2paddle rarfile diff --git a/visualdl/component/profiler/profiler_reader.py b/visualdl/component/profiler/profiler_reader.py index 78ae15229f83ef7f34c85391423253d5d5ab3e12..7b97a12906db3d4c0840bc98eccb9ab42336f1ef 100644 --- a/visualdl/component/profiler/profiler_reader.py +++ b/visualdl/component/profiler/profiler_reader.py @@ -14,12 +14,12 @@ # ======================================================================= import os import re +from multiprocessing import Process +from multiprocessing import Queue from threading import Lock from threading import Thread import packaging.version -from multiprocess import Process -from multiprocess import Queue from .parser.const_description import * # noqa: F403 from .parser.event_node import load_profiler_json diff --git a/visualdl/server/app.py b/visualdl/server/app.py index 274f8b7d9c28aa31e6c580ffd4f8963609f7d4a5..3e556bd2d9ddc0435a80a5217d51da5438146f65 100644 --- a/visualdl/server/app.py +++ b/visualdl/server/app.py @@ -17,6 +17,7 @@ import json import multiprocessing import os import re +import signal import sys import threading import time @@ -78,6 +79,9 @@ def create_app(args): # noqa: C901 lang = request.accept_languages.best_match(support_language) return lang + signal.signal( + signal.SIGINT, signal.SIG_DFL + ) # we add this to prevent SIGINT not work in multiprocess queue waiting babel = Babel(app, locale_selector=get_locale) # noqa:F841 # Babel api from flask_babel v3.0.0 api_call = create_api_call(args.logdir, args.model, args.cache_timeout)