Closed Ark-kun closed 5 months ago
Using load_external_modules: true
fixes Example 1 (and makes init
show up), but does not fix issues and errors with Examples 2 or 3.
Hi @Ark-kun, thanks for the report.
You're missing an __init__.py
module in vertexai/tuning
. Griffe therefore considers its submodules not to be importable, see https://github.com/mkdocstrings/griffe/blob/e5572d2eb1dd8dbe8f9b43b33119bd9becc4a4d9/src/griffe/loader.py#L593.
You can see this debug log with the following command:
griffe dump vertexai -o/dev/null -LDEBUG
...which will show you a few other places potentially missing an __init__.py
module :slightly_smiling_face:
Closing for now, let me know if adding __init__
modules doesn't solve your issue.
Description of the bug
We commonly re-export members from other modules. Most submodules like that work fine (e.g.
vertexai.generative_models
orvertexai.preview.generative_models
). However, I've noticed that our main module (vertexai
) showed no members (despite them having docstrings). Later I found another problematic module (vertexai.preview.tuning
).I've tried to force
mkdocstrings
to show the missing member by pointing to that member and gotAliasResolutionError
.An example of a re-export: https://github.com/googleapis/python-aiplatform/blob/main/vertexai/__init__.py
To Reproduce
Example 1:
Contents of
docs/index.md
Error:
Example 2:
Contents of
docs/index.md
Error:
Example 3:
Contents of
docs/index.md
Error:
Expected behavior
I expect the exception to not occur.
Environment information