Skip to content
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

Added trace alias to jnp.linalg #21442

Merged
merged 1 commit into from
May 30, 2024

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented May 27, 2024

Related to #21088

cc @Micky774

@Micky774
Copy link
Collaborator

Instead of adding an alias in the linalg source file, could we just add a direct import of the source of jnp.trace into the linalg namespace file?

@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented May 27, 2024

Instead of adding an alias in the linalg source file, could we just add a direct import of the source of jnp.trace into the linalg namespace file?

I have no strong opinion on the approach. Yes, we can do that as well. In the current approach we sort of hidden that detail into to the _src.

jax/_src/numpy/linalg.py Outdated Show resolved Hide resolved
@jakevdp jakevdp self-assigned this May 28, 2024
@vfdev-5 vfdev-5 force-pushed the added-trace-alias-to-linalg branch from 02b56d9 to 98ffb95 Compare May 29, 2024 12:04
@vfdev-5 vfdev-5 marked this pull request as ready for review May 29, 2024 12:04
@vfdev-5 vfdev-5 force-pushed the added-trace-alias-to-linalg branch from 98ffb95 to 733117a Compare May 29, 2024 12:07
jax/_src/numpy/linalg.py Outdated Show resolved Hide resolved
jax/_src/numpy/linalg.py Outdated Show resolved Hide resolved
jax/experimental/array_api/linalg.py Outdated Show resolved Hide resolved
@vfdev-5 vfdev-5 force-pushed the added-trace-alias-to-linalg branch from 733117a to 63b6851 Compare May 29, 2024 13:05
jax/_src/numpy/linalg.py Outdated Show resolved Hide resolved
jax/_src/numpy/linalg.py Outdated Show resolved Hide resolved
@vfdev-5 vfdev-5 force-pushed the added-trace-alias-to-linalg branch from 63b6851 to 0030d22 Compare May 29, 2024 16:34
Copy link
Collaborator

@jakevdp jakevdp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, just realized that this new function is missing from the docs here: https://github.com/google/jax/blob/main/docs/jax.scipy.rst#jaxscipylinalg

@vfdev-5
Copy link
Collaborator Author

vfdev-5 commented May 29, 2024

Sorry, just realized that this new function is missing from the docs here: https://github.com/google/jax/blob/main/docs/jax.scipy.rst#jaxscipylinalg

I should be missing something as I'm not sure to understand your point here. As far as I understand, there is no jax.scipy.linalg.trace function and so no docs for it.

@jakevdp
Copy link
Collaborator

jakevdp commented May 29, 2024

Sorry, I meant to point to the numpy docs: https://github.com/google/jax/blob/main/docs/jax.numpy.rst#jaxnumpylinalg

We need to add the function to that list, or it won't show up in the API docs on the website.

@vfdev-5 vfdev-5 force-pushed the added-trace-alias-to-linalg branch from 0030d22 to d2185d3 Compare May 29, 2024 22:28
@google-ml-butler google-ml-butler bot added kokoro:force-run pull ready Ready for copybara import and testing labels May 30, 2024
@copybara-service copybara-service bot merged commit ef0b5d7 into jax-ml:main May 30, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pull ready Ready for copybara import and testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants