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.
GPyTorch
Module
class defines a custom__getattr__
method that used to serve a purpose, but now only callssuper().__getattr__
. This leads to deepening of stack trace and can cause mild confusion. Since it is a no-op, removing it seems like the right move to me.Aside: First calling
__getattr__
then falling back to__getattribute__
is a bit strange on its own. Python first calls__getattribute__
and if an attribute is not found__getattr__
is invoked, in case there's some custom logic. Looking at the changelog, it seems like__getattribute__
was called using somebase_name
when this wasn't a no-op, so it's probably a relic from those times.