Skip to content

Commit

Permalink
Add exception handling in docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jianyuh committed May 18, 2024
1 parent 1fc1e6a commit 6cb086a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions fbgemm_gpu/experimental/gen_ai/gen_ai/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# @manual=//deeplearning/fbgemm/fbgemm_gpu:test_utils
from fbgemm_gpu import open_source

# # pyre-ignore[21]
# # @manual=//deeplearning/fbgemm/fbgemm_gpu:test_utils
# from fbgemm_gpu.docs.version import __version__ # noqa: F401
# pyre-ignore[21]
# @manual=//deeplearning/fbgemm/fbgemm_gpu:test_utils
from fbgemm_gpu.docs.version import __version__ # noqa: F401
except Exception:
open_source: bool = False

Expand Down
12 changes: 6 additions & 6 deletions fbgemm_gpu/fbgemm_gpu/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@
# and use its existence to determine whether or not we are in OSS context
open_source: bool = True

# Trigger the manual addition of docstrings to pybind11-generated operators
import fbgemm_gpu.docs # noqa: F401, E402

# Export the version string from the version file auto-generated by setup.py
from fbgemm_gpu.docs.version import __version__ # noqa: F401, E402

try:
# Trigger the manual addition of docstrings to pybind11-generated operators
import fbgemm_gpu.docs # noqa: F401, E402

# Export the version string from the version file auto-generated by setup.py
from fbgemm_gpu.docs.version import __version__ # noqa: F401, E402

# Trigger meta operator registrations
from . import sparse_ops # noqa: F401, E402
except Exception as e:

Check failure on line 31 in fbgemm_gpu/fbgemm_gpu/__init__.py

View workflow job for this annotation

GitHub Actions / run-lint (3.11)

F841 local variable 'e' is assigned to but never used
Expand Down
5 changes: 4 additions & 1 deletion fbgemm_gpu/fbgemm_gpu/docs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,7 @@
# LICENSE file in the root directory of this source tree.

# Trigger the manual addition of docstrings to pybind11-generated operators
from . import jagged_tensor_ops, table_batched_embedding_ops # noqa: F401
try:
from . import jagged_tensor_ops, table_batched_embedding_ops # noqa: F401
except Exception as e:

Check failure on line 11 in fbgemm_gpu/fbgemm_gpu/docs/__init__.py

View workflow job for this annotation

GitHub Actions / run-lint (3.11)

F841 local variable 'e' is assigned to but never used
pass

0 comments on commit 6cb086a

Please sign in to comment.