-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
ENH: Make __module__
attribute coherent across API
#27716
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Looks good to me overall so far, thanks for pushing this forward @mtsokol.
To clarify since "originates" could be misunderstood: each function is available in the public API from a single namespace (on rare occasions, some object may be exposed in 2 places still), and we want to ensure that |
bad2336
to
b302b5b
Compare
__module__
attribute coherent across API__module__
attribute coherent across API
b302b5b
to
88cbe51
Compare
Ok, I think it's ready for reviews. Some comments:
|
__module__
attribute coherent across API__module__
attribute coherent across API
377730a
to
c13ca1b
Compare
c13ca1b
to
629f2c6
Compare
Ouch, that is bad. In NumPy 1.26 the attribute did contain |
When we discussed this at the triage meeting, we recommended an approach to consider the cython-generated code in a separate PR |
Thanks @mtsokol. We can adjust this as needed going forward. Hopefully we will find a way to se the cython-generated code in random's |
Hi!
As described in pytorch/pytorch#136559
__module__
is incoherent across Python API. I think by definition, function's__module__
attribute should return the name of the module that this function originates from.