From 2827b5901de83fb4a40238b78ad0456e6910e885 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Thu, 2 Mar 2023 16:01:02 +0800 Subject: [PATCH] Revert "fix _message of protobuf (#49673)" This reverts commit 7fe44feb415cbdf880bf89a6cf0174ec2c8ee696. --- .../paddle/distributed/fleet/base/distributed_strategy.py | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/python/paddle/distributed/fleet/base/distributed_strategy.py b/python/paddle/distributed/fleet/base/distributed_strategy.py index 32785a084f201..fbe391b45f055 100755 --- a/python/paddle/distributed/fleet/base/distributed_strategy.py +++ b/python/paddle/distributed/fleet/base/distributed_strategy.py @@ -22,12 +22,6 @@ from paddle.fluid.framework import _global_flags from paddle.fluid.wrapped_decorator import wrap_decorator -protobuf_version = google.protobuf.__version__ -if protobuf_version >= "4.21.0": - import google._upb._message as _message -else: - import google.protobuf.pyext._message as _message - __all__ = [] non_auto_func_called = True @@ -2503,7 +2497,7 @@ def __repr__(self): for ff in config_fields: if isinstance( getattr(my_configs, ff.name), - _message.RepeatedScalarContainer, + google.protobuf.pyext._message.RepeatedScalarContainer, ): values = getattr(my_configs, ff.name) for i, v in enumerate(values):