Fixed corrupted default values in documentation#7148
Merged
ssheorey merged 6 commits intoisl-org:mainfrom Mar 8, 2025
Merged
Conversation
joseph-sch
approved these changes
Jan 27, 2025
Contributor
joseph-sch
left a comment
There was a problem hiding this comment.
Looks great to me :-)
ssheorey
approved these changes
Mar 8, 2025
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Type
Motivation and Context
Devices in default values cause corrupted rendering in the documentation as shown in #7147.
The reason is that
o3d.core.Device.__repr__returns a string like this:CPU:0.Sphinx docs generation seems to misinterpret
:in default values.Also, I found a similar problem with the enum VoxelPoolingMode.

The raw enum value also contains a
:and causes faulty documentation.I found a similar issue here: sphinx-doc/sphinx#9266
Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
In order to fix this, I changed
o3d.core.Device.__repr__.Instead of
CPU:0it now returnsDevice("CPU", 0)(which is now also correct Python code).I fixed the VoxelPoolingMode issue using

py::arg_vto define the Python representation explicitly.I marked this as a breaking change because it changes the output of
o3d.core.Device.__repr__.Also, I fixed some minor typos, added mentioning of
SYCLin some error messages and added the missing Python binding forDeviceType.SYCL.