From 021399f7c99e6e03e7b7900fa8e772b6e54fcfd6 Mon Sep 17 00:00:00 2001 From: Jiang-Jia-Jun <163579578+Jiang-Jia-Jun@users.noreply.github.com> Date: Tue, 16 Dec 2025 13:55:27 +0800 Subject: [PATCH] =?UTF-8?q?Revert=20"[Feature]=20Use=20`paddle.compat.enab?= =?UTF-8?q?le=5Ftorch=5Fproxy`=20in=20`fastdeploy/=5F=5Fini=E2=80=A6"=20(#?= =?UTF-8?q?5579)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit ff45ac078eb41316353fc9a21acfff27826352f4. --- fastdeploy/__init__.py | 14 -------------- requirements.txt | 1 + 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/fastdeploy/__init__.py b/fastdeploy/__init__.py index 4e6343f8c..2e9b49d00 100644 --- a/fastdeploy/__init__.py +++ b/fastdeploy/__init__.py @@ -31,8 +31,6 @@ if os.getenv("PROMETHEUS_MULTIPROC_DIR", "") == "": import typing -import paddle - # first import prometheus setup to set PROMETHEUS_MULTIPROC_DIR # otherwise, the Prometheus package will be imported first, # which will prevent correct multi-process setup @@ -42,24 +40,12 @@ from fastdeploy.metrics.prometheus_multiprocess_setup import ( setup_multiprocess_prometheus() - from paddleformers.utils.log import logger as pf_logger from fastdeploy.engine.sampling_params import SamplingParams from fastdeploy.entrypoints.llm import LLM from fastdeploy.utils import current_package_version, envs -paddle.compat.enable_torch_proxy(scope={"triton"}) -# paddle.compat.enable_torch_proxy(scope={"triton"}) enables the torch proxy -# specifically for the 'triton' module. This means `import torch` inside 'triton' -# will actually import paddle's compatibility layer (acting as torch). -# -# 'scope' acts as an allowlist. To add other modules, you can do: -# paddle.compat.enable_torch_proxy(scope={"triton", "new_module"}) -# -# Note: Ensure that any torch APIs used in 'new_module' are already implemented in Paddle. - - if envs.FD_DEBUG != 1: import logging diff --git a/requirements.txt b/requirements.txt index 4cac619c4..50f95e00a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -26,6 +26,7 @@ prometheus-client decord moviepy triton +use-triton-in-paddle crcmod msgpack gunicorn