Closed ringohoffman closed 8 months ago
Thanks! Moving all the py::class_
declarations to the top was a super easy fix.
By the way... I did see something that might be unexpected. Kernel
resolved correctly in a different method of this same class, but in the Callable
, Kernel
is left fully specified.
class Program:
def compile_kernel(self, arg0: CompileConfig, arg1: DeviceCapabilityConfig, arg2: Kernel) -> CompiledKernelData:
...
def create_kernel(self, arg0: typing.Callable[[taichi._lib.core.taichi_python.Kernel], None], arg1: str, arg2: AutodiffMode) -> Kernel:
...
What could be causing this, do you think?
Could you share the corresponding functions docstrings?
I'm not sure what you mean by docstring.
Here is the declaration of create_kernel
. It looks like a lambda function. Could that be the source of the issue?
Here is compile_kernel
.
I mean the runtime __doc__
property, e.g. Program.compile_kernel.__doc__
'compile_kernel(self: taichi._lib.core.taichi_python.Program, arg0: taichi._lib.core.taichi_python.CompileConfig, arg1: taichi._lib.core.taichi_python.DeviceCapabilityConfig, arg2: taichi._lib.core.taichi_python.Kernel) -> taichi._lib.core.taichi_python.CompiledKernelData\n'
'create_kernel(self: taichi._lib.core.taichi_python.Program, arg0: Callable[[taichi._lib.core.taichi_python.Kernel], None], arg1: str, arg2: taichi._lib.core.taichi_python.AutodiffMode) -> taichi._lib.core.taichi_python.Kernel\n'
When I run
pybind11-stubgen
ontaichi
,It seems to fail on expressions that do have corresponding
pybind11-stubgen
-generated class definitions. For example:Is this a problem in my configuration?