提交 2827b590 编写于 作者: R risemeup1 提交者: GitHub

Revert "fix _message of protobuf (#49673)"

This reverts commit 7fe44feb.
上级 5e1185de
...@@ -22,12 +22,6 @@ from paddle.distributed.fleet.utils.log_util import logger ...@@ -22,12 +22,6 @@ from paddle.distributed.fleet.utils.log_util import logger
from paddle.fluid.framework import _global_flags from paddle.fluid.framework import _global_flags
from paddle.fluid.wrapped_decorator import wrap_decorator 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__ = [] __all__ = []
non_auto_func_called = True non_auto_func_called = True
...@@ -2503,7 +2497,7 @@ class DistributedStrategy: ...@@ -2503,7 +2497,7 @@ class DistributedStrategy:
for ff in config_fields: for ff in config_fields:
if isinstance( if isinstance(
getattr(my_configs, ff.name), getattr(my_configs, ff.name),
_message.RepeatedScalarContainer, google.protobuf.pyext._message.RepeatedScalarContainer,
): ):
values = getattr(my_configs, ff.name) values = getattr(my_configs, ff.name)
for i, v in enumerate(values): for i, v in enumerate(values):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册