mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2026-04-23 00:17:25 +08:00
[Feature]Report FD statistical information (#5646)
* add usage commit * update envs and xpu * add requirements * fix quantization value * add unit test * add unit test * fix unit test * add unit test * add unit test * add unit test * add unit test * add unit test * add unit test * fix FD_USAGE_STATS_SERVER * fix * fix * add doc * add doc * add doc * add doc * add doc * fix file name
This commit is contained in:
@@ -27,6 +27,7 @@ from fastdeploy.config import FDConfig
|
||||
from fastdeploy.engine.request import Request
|
||||
from fastdeploy.platforms import current_platform
|
||||
from fastdeploy.plugins.model_runner import load_model_runner_plugins
|
||||
from fastdeploy.usage.usage_lib import report_usage_stats
|
||||
from fastdeploy.utils import get_logger, set_random_seed
|
||||
from fastdeploy.worker.model_runner_base import ModelRunnerBase
|
||||
from fastdeploy.worker.output import ModelRunnerOutput
|
||||
@@ -79,6 +80,9 @@ class GpuWorker(WorkerBase):
|
||||
else:
|
||||
raise RuntimeError(f"Not support device type: {self.device_config.device}")
|
||||
|
||||
if self.local_rank == 0:
|
||||
report_usage_stats(self.fd_config)
|
||||
|
||||
set_random_seed(self.fd_config.model_config.seed)
|
||||
# Construct model runner
|
||||
self.model_runner: ModelRunnerBase = ModelRunner(
|
||||
|
||||
Reference in New Issue
Block a user