mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[BugFix] fix work metrics not returned by metrics api (#4912)
* [BugFix] fix work metrics not returned by metrics api * [fix] fix conflict * [fix] fix ci
This commit is contained in:
@@ -17,11 +17,20 @@
|
||||
import os
|
||||
import subprocess
|
||||
import sys
|
||||
import uuid
|
||||
|
||||
# suppress warning log from paddlepaddle
|
||||
os.environ["GLOG_minloglevel"] = "2"
|
||||
# suppress log from aistudio
|
||||
os.environ["AISTUDIO_LOG"] = "critical"
|
||||
# set prometheus dir
|
||||
if os.getenv("PROMETHEUS_MULTIPROC_DIR", "") == "":
|
||||
prom_dir = f"/tmp/fd_prom_{str(uuid.uuid4())}"
|
||||
os.environ["PROMETHEUS_MULTIPROC_DIR"] = prom_dir
|
||||
if os.path.exists(prom_dir):
|
||||
os.rmdir(prom_dir)
|
||||
os.mkdir(prom_dir)
|
||||
|
||||
import typing
|
||||
|
||||
from paddleformers.utils.log import logger as pf_logger
|
||||
|
||||
Reference in New Issue
Block a user