diff --git a/pytorch3d/implicitron/tools/config.py b/pytorch3d/implicitron/tools/config.py index 431be1a5..821155a2 100644 --- a/pytorch3d/implicitron/tools/config.py +++ b/pytorch3d/implicitron/tools/config.py @@ -903,13 +903,17 @@ def expand_args_fields( processed_members.update(base._processed_members) to_process: List[Tuple[str, Type, _ProcessType]] = [] - if "__annotations__" in some_class.__dict__: - for name, type_ in some_class.__annotations__.items(): - underlying_and_process_type = _get_type_to_process(type_) - if underlying_and_process_type is None: - continue - underlying_type, process_type = underlying_and_process_type - to_process.append((name, underlying_type, process_type)) + # Only this class's own annotations, never a base's. Reading + # some_class.__dict__["__annotations__"] used to express that, but under + # PEP 649 the entry is not in the class dict until something materializes + # it, so on 3.14 the lookup silently found nothing and no member was + # processed at all. + for name, type_ in inspect.get_annotations(some_class).items(): + underlying_and_process_type = _get_type_to_process(type_) + if underlying_and_process_type is None: + continue + underlying_type, process_type = underlying_and_process_type + to_process.append((name, underlying_type, process_type)) for name, underlying_type, process_type in to_process: processed_members[name] = some_class.__annotations__[name]