[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:
Yonghua Li
2025-11-25 19:12:29 +08:00
committed by GitHub
parent b9bdf82ce3
commit 09379183e2
3 changed files with 28 additions and 28 deletions
+9
View File
@@ -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