mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2026-02-27 00:36:02 +08:00
visualize_reconstruction fixes
Summary: Various fixes to get visualize_reconstruction running, and an interactive test for it. Reviewed By: kjchalup Differential Revision: D39286691 fbshipit-source-id: 88735034cc01736b24735bcb024577e6ab7ed336
This commit is contained in:
committed by
Facebook GitHub Bot
parent
34ad77b841
commit
6e25fe8cb3
@@ -6,6 +6,7 @@
|
||||
|
||||
import contextlib
|
||||
import logging
|
||||
import os
|
||||
import re
|
||||
|
||||
|
||||
@@ -28,3 +29,12 @@ def intercept_logs(logger_name: str, regexp: str):
|
||||
yield intercepted_messages
|
||||
finally:
|
||||
logger.removeFilter(interceptor)
|
||||
|
||||
|
||||
def interactive_testing_requested() -> bool:
|
||||
"""
|
||||
Certain tests are only useful when run interactively, and so are not regularly run.
|
||||
These are activated by this funciton returning True, which the user requests by
|
||||
setting the environment variable `PYTORCH3D_INTERACTIVE_TESTING` to 1.
|
||||
"""
|
||||
return os.environ.get("PYTORCH3D_INTERACTIVE_TESTING", "") == "1"
|
||||
|
||||
Reference in New Issue
Block a user