为了保证代码在python2/3环境下的兼容性。通常会在python2 中将所有字符串转为unicode处理。导致一下两处检查无法通过。
Paddle/python/paddle/fluid/transpiler/distribute_transpiler.py
Line 411 in 853f2e5
| | ifisinstance(trainers, str): |
Paddle/python/paddle/fluid/transpiler/distribute_transpiler.py
Line 599 in 853f2e5
| | assert (isinstance(trainers, str)) |
建议将此两处修改为.
isinstance(trainers, six.string_types):
1条答案
按热度按时间h7appiyu1#
附PR #23131