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

Tracking Issue: JAX Type Annotations #12049

Closed
jakevdp opened this issue Aug 22, 2022 · 2 comments
Closed

Tracking Issue: JAX Type Annotations #12049

jakevdp opened this issue Aug 22, 2022 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@jakevdp
Copy link
Collaborator

jakevdp commented Aug 22, 2022

This is an issue to track progress on JAX Type Annotations.

For information, see the Type Annotation Roadmap, added in #11859

@hawkinsp hawkinsp added the enhancement New feature or request label Aug 23, 2022
@jakevdp
Copy link
Collaborator Author

jakevdp commented Jan 11, 2023

jax.Array is lacking a number of attributes that are defined on the array implementation. Here's a list (found by importing the contents of basearray.pyi and running set(dir(jnp.arange(10)) - set(dir(basearray.Array)) and then removing properties and private attributes)

{
 'addressable_data',
 'block_until_ready',
 'broadcast',
 'broadcast_in_dim',
 'copy_to_host_async',
 'delete',
 'device',
 'device_buffer',
 'device_buffers',
 'devices',
 'flat',
 'global_shards',
 'is_deleted',
 'is_fully_addressable',
 'is_fully_replicated',
 'itemsize',
 'on_device_size_in_bytes',
 'split',
 'traceback',
 'unsafe_buffer_pointer'
}

A few of these are obvious omissions (broadcast, broadcast_in_dim, itemsize, split); I've added them in #13967. 'flat' is defined but raises a NotImplementedError on both arrays and tracers; the remaining are array-only attributes and methods that we should probably define on jax.Array and return an informative error in the case of tracers.

@jakevdp
Copy link
Collaborator Author

jakevdp commented Nov 3, 2023

Closing this, since the core work is complete.

@jakevdp jakevdp closed this as completed Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants