From f06391a1f43a56a26f28749d9272eae50d56d5f3 Mon Sep 17 00:00:00 2001 From: SigureMo Date: Mon, 25 Mar 2024 04:30:48 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A5=20chore:=20cleanup=20compat=20and?= =?UTF-8?q?=20common=5Fops=5Fimport?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- paddle-stubs/common_ops_import.pyi | 25 ------------------------- paddle-stubs/compat.pyi | 14 -------------- paddle-stubs/pir/math_op_patch.py | 3 +-- 3 files changed, 1 insertion(+), 41 deletions(-) delete mode 100644 paddle-stubs/common_ops_import.pyi delete mode 100644 paddle-stubs/compat.pyi diff --git a/paddle-stubs/common_ops_import.pyi b/paddle-stubs/common_ops_import.pyi deleted file mode 100644 index 2f865e2..0000000 --- a/paddle-stubs/common_ops_import.pyi +++ /dev/null @@ -1,25 +0,0 @@ -from __future__ import annotations - -from paddle.base import core as core -from paddle.base import dygraph_utils as dygraph_utils -from paddle.base.core import VarDesc as VarDesc -from paddle.base.data_feeder import check_dtype as check_dtype -from paddle.base.data_feeder import check_type as check_type -from paddle.base.data_feeder import check_variable_and_dtype as check_variable_and_dtype -from paddle.base.data_feeder import convert_dtype as convert_dtype -from paddle.base.framework import OpProtoHolder as OpProtoHolder -from paddle.base.framework import Variable as Variable -from paddle.base.framework import ( - convert_np_dtype_to_dtype_ as convert_np_dtype_to_dtype_, -) -from paddle.base.framework import default_main_program as default_main_program -from paddle.base.framework import device_guard as device_guard -from paddle.base.framework import dygraph_only as dygraph_only -from paddle.base.initializer import Constant as Constant -from paddle.base.layer_helper import LayerHelper as LayerHelper -from paddle.base.layers import fill_constant as fill_constant -from paddle.base.layers import scale as scale -from paddle.base.layers import utils as utils -from paddle.base.layers.layer_function_generator import templatedoc as templatedoc -from paddle.base.param_attr import ParamAttr as ParamAttr -from six.moves import reduce as reduce diff --git a/paddle-stubs/compat.pyi b/paddle-stubs/compat.pyi deleted file mode 100644 index d0d3e99..0000000 --- a/paddle-stubs/compat.pyi +++ /dev/null @@ -1,14 +0,0 @@ -from __future__ import annotations - -from typing import Any - -# This module will be removed in PaddlePaddle 2.5.0. - -int_type = int -long_type = int - -def to_text(obj: Any, encoding: str = ..., inplace: bool = ...): ... -def to_bytes(obj: Any, encoding: str = ..., inplace: bool = ...): ... -def round(x: Any, d: int = ...): ... -def floor_division(x: Any, y: Any): ... -def get_exception_message(exc: Any): ... diff --git a/paddle-stubs/pir/math_op_patch.py b/paddle-stubs/pir/math_op_patch.py index ec6c822..13e53a8 100644 --- a/paddle-stubs/pir/math_op_patch.py +++ b/paddle-stubs/pir/math_op_patch.py @@ -1,5 +1,4 @@ from __future__ import annotations -def monkey_patch_opresult(): - ... +def monkey_patch_value(): ...