Call pybind exposed "set_attr" failed: TypeError: set_attr(): incompatible function arguments. The following argument types are supported
Created by: typhoonzero
The code is:
program.global_block().append_op(
...
attrs={
"myprogram": str(someprogram.desc.serialize_to_string()),
}
)
Full error was:
Traceback (most recent call last):
File "../python/paddle/v2/fluid/tests/book/test_recognize_digits_conv_dist.py", line 46, in <module>
pserver_prog = exe.get_pserver_program(pserver_endpoint)
File "/paddle/build/python/build/lib-python/paddle/v2/fluid/executor.py", line 132, in get_pserver_program
"GradList": [ p.name for p in self.param_grad_map[endpoint]["grads"]]
File "/paddle/build/python/build/lib-python/paddle/v2/fluid/framework.py", line 424, in append_op
op = Operator(self, op_desc, *args, **kwargs)
File "/paddle/build/python/build/lib-python/paddle/v2/fluid/framework.py", line 302, in __init__
self.desc.set_attr(attr_name, attrs[attr_name])
TypeError: set_attr(): incompatible function arguments. The following argument types are supported:
1. (self: paddle.v2.fluid.core.OpDesc, arg0: unicode, arg1: Variant) -> None
Invoked with: <paddle.v2.fluid.core.OpDesc object at 0x7f5263bcb6c0>, u'OptimizeProgram', '\n\r\x08\x00\x10\xff\xff\xff\xff\xff\xff\xff\xff\xff\x01'