-
Notifications
You must be signed in to change notification settings - Fork 483
Open
Description
Description
The custom Logger class in logger.py is missing the warning() method, which causes an AttributeError when api.py attempts to call it.
Error Message
AttributeError: 'Logger' object has no attribute 'warning'
Stack Trace
File "src/depth_anything_3/api.py", line 334, in _align_to_input_extrinsics_intrinsics
logger.warning(
^^^^^^^^^^^^^^
AttributeError: 'Logger' object has no attribute 'warning'
Root Cause
In api.py line 334, the code calls logger.warning():
logger.warning(
"Pose alignment failed due to insufficient camera motion. "
"Using model-estimated poses and relative depth."
)However, the Logger class in logger.py only defines warn(), not warning():
def warn(self, *args, **kwargs):
self.log("WARN:", *args, **kwargs)Suggested Fix
Add a warning() method as an alias to warn() in the Logger class to match Python's standard logging module interface:
def warning(self, *args, **kwargs):
"""Alias for warn() to match standard logging interface."""
self.warn(*args, **kwargs)Environment
- Using the inference API with external extrinsics/intrinsics alignment
- Error occurs when pose alignment fails due to insufficient camera motion
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels