33 Commits

Author SHA1 Message Date
Jake VanderPlas
de3191fab3 Cleanup: fix unused imports & mark exported names 2024-10-16 17:42:41 -07:00
Peter Hawkins
c756d9b703 Fix error in debugger tests that is showing up in CI.
I'm unsure why this started happening now, but sometimes we get an
invalid offset for a frame. Be tolerant of that case.
2024-09-18 15:44:45 +00:00
jax authors
fad2c0e315 Merge pull request #20858 from rajasekharporeddy:doc_typos
PiperOrigin-RevId: 628061707
2024-04-25 06:58:27 -07:00
rajasekharporeddy
aaddba0c20 Fix doc Typos 2024-04-22 10:32:51 +05:30
Sergei Lebedev
35136851f2 Import web_pdb lazily
This ensures that `import jax` is not affected by `web_pdb` being installed.

Note that I also added an atexit handler closing the active `web_pdb`
consoles. This is strictly speaking not necessary, as the server powering
the console is running in a daemon thread, but nice-to-have anyway.
2024-04-16 17:22:11 +01:00
Patrick Kidger
c1d1be00a6 jax.debug.breakpoint now supports being DCE'd. Drive-by: fix #16186 2023-07-31 15:36:43 -07:00
Peter Hawkins
319ab98980 Apply pyupgrade --py39-plus.
Notable changes:
* use PEP 585 type names
* use PEP 604 type union syntax where `from __future__ import annotations` is present.
* use f-strings in more places.
* remove redundant arguments to open().
2023-07-21 14:49:44 -04:00
Peter Hawkins
816ba91263 Use lower-case PEP 585 names for types.
Issue https://github.com/google/jax/issues/16537

PiperOrigin-RevId: 542969282
2023-06-23 15:12:14 -07:00
Cambridge Yang
689ffa6f7e set cli debugger use_rawinput to True if optional stdin is not provided. This enables the use of arrow keys in the jdb prompt. 2023-02-27 01:57:38 -05:00
Peter Hawkins
cd0533cab0 Replace uses of jnp.ndarray with jax.Array inside JAX.
PiperOrigin-RevId: 509939691
2023-02-15 14:53:00 -08:00
Roy Frostig
cb8dcce2fe migrate more internal dependencies from jax.core to jax._src.core
PiperOrigin-RevId: 509736368
2023-02-14 23:01:11 -08:00
Jake VanderPlas
4389216d0c Remove typing_extensions dependency 2022-12-05 15:42:26 -08:00
Jake VanderPlas
7f89fd40a2 Cleanup: remove unused imports in private modules
Also improve our flake8 filter rules to avoid ignoring these.
2022-10-20 14:37:21 -07:00
Sharad Vikram
07e1144af0 Make webpdb debugger lower priority 2022-10-11 12:38:52 -07:00
Peter Hawkins
ba557d5e1b Change JAX's copyright attribution from "Google LLC" to "The JAX Authors.".
See https://opensource.google/documentation/reference/releasing/contributions#copyright for more details.

PiperOrigin-RevId: 476167538
2022-09-22 12:27:19 -07:00
jax authors
840c96692e Internal change
PiperOrigin-RevId: 468509799
2022-08-18 11:39:07 -07:00
Peter Hawkins
1e241dcf16 Catch ModuleNotFoundError instead of ImportError.
We frequently use the pattern
try:
  import m
except ImportError:
  # do something else.

This suppresses errors when the module can be found but does not import
successfully for any reason. Instead, catch only ModuleNotFoundError so
missing modules are allowed but buggy modules still report errors.
2022-08-18 15:22:49 +00:00
Sharad Vikram
18f164ff1c Try flattening the locals/globals dict in the debugger and have a
fallback if it fails
2022-08-09 12:31:33 -07:00
Sharad Vikram
c34aa3933f Various debugger improvements
- disables globals
- can opt out of filtering frames
- can limit number of frames
2022-08-08 19:54:29 -07:00
Sharad Vikram
9a989573fc Fix debugger scope issue 2022-08-02 10:38:34 -07:00
jax authors
6cffa720e7 Merge pull request #11670 from sharadmv:debugging-docs
PiperOrigin-RevId: 464145832
2022-07-29 13:26:56 -07:00
Sharad Vikram
decdca60c8 Change jaxdb->jdb and add option to force a backend 2022-07-29 12:51:27 -07:00
jax authors
80eb641f6a Internal change
PiperOrigin-RevId: 464052046
2022-07-29 04:47:14 -07:00
jax authors
560c936a46 Merge pull request #11653 from sharadmv:debugging-docs
PiperOrigin-RevId: 463988525
2022-07-28 20:26:25 -07:00
Sharad Vikram
4386a0f909 Add debugging tools under jax.debug and documentation
Co-authored-by: Matthew Johnson <mattjj@google.com>
Co-authored-by: Lena Martens <lenamartens@google.com>
2022-07-28 20:07:26 -07:00
Sharad Vikram
547d021157 Enable compatibility with older versions of web_pdb 2022-07-27 18:21:44 -07:00
Sharad Vikram
d57d6fcee5 Add webpdb option 2022-07-27 14:55:31 -07:00
jax authors
6eedb20381 Merge pull request #11615 from sharadmv:debug-commands
PiperOrigin-RevId: 463375615
2022-07-26 10:49:00 -07:00
Sharad Vikram
80ec269223 Fix debugger linenumbers 2022-07-26 10:11:10 -07:00
Sharad Vikram
436e9dd09b Add help docstrings for debugger
Refactor colab debugger to use more from base class
2022-07-26 10:07:42 -07:00
Sharad Vikram
09fd173a3e Add colab debugger 2022-07-18 22:03:27 -07:00
Sharad Vikram
7f8378e0db Refactor debugger to have a registry 2022-07-12 17:44:37 -07:00
Sharad Vikram
e8bd71b31c Add JAX debugger 2022-06-29 10:08:58 -07:00