author
int64
658
755k
date
stringdate
2012-06-12 08:34:29
2024-07-22 14:51:21
timezone
int64
-46,800
43.2k
hash
stringlengths
40
40
message
stringlengths
5
490
mods
listlengths
1
16
language
stringclasses
20 values
license
stringclasses
3 values
repo
stringlengths
5
68
original_message
stringlengths
12
491
260,335
26.05.2020 20:01:36
25,200
9f8a4ad341acc8bab52c0746102193cb7a4da2ee
remove stray print statement from
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -775,7 +775,6 @@ def frexp(x):\nint_type = _INT_DTYPES[info.bits]\nx1, x2 = _normalize_float(x)\n- print(x1, x2)\nx1 = lax.bitcast_convert_type(x1, int_type)\nx2 += ((x1 >> info.nmant) ...
Python
Apache License 2.0
google/jax
remove stray print statement from #1529
260,424
27.05.2020 08:59:31
-3,600
1cc471928b0e677149a72518dc95fa2daa47f76e
Remove pe from name_stack and test.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -167,8 +167,6 @@ class JaxprTrace(Trace):\nif (self.master.trace_type is StagingJaxprTrace\nand call_primitive in staged_out_calls):\ntracers = map(self.instantiate_...
Python
Apache License 2.0
google/jax
Remove pe from name_stack and test. (#3209)
260,485
27.05.2020 12:37:55
14,400
ec3b593ca85d6f5c3b538b6615dfbd8c8ffe8148
Added geometric distribution to scipy stats
[ { "change_type": "MODIFY", "old_path": "jax/scipy/stats/__init__.py", "new_path": "jax/scipy/stats/__init__.py", "diff": "@@ -26,3 +26,4 @@ from . import pareto\nfrom . import t\nfrom . import uniform\nfrom . import logistic\n+from . import geom\n" }, { "change_type": "ADD", "old_path": ...
Python
Apache License 2.0
google/jax
Added geometric distribution to scipy stats (#3205)
260,287
28.05.2020 17:39:13
-7,200
c1ccbdf1a7d6738bd23971aa6d2718e8ba013f86
Small cleanup for partial_eval `partial_eval` uses some pretty tricky conventions for return values (see `partial_eval_wrapper`), but it forces all call sites to deal with untangling them. This commit inlines the postprocessing into `partial_eval`, greatly simplifying its usage.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -27,7 +27,7 @@ from .. import linear_util as lu\nfrom ..abstract_arrays import ShapedArray, ConcreteArray, raise_to_shaped\nfrom ..ad_util import zero\nfrom ..util i...
Python
Apache License 2.0
google/jax
Small cleanup for partial_eval (#3210) `partial_eval` uses some pretty tricky conventions for return values (see `partial_eval_wrapper`), but it forces all call sites to deal with untangling them. This commit inlines the postprocessing into `partial_eval`, greatly simplifying its usage.
260,335
28.05.2020 10:20:36
25,200
572928dfa309e625e221fd084bd25ee010afa2eb
fix custom_jvp_call_jaxpr transpose function * make custom_jvp_call_jaxpr handle multilinear funs see * remove old comment
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -343,15 +343,11 @@ xla.initial_style_translations[custom_jvp_call_jaxpr_p] = \\\nxla.lower_fun_initial_style(_custom_jvp_call_jaxpr_impl)\n# If a (multi)linear function is defined...
Python
Apache License 2.0
google/jax
fix custom_jvp_call_jaxpr transpose function (#3231) * make custom_jvp_call_jaxpr handle multilinear funs see #3226 * remove old comment
260,366
28.05.2020 13:21:39
14,400
7c90023ddbbb598a2f34a805ac8c4b19f69b82e1
Fix sign error in custom_jvp / custom_vjp. f(x, y) = sin(x) * y. df/dy should be sin(x) instead of -sin(x).
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -118,7 +118,7 @@ class custom_jvp:\nx, y = primals\nx_dot, y_dot = tangents\nprimal_out = f(x, y)\n- tangent_out = jnp.cos(x) * x_dot * y - jnp.sin(x) * y_dot\n+ tangent_out = jnp...
Python
Apache License 2.0
google/jax
Fix sign error in custom_jvp / custom_vjp. (#3213) (#3219) f(x, y) = sin(x) * y. df/dy should be sin(x) instead of -sin(x).
260,280
28.05.2020 17:16:56
10,800
e48a4e012bd253428e3bb0dd4ac5b163439a5270
uses np.prod instead of jnp.prod for shapes
[ { "change_type": "MODIFY", "old_path": "tests/host_callback_test.py", "new_path": "tests/host_callback_test.py", "diff": "@@ -554,7 +554,7 @@ where: 10\nif jtu.device_under_test() == \"tpu\":\nif dtype in (jnp.int16,):\nraise SkipTest(f\"transfering {dtype} not supported on TPU\")\n- args = [jnp.ara...
Python
Apache License 2.0
google/jax
uses np.prod instead of jnp.prod for shapes (#3236)
260,411
29.05.2020 12:54:09
-10,800
5b684fc695258c03ea5e04230e08f82ae4540ffc
Attempt to fix error in google3 import See
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1152,8 +1152,11 @@ def squeeze(a, axis: Union[int, Tuple[int, ...]] = None):\n@_wraps(np.expand_dims)\ndef expand_dims(a, axis: Union[int, Tuple[int, ...]]):\n- if isinstance(axis, int...
Python
Apache License 2.0
google/jax
Attempt to fix error in google3 import (#3244) See #3243
260,411
29.05.2020 13:06:50
-10,800
9691f9b065f6400c3e13fc7f3a68cb31a3fc3058
Fix travis; yaml parser does not like comments inside shell commands
[ { "change_type": "MODIFY", "old_path": ".travis.yml", "new_path": ".travis.yml", "diff": "@@ -44,8 +44,8 @@ install:\nconda install --yes sphinx sphinx_rtd_theme nbsphinx sphinx-autodoc-typehints jupyter_client matplotlib;\npip install sklearn;\nfi\n- - if [ \"$JAX_TO_TF\" = true ] ;then\n# jax_to_t...
Python
Apache License 2.0
google/jax
Fix travis; yaml parser does not like comments inside shell commands (#3245)
260,505
29.05.2020 20:58:10
14,400
0031075bb2d30c95ae4fb29d3457767d65ae07f6
Replaced jnp.sum by sum when the argument is a list
[ { "change_type": "MODIFY", "old_path": "jax/experimental/optix.py", "new_path": "jax/experimental/optix.py", "diff": "@@ -96,7 +96,7 @@ def clip(max_delta) -> InitUpdate:\ndef global_norm(updates: Updates) -> Updates:\nreturn jnp.sqrt(\n- jnp.sum([jnp.sum(jnp.square(x)) for x in tree_leaves(updates)...
Python
Apache License 2.0
google/jax
Replaced jnp.sum by sum when the argument is a list (#3253)
260,411
30.05.2020 08:48:44
-10,800
d34debafe6b266fbc2482fd9f2dae0805d4fcc18
Implementation of jax_to_tf.while
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "new_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "diff": "@@ -782,6 +782,68 @@ def _cond(pred: TfVal, *operands: TfVal,\ntf_impl[lax.cond_p] = _cond\n+\n+def _while(*args, cond_nconsts: int, cond_jaxpr: core.Type...
Python
Apache License 2.0
google/jax
Implementation of jax_to_tf.while (#3241)
260,485
01.06.2020 23:43:43
14,400
7a4b222387abb549b8629ac6815c093a456a5b9d
Added support for np.diagflat
[ { "change_type": "MODIFY", "old_path": "jax/numpy/__init__.py", "new_path": "jax/numpy/__init__.py", "diff": "@@ -28,7 +28,7 @@ from .lax_numpy import (\ncomplex128, complex64, complex_, complexfloating, compress, concatenate,\nconj, conjugate, convolve, copysign, corrcoef, correlate, cos, cosh,\nco...
Python
Apache License 2.0
google/jax
Added support for np.diagflat (#3259)
260,411
02.06.2020 12:35:28
-10,800
d36429b5fd992cb16081f44dfd787f28c296e0a8
Implement jax_to_tf.scan Also removed the enable_jit, which was needed only to work around the lack of control flow primitive support.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax_to_tf/__init__.py", "new_path": "jax/experimental/jax_to_tf/__init__.py", "diff": "# See the License for the specific language governing permissions and\n# limitations under the License.\n-from .jax_to_tf import enable_jit, convert\n+from ...
Python
Apache License 2.0
google/jax
Implement jax_to_tf.scan (#3260) Also removed the enable_jit, which was needed only to work around the lack of control flow primitive support.
260,335
02.06.2020 17:37:20
25,200
c42a7f7890205bbeacd5511161b7af04eb512417
remove some trailing whitespace
[ { "change_type": "MODIFY", "old_path": "jax/numpy/linalg.py", "new_path": "jax/numpy/linalg.py", "diff": "@@ -170,7 +170,7 @@ def _cofactor_solve(a, b):\nIf a is rank n-1, then the lower right corner of u will be zero and the\ntriangular_solve will fail.\nLet x = solve(p @ l, b) and y = det(a)*solve...
Python
Apache License 2.0
google/jax
remove some trailing whitespace (#3287)
260,335
02.06.2020 20:28:21
25,200
538691b9f4b4edc4457b50e19a56d0cbd3bbc68d
remove `pack` from optimizers.py It is vestigial, from a time when JaxTuples roamed free.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/optimizers.py", "new_path": "jax/experimental/optimizers.py", "diff": "@@ -88,12 +88,11 @@ zip = safe_zip\n# Since pytrees can be flattened, that structure is isomorphic to a list of\n# lists (with no further nesting).\n-pack = tuple\nOptimize...
Python
Apache License 2.0
google/jax
remove `pack` from optimizers.py (#3305) It is vestigial, from a time when JaxTuples roamed free.
260,335
02.06.2020 20:28:59
25,200
b58eec51ac28fcf49093adf8092726597ef6cfb8
make pmap axis checking an exception, hoist
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1116,6 +1116,9 @@ def pmap(fun: Callable, axis_name: Optional[AxisName] = None, *, in_axes=0,\ndonate_tuple = rebase_donate_argnums(_ensure_tuple(donate_argnums),\nstatic_broadcasted_tuple)\n+ if any(axis != ...
Python
Apache License 2.0
google/jax
make pmap axis checking an exception, hoist (#3239)
260,335
03.06.2020 07:32:44
25,200
0e229e4ea8c7361e1a72c2b15b9f18d9829c0a03
keep old name 'packed_state' of OptimizerState
[ { "change_type": "MODIFY", "old_path": "jax/experimental/optimizers.py", "new_path": "jax/experimental/optimizers.py", "diff": "@@ -89,10 +89,10 @@ zip = safe_zip\n# lists (with no further nesting).\nOptimizerState = namedtuple(\"OptimizerState\",\n- [\"states_flat\", \"tree_def\", \"subtree_defs\"]...
Python
Apache License 2.0
google/jax
keep old name 'packed_state' of OptimizerState
260,519
04.06.2020 03:26:35
-36,000
b998044ffed2f36f683c9dce4fbd2914d5b7de44
Add np.polyadd
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -211,6 +211,7 @@ Not every function in NumPy is implemented; contributions are welcome!\npackbits\npad\npercentile\n+ polyadd\npolyval\npower\npositive\n" }, { "change_type": "MODIFY", ...
Python
Apache License 2.0
google/jax
Add np.polyadd (#3261)
260,411
04.06.2020 09:41:45
-10,800
afa9276f0869305afe12cbaec88fe3fb535de807
Implement jax_to_tf.scan
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "new_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "diff": "@@ -29,6 +29,7 @@ from jax import numpy as jnp\nfrom jax import tree_util\nfrom jax import util\nfrom jax.api_util import flatten_fun\n+from jax.lax impor...
Python
Apache License 2.0
google/jax
Implement jax_to_tf.scan (#3307)
260,299
04.06.2020 11:25:30
-3,600
c04dea1c84b657d014412a04a5312e7e525b7501
Begin implementing mask(jit)
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -26,7 +26,7 @@ from .. import abstract_arrays\nfrom .. import core\nfrom ..tree_util import tree_unflatten\nfrom ..core import Trace, Tracer\n-from ..util import safe_map, saf...
Python
Apache License 2.0
google/jax
Begin implementing mask(jit)
260,299
04.06.2020 12:28:38
-3,600
dfe3462746d701b08f3d1ee814534f228d2fa199
Add device_put_p abstract_eval rule
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/xla.py", "new_path": "jax/interpreters/xla.py", "diff": "@@ -1202,6 +1202,7 @@ device_put_p = core.Primitive('device_put')\ndevice_put_p.def_impl(_device_put_impl)\npe.custom_partial_eval_rules[device_put_p] = lambda trace, x, **params: x\nad....
Python
Apache License 2.0
google/jax
Add device_put_p abstract_eval rule
260,299
04.06.2020 12:50:47
-3,600
0f0032727b68e3fc07164c3505ad5c80c9c08503
Implement MaskTrace.post_process_call
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -410,7 +410,12 @@ class MaskTrace(Trace):\nreturn [MaskTracer(self, v, s) for v, s in zip(vals_out, shapes_out())]\ndef post_process_call(self, call_primitive, out_tracers, pa...
Python
Apache License 2.0
google/jax
Implement MaskTrace.post_process_call
260,299
04.06.2020 15:05:14
-3,600
38d483737d0e35f77ed79fc279574b4b2dc46937
Fix x64 test
[ { "change_type": "MODIFY", "old_path": "tests/masking_test.py", "new_path": "tests/masking_test.py", "diff": "@@ -413,9 +413,9 @@ class MaskingTest(jtu.JaxTestCase):\n@jit\ndef concat(y):\nreturn lax.concatenate([x, y], 0)\n- return concat(jnp.array([1., 2., 3.]))\n+ return concat(jnp.array([1., 2.,...
Python
Apache License 2.0
google/jax
Fix x64 test
260,335
04.06.2020 10:13:15
25,200
9c0a58a8e774171e5e465bd81d2fad481c5264fc
add float dtype checks to random.py fixes
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -359,6 +359,9 @@ def uniform(key: jnp.ndarray,\nReturns:\nA random array with the specified shape and dtype.\n\"\"\"\n+ if not dtypes.issubdtype(dtype, np.floating):\n+ raise ValueError(f\"dtype argument...
Python
Apache License 2.0
google/jax
add float dtype checks to random.py (#3320) fixes #3317
260,485
04.06.2020 23:27:29
14,400
969ed6d162e6d92ec691cb5e07edee85d4aa0b03
Initial implementation of polymul function
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -212,6 +212,7 @@ Not every function in NumPy is implemented; contributions are welcome!\npad\npercentile\npolyadd\n+ polymul\npolyval\npower\npositive\n" }, { "change_type": "MODIFY", ...
Python
Apache License 2.0
google/jax
Initial implementation of polymul function (#3303)
260,285
05.06.2020 09:04:22
-7,200
ea782220c4a95f85933b37955d597ab73783ab22
Allow mask(split)
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1353,17 +1353,19 @@ def broadcast_to(arr, shape):\n@_wraps(np.split)\ndef split(ary, indices_or_sections, axis=0):\n- dummy_val = np.broadcast_to(0, ary.shape) # zero strides\n+ axis =...
Python
Apache License 2.0
google/jax
Allow mask(split)
260,287
05.06.2020 17:22:55
-7,200
74d160f5e0772b05c249ed6a7d71a846719c394c
Don't keep primal arguments and results in the linearized jaxpr Linearized functions are supposed to take tangent types to tangent types, and so all primal arguments are unused and primal results get replaced by units.
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1476,9 +1476,7 @@ def _lift_linearized(jaxpr, primal_avals, consts, io_tree, out_pvals, *py_args):\nmsg = (\"linearized function called on tangent values inconsistent with \"\n\"the original primal values.\")...
Python
Apache License 2.0
google/jax
Don't keep primal arguments and results in the linearized jaxpr (#3233) Linearized functions are supposed to take tangent types to tangent types, and so all primal arguments are unused and primal results get replaced by units.
260,287
27.05.2020 13:57:47
0
adb442eb8ab7e126f34abf6571477a882d7d7a9a
Make ad_util.zero a class that carries avals (similar to UndefinedPrimal) This is useful for remat transpose rule submitted in and e.g. allowed me to catch a slight overuse of defjvp2 for `random_gamma_p` (it was unnecessarily declared as having multiple outputs).
[ { "change_type": "MODIFY", "old_path": "jax/ad_util.py", "new_path": "jax/ad_util.py", "diff": "from .core import (lattice_join, Primitive, Unit, unit, AbstractUnit,\n- valid_jaxtype)\n+ valid_jaxtype, raise_to_shaped, get_aval)\nfrom .tree_util import register_pytree_node\nfrom typing import Any, D...
Python
Apache License 2.0
google/jax
Make ad_util.zero a class that carries avals (similar to UndefinedPrimal) This is useful for remat transpose rule submitted in #3162 and e.g. allowed me to catch a slight overuse of defjvp2 for `random_gamma_p` (it was unnecessarily declared as having multiple outputs).
260,287
27.05.2020 18:09:35
0
c5d870738c571d75eacd92b14540b2705147b346
Fix host_callback
[ { "change_type": "MODIFY", "old_path": "jax/experimental/host_callback.py", "new_path": "jax/experimental/host_callback.py", "diff": "@@ -389,7 +389,7 @@ id_tap_p.def_abstract_eval(_id_tap_abstract_eval)\n# The AttributeError is for regular values, the KeyError is for ConcreteArray\ndef _instantiate...
Python
Apache License 2.0
google/jax
Fix host_callback
260,287
28.05.2020 13:20:56
0
3f1d3a73ace426540f81167fbda9f2068898075a
Remove example from ad.instantiate_zeros, fix vmap bug
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1881,7 +1881,7 @@ def defjvp_all(fun, custom_jvp):\nmsg = (\"Detected differentiation with respect to closed-over values with \"\n\"custom JVP rule, which isn't supported.\")\nraise ValueError(msg)\n- args_do...
Python
Apache License 2.0
google/jax
Remove example from ad.instantiate_zeros, fix vmap bug
260,287
29.05.2020 09:43:08
0
17472b97ab2d6953f953d1f339ed9ee8d4ad5424
Optimize zeros_like_shaped_array This function is used a lot more now, because `ad.instantiate_zeros` now goes through that and not `zeros_like_array`.
[ { "change_type": "MODIFY", "old_path": "jax/abstract_arrays.py", "new_path": "jax/abstract_arrays.py", "diff": "@@ -37,7 +37,7 @@ def make_shaped_array(x):\ndef zeros_like_array(x):\ndtype = dtypes.canonicalize_dtype(dtypes.result_type(x))\n- return np.broadcast_to(np.array(0, dtype), np.shape(x))\n...
Python
Apache License 2.0
google/jax
Optimize zeros_like_shaped_array This function is used a lot more now, because `ad.instantiate_zeros` now goes through that and not `zeros_like_array`.
260,519
06.06.2020 02:44:10
-36,000
29740de63ecd35073e66f3502f1d7dfe79d990e7
Add np.polysub
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -213,6 +213,7 @@ Not every function in NumPy is implemented; contributions are welcome!\npercentile\npolyadd\npolymul\n+ polysub\npolyval\npower\npositive\n" }, { "change_type": "MODIFY...
Python
Apache License 2.0
google/jax
Add np.polysub (#3319)
260,335
06.06.2020 21:44:14
25,200
fd886b17a48f23637f3fcae810117721f155e16c
make jnp.array faster fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -35,20 +35,21 @@ import warnings\nimport numpy as np\nimport opt_einsum\n-from jax import jit, device_put, custom_jvp\n+from jax import jit, custom_jvp\nfrom .vectorize import vectorize...
Python
Apache License 2.0
google/jax
make jnp.array faster (#3350) fixes #2919
260,411
07.06.2020 14:45:15
-10,800
7863f817c7a853b4968f1f2635aab01d89aa2321
Commented-out the literal jaxpr checks in host_callback * Commented-out the literal jaxpr checks in host_callback Will re-enable when we change the host_callback, or when we have better tools for updating goldens
[ { "change_type": "MODIFY", "old_path": "tests/host_callback_test.py", "new_path": "tests/host_callback_test.py", "diff": "@@ -132,20 +132,8 @@ class HostCallbackTest(jtu.JaxTestCase):\nxla_bridge.get_backend.cache_clear()\ndef test_eval(self):\n- assertMultiLineStrippedEqual(self, \"\"\"\n-{ lambda ...
Python
Apache License 2.0
google/jax
Commented-out the literal jaxpr checks in host_callback (#3351) * Commented-out the literal jaxpr checks in host_callback Will re-enable when we change the host_callback, or when we have better tools for updating goldens
260,335
08.06.2020 09:47:32
25,200
508821cc184155b86c10850dcbb61c81daeee3e4
fix a one-character issue from a bad merge cf.
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -776,7 +776,7 @@ def _cond_batching_rule(args, dims, branches, linear):\nreturn out, out_dims\ndef _cond_jvp(primals, tangents, branches, linear):\n- nonzeros = [type(t) is no...
Python
Apache License 2.0
google/jax
fix a one-character issue from a bad merge (#3362) cf. #3222
260,411
08.06.2020 19:59:25
-10,800
65d95f10eaea6f29910e77bee87b5b84c4d6f277
A couple of ad_util.zero were missed in
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1905,7 +1905,7 @@ def defjvp(fun, *jvprules):\nans = fun(*primals)\ntangents_out = [rule(t, ans, *primals) for rule, t in zip(jvprules, tangents)\nif rule is not None and type(t) is not ad_util.Zero]\n- retur...
Python
Apache License 2.0
google/jax
A couple of ad_util.zero were missed in #3222 (#3363)
260,519
09.06.2020 03:06:20
-36,000
b1adef40d49d4c8e995f2468af2e07fa13fb0690
Fix polyadd and test
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -2626,13 +2626,11 @@ def polyadd(a, b):\na = asarray(a)\nb = asarray(b)\n- shape_diff = a.shape[0] - b.shape[0]\n- if shape_diff > 0:\n- b = concatenate((np.zeros(shape_diff, dtype=b.dt...
Python
Apache License 2.0
google/jax
Fix polyadd and test (#3344)
260,335
08.06.2020 11:48:58
25,200
982f86702e55c33e063e02285dad77376ceebfda
clean up handling of aux data in jvp_subtrace_aux related to indirectly, in that we now won't try to do something crazy like `JVPTracer(trace, object(), zero)`, which didn't like
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -74,10 +74,10 @@ def jvp_subtrace_aux(master, primals, tangents):\nassert x._trace.level < trace.level\nans, aux = yield map(partial(JVPTracer, trace), primals, tangents), {}\nans_trace...
Python
Apache License 2.0
google/jax
clean up handling of aux data in jvp_subtrace_aux related to #3222 indirectly, in that we now won't try to do something crazy like `JVPTracer(trace, object(), zero)`, which #3222 didn't like
260,335
08.06.2020 13:16:19
25,200
fb8b3a4df9c2746fb1768d1175511f59eef0c802
symbolic zeros tweak to work with div rule
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/ad.py", "new_path": "jax/interpreters/ad.py", "diff": "@@ -144,7 +144,8 @@ def backward_pass(jaxpr: core.Jaxpr, consts, primals_in, cotangents_in):\ndef write_cotangent(v, ct):\n# assert v not in primal_env\n- if ct is not None and type(v) is ...
Python
Apache License 2.0
google/jax
symbolic zeros tweak to work with div rule
260,335
08.06.2020 13:22:13
25,200
866c17c32ec10d46c79ccaf3069189e776b3536f
fix a couple ad_util.Zero type checks
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -2871,7 +2871,7 @@ def _concatenate_translation_rule(c, *operands, **kwargs):\ndef _concatenate_transpose_rule(t, *operands, dimension):\noperand_shapes = [o.aval.shape if ad.is_undefined_primal(o) els...
Python
Apache License 2.0
google/jax
fix a couple ad_util.Zero type checks
260,335
08.06.2020 13:30:00
25,200
0a716978adb67194a7ce5c4f373e1f60f14c9b9a
fix a docs bug
[ { "change_type": "MODIFY", "old_path": "docs/notebooks/How_JAX_primitives_work.ipynb", "new_path": "docs/notebooks/How_JAX_primitives_work.ipynb", "diff": "\" else:\\n\",\n\" # This use of multiply_add is with a constant \\\"y\\\"\\n\",\n\" assert ad.is_undefined_primal(x)\\n\",\n- \" ct_x = ad.zero...
Python
Apache License 2.0
google/jax
fix a docs bug
260,335
08.06.2020 13:46:10
25,200
04191ab9de7ed262e4b2b3fd885435e272ae157e
improve broadcast handling in batching.py We can avoid a circular import just by `import jax`!
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "import numpy as onp\nfrom typing import Any, Callable, Dict, Optional, Tuple, Union\n+import jax\nfrom .. import core\nfrom ..core import Trace, Tracer, new_master\nfrom ..abst...
Python
Apache License 2.0
google/jax
improve broadcast handling in batching.py We can avoid a circular import just by `import jax`!
260,335
08.06.2020 14:13:01
25,200
2a6d3f417c8fba37e109099d1618378b50c7c7b8
fix another docs bug
[ { "change_type": "MODIFY", "old_path": "docs/notebooks/How_JAX_primitives_work.ipynb", "new_path": "docs/notebooks/How_JAX_primitives_work.ipynb", "diff": "\"\\n\",\n\" In our case, multiply_add is not a linear primitive. However, it is used linearly \\n\",\n\" w.r.t. tangents in multiply_add_value_...
Python
Apache License 2.0
google/jax
fix another docs bug
260,335
08.06.2020 15:06:00
25,200
ee428008c4bdc271a5c962a5b315a2f45056a290
yet another doc fix
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -830,7 +830,7 @@ def vmap(fun: Callable, in_axes=0, out_axes=0) -> Callable:\nacross the mapped axis:\n>>> print(vmap(lambda x, y: (x + y, y * 2.), in_axes=(0, None), out_axes=0)(np.arange(2.), 4.))\n- (Device...
Python
Apache License 2.0
google/jax
yet another doc fix
260,411
09.06.2020 12:28:03
-10,800
67927b071e1c6c0ded453761ca8ebd0e043df731
Fix imports for jax_to_tf tests
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax_to_tf/tests/tf_ops_test.py", "new_path": "jax/experimental/jax_to_tf/tests/tf_ops_test.py", "diff": "@@ -27,13 +27,14 @@ import numpy as np\nimport tensorflow as tf # type: ignore[import]\nfrom jax.experimental import jax_to_tf\n-from . im...
Python
Apache License 2.0
google/jax
Fix imports for jax_to_tf tests (#3377)
260,335
09.06.2020 15:19:53
25,200
0011fd5e9429fc463e585737c0d69ca0b03cb08f
fix defjvps with None as first rule fixes
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -75,7 +75,7 @@ def _initial_style_jaxpr(fun, in_avals):\ntyped_jaxpr = core.TypedJaxpr(jaxpr, consts, in_avals, out_avals)\nreturn typed_jaxpr\n-def sum_tangents(x, *xs):\n+def su...
Python
Apache License 2.0
google/jax
fix defjvps with None as first rule fixes #3389
260,335
09.06.2020 19:20:15
25,200
650fb494ad9f955ac8ddc979b1bdd8e64faf57fd
tweak t logpdf tolerance for float64
[ { "change_type": "MODIFY", "old_path": "tests/scipy_stats_test.py", "new_path": "tests/scipy_stats_test.py", "diff": "@@ -373,7 +373,8 @@ class LaxBackedScipyStatsTests(jtu.JaxTestCase):\nself._CheckAgainstNumpy(scipy_fun, lax_fun, args_maker, check_dtypes=False,\ntol=1e-3)\n- self._CompileAndCheck(...
Python
Apache License 2.0
google/jax
tweak t logpdf tolerance for float64
260,411
10.06.2020 08:13:40
-10,800
b3c348cc07ec31b560532a48c0c759263341b003
Moved shift_right implementation from tfxla to jax_to_tf * Implemented shift_right without tfxla These ops don't actually need XLA, they should not depend on tfxla. * Small fixes
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "new_path": "jax/experimental/jax_to_tf/jax_to_tf.py", "diff": "@@ -175,7 +175,7 @@ class TensorFlowTracer(core.Tracer):\nself._trace = trace\nif not isinstance(val, (tf.Tensor, tf.Variable)):\naval = xla.abstractify(v...
Python
Apache License 2.0
google/jax
Moved shift_right implementation from tfxla to jax_to_tf (#3378) * Implemented shift_right without tfxla These ops don't actually need XLA, they should not depend on tfxla. * Small fixes
260,285
10.06.2020 11:47:47
-7,200
98a32f2c5999c69d9367bf2bd9dcaacaaab114c2
Remove special case for scan masking The scan masking rule is now simplified to a standard masking rule, and the special case handling in masking.py has been removed.
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -33,7 +33,6 @@ from .. import linear_util as lu\nmap = safe_map\nzip = safe_zip\n-shape_parameterized_primitive_rules: Dict[core.Primitive, Callable] = {}\nmasking_rules: Dict...
Python
Apache License 2.0
google/jax
Remove special case for scan masking The scan masking rule is now simplified to a standard masking rule, and the special case handling in masking.py has been removed.
260,285
10.06.2020 12:56:26
-7,200
c39b6a40652218fbd67923ea57499a6cfc2d75fa
Remove unused scan shape rule
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax_control_flow.py", "new_path": "jax/lax/lax_control_flow.py", "diff": "@@ -1474,13 +1474,6 @@ def _scan_batching_rule(args, dims, reverse, length, jaxpr, num_consts,\nys_bdims = [1 if b else batching.not_mapped for b in ys_batched]\nreturn outs, car...
Python
Apache License 2.0
google/jax
Remove unused scan shape rule
260,519
11.06.2020 02:57:35
-36,000
832431db9eea95f2212370b47bdd0e6e891fcd0a
Add np.triu_indices_from function
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -268,8 +268,10 @@ Not every function in NumPy is implemented; contributions are welcome!\ntri\ntril\ntril_indices\n+ tril_indices_from\ntriu\ntriu_indices\n+ triu_indices_from\ntrue_divide\ntru...
Python
Apache License 2.0
google/jax
Add np.triu_indices_from function (#3346)
260,285
11.06.2020 07:08:12
-7,200
dfd2d8c564b304343090b85643c1f2abcf2515fa
Fix dtype, minor
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -23,7 +23,7 @@ from typing import Callable, Dict, Sequence, Union\nimport numpy as onp\nfrom .. import abstract_arrays\n-from .. import core\n+from .. import core, dtypes\nfro...
Python
Apache License 2.0
google/jax
Fix dtype, minor
260,335
11.06.2020 14:21:02
25,200
1a433620a3c98ec6f49a9f39eb71730987b9003e
make jnp.array(x, copy=True) copies device buffers fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -43,7 +43,7 @@ from .. import dtypes\nfrom ..abstract_arrays import UnshapedArray, ShapedArray, ConcreteArray, canonicalize_shape\nfrom ..config import flags\nfrom ..interpreters.xla im...
Python
Apache License 2.0
google/jax
make jnp.array(x, copy=True) copies device buffers fixes #3412
260,314
12.06.2020 01:42:25
14,400
b680c994ae0f07f4fdfb482177ef82857ee97a49
allow scalar input in poisson sampler
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -1186,7 +1186,7 @@ def poisson(key, lam, shape=(), dtype=np.int64):\nshape = abstract_arrays.canonicalize_shape(shape)\nif np.shape(lam) != shape:\nlam = jnp.broadcast_to(lam, shape)\n- lam = lam.astype(...
Python
Apache License 2.0
google/jax
allow scalar input in poisson sampler
260,287
12.06.2020 15:03:26
-7,200
2dac55a0bfca6911237b43bd8882c9a4bf4ed258
Skip known invars and outvars in JaxprTrace.process_call
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/masking.py", "new_path": "jax/interpreters/masking.py", "diff": "@@ -425,6 +425,9 @@ class MaskTrace(Trace):\n# Make padded_env hashable\npadded_env = (env_keys, padded_env_vals)\nf, shapes_out = mask_subtrace(f, self.master, shapes, padded_en...
Python
Apache License 2.0
google/jax
Skip known invars and outvars in JaxprTrace.process_call (#3242)
260,335
12.06.2020 15:41:07
25,200
ae9df752de75344d231c7ec973fdd562a91d8913
add docstring to ravel_pytree
[ { "change_type": "MODIFY", "old_path": "docs/jax.rst", "new_path": "docs/jax.rst", "diff": "@@ -17,6 +17,7 @@ Subpackages\njax.ops\njax.random\njax.tree_util\n+ jax.flatten_util\njax.dlpack\njax.profiler\n" }, { "change_type": "MODIFY", "old_path": "jax/flatten_util.py", "new_path": ...
Python
Apache License 2.0
google/jax
add docstring to ravel_pytree
260,335
14.06.2020 13:56:53
25,200
482067640578a40f088e5556a702090d12c26d5a
add jax.numpy.concatenate(..., axis=None) support fixes
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1995,6 +1995,8 @@ def concatenate(arrays, axis=0):\nraise ValueError(\"Need at least one array to concatenate.\")\nif ndim(arrays[0]) == 0:\nraise ValueError(\"Zero-dimensional arrays ...
Python
Apache License 2.0
google/jax
add jax.numpy.concatenate(..., axis=None) support fixes #3419
260,335
14.06.2020 14:45:29
25,200
29fa935ca56dd6aa8fc688a30f860c300fe93bd6
fix vmap-of-pmap mapped_invars logic bug fixes This crept in via but more importantly it shows we don't have good test coverage here!
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -161,10 +161,12 @@ class BatchTrace(Trace):\nif all(dim is not_mapped for dim in dims):\nreturn map_primitive.bind(f, *vals, **params)\nelse:\n+ mapped_invars = params['mapp...
Python
Apache License 2.0
google/jax
fix vmap-of-pmap mapped_invars logic bug fixes #3399 This crept in via #1959, but more importantly it shows we don't have good test coverage here!
260,411
15.06.2020 10:05:23
-10,800
0e804296766384763bfbb8cd6e2758b623d919ef
Added jax2tf test about primitive coverage
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -23,15 +23,21 @@ import jax\nfrom jax import abstract_arrays\nfrom jax import ad_util\nfrom jax import core\n+from jax import custom_derivatives\nfrom jax import l...
Python
Apache License 2.0
google/jax
Added jax2tf test about primitive coverage (#3420)
260,411
15.06.2020 10:59:46
-10,800
1440ccf4f9ecd9a487d0ce55e5aa725ecaf0e961
Fixed bug in argument type promotion for dynamic_update_slice Also added tests for lax.slice, lax.dynamic_slice and lax.dynamic_update_slice.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -292,8 +292,8 @@ def promote_types(*values):\ndef wrap_binary_op(func):\n- def wrapped_func(lhs, rhs, *args, **kwargs):\n- return func(*promote_types(lhs, rhs), *a...
Python
Apache License 2.0
google/jax
Fixed bug in argument type promotion for dynamic_update_slice (#3427) Also added tests for lax.slice, lax.dynamic_slice and lax.dynamic_update_slice.
260,411
15.06.2020 12:14:09
-10,800
2e3d4393c218a5cd51e88e9e1fca0b47e587ddaa
[jax2tf] fix the too-early use of tf.constant If I leave it at top-level, I get test failures about missing platform Host
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -57,14 +57,13 @@ TfVal = Any\n# Whenever we are in a JAX tracing context we must use `core.unit` values\n# in those places. However, when we move to TF we have to ...
Python
Apache License 2.0
google/jax
[jax2tf] fix the too-early use of tf.constant (#3446) If I leave it at top-level, I get test failures about missing platform Host
260,422
13.06.2020 11:39:01
-3,600
3c78605bb8c1133bba6b59bb6a973b046018717a
Propagate raw __name__ and __doc__ of functions wrapped by jit and sharded_jit.
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -166,9 +166,6 @@ def jit(fun: Callable, static_argnums: Union[int, Iterable[int]] = (),\nout = xla.xla_call(flat_fun, *args_flat, device=device, backend=backend,\nname=flat_fun.__name__, donated_invars=donated...
Python
Apache License 2.0
google/jax
Propagate raw __name__ and __doc__ of functions wrapped by jit and sharded_jit.
260,335
15.06.2020 07:32:42
25,200
12ce6e376872d6e1bdacc0e88984f21f92dc0cc8
roll back of while we debug internal fails
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -161,12 +161,10 @@ class BatchTrace(Trace):\nif all(dim is not_mapped for dim in dims):\nreturn map_primitive.bind(f, *vals, **params)\nelse:\n- mapped_invars = params['mapp...
Python
Apache License 2.0
google/jax
roll back of #3439 while we debug internal fails
260,335
15.06.2020 09:10:40
25,200
fcfcffe334351d8e79670c48e2aa08cc86426341
add systematic tests for vmap-of-pmap fixes Also re-applies the fix in (i.e it rolls-back the rollback PR because we're now confident it's correct (and some internal tests are buggy).
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/batching.py", "new_path": "jax/interpreters/batching.py", "diff": "@@ -161,10 +161,12 @@ class BatchTrace(Trace):\nif all(dim is not_mapped for dim in dims):\nreturn map_primitive.bind(f, *vals, **params)\nelse:\n+ mapped_invars = params['mapp...
Python
Apache License 2.0
google/jax
add systematic tests for vmap-of-pmap fixes #3440 Also re-applies the fix in #3439 (i.e it rolls-back the rollback PR #3448) because we're now confident it's correct (and some internal tests are buggy).
260,700
11.05.2020 23:44:32
14,400
3cf6b1de542bb2b8770af99f236af698eae3db96
add erf inv rule erf_inv rule not working works up to order 2 erf inv rule use np for now actually use np for now
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jet.py", "new_path": "jax/experimental/jet.py", "diff": "@@ -249,6 +249,49 @@ def def_comp(prim, comp):\ndef_comp(lax.erfc_p, lambda x: 1 - lax.erf(x))\n+\n+def _erf_inv_rule(primals_in, series_in):\n+ x, = primals_in\n+ series, = series_in\n+...
Python
Apache License 2.0
google/jax
add erf inv rule erf_inv rule not working works up to order 2 erf inv rule use np for now actually use np for now
260,700
15.06.2020 17:23:57
14,400
f463598f19549cd37386e8d7e7fe9036f52d6f02
add int pow rule
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jet.py", "new_path": "jax/experimental/jet.py", "diff": "@@ -298,10 +298,18 @@ jet_rules[lax.pow_p] = _pow_taylor\ndef _integer_pow_taylor(primals_in, series_in, *, y):\nif y == 2:\n- fn = lambda x: x * x\n- else:\n- fn = lambda x: lax.pow(x, ...
Python
Apache License 2.0
google/jax
add int pow rule
260,335
12.06.2020 16:10:45
25,200
d4c6cb62abce5b7b5a28a4297ccda27d0a8405d8
print warning when doing jit-of-pmap
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -169,8 +169,6 @@ def jit(fun: Callable, static_argnums: Union[int, Iterable[int]] = (),\nname=flat_fun.__name__, donated_invars=donated_invars)\nreturn tree_unflatten(out_tree(), out)\n- jitted_name = \"jit({}...
Python
Apache License 2.0
google/jax
print warning when doing jit-of-pmap
260,335
16.06.2020 11:46:37
25,200
005958e13ec0d30cd45192673e761e886622db6e
added reviewer suggestion
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/invertible_ad.py", "new_path": "jax/interpreters/invertible_ad.py", "diff": "@@ -54,7 +54,7 @@ def _invertible_call_make_output_tracers(trace, in_tracers, out_tracers, params)\nnew_in_tracers = (*in_tracers, *out_consts)\n# Append dummy output...
Python
Apache License 2.0
google/jax
added reviewer suggestion
260,335
16.06.2020 15:46:51
25,200
20f4ec649c9cccdac6822302a4c4695192fa9473
fix a bug from
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -704,6 +704,7 @@ def _remat_partial_eval(process_out, trace, _, f, tracers, params):\n# Using the instantiated tracers, run call_bind like JaxprTrace.process_call.\n...
Python
Apache License 2.0
google/jax
fix a bug from #3459 (#3466)
260,700
16.06.2020 22:48:25
14,400
575216e094ac55866320ae09dff4b05ef47fb7ea
add jet primitives, refactor tests
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jet.py", "new_path": "jax/experimental/jet.py", "diff": "@@ -18,6 +18,7 @@ from functools import partial\nimport numpy as np\nimport jax\n+import jax.numpy as jnp\nfrom jax import core\nfrom jax.util import unzip2\nfrom jax import ad_util\n@@ ...
Python
Apache License 2.0
google/jax
add jet primitives, refactor tests (#3468) Co-authored-by: Jesse Bettencourt <jessebett@cs.toronto.edu>
260,411
17.06.2020 11:57:21
-10,800
4f21b9351cd6f4be6d192ddda45c260db38b4380
[jax2tf] Added special case for tf.pad. Fixed lax_reference.pad to handle lax.pad with negative edge padding.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -677,6 +677,10 @@ def _pad_shape(operand, padding_value, padding_config):\ndef _pad(operand, padding_value, padding_config):\nlow, high, interior = util.unzip3(pad...
Python
Apache License 2.0
google/jax
[jax2tf] Added special case for tf.pad. (#3462) Fixed lax_reference.pad to handle lax.pad with negative edge padding.
260,519
18.06.2020 02:43:50
-36,000
5ee936fdcf44711a2fcd8b1f448a6134c14294a4
Add polyder numpy function
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -212,6 +212,7 @@ Not every function in NumPy is implemented; contributions are welcome!\npad\npercentile\npolyadd\n+ polyder\npolymul\npolysub\npolyval\n" }, { "change_type": "MODIFY", ...
Python
Apache License 2.0
google/jax
Add polyder numpy function (#3403)
260,335
17.06.2020 10:05:28
25,200
5344ec5364bbe6b08bfe4f9e4c0f581b807f0cfe
use original numpy for shape calculations cf.
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -2253,7 +2253,7 @@ def arange(start, stop=None, step=None, dtype=None):\nlax._check_user_dtype_supported(dtype, \"arange\")\nif stop is None and step is None:\ndtype = dtype or _dtype(s...
Python
Apache License 2.0
google/jax
use original numpy for shape calculations (#3474) cf. #3453
260,335
22.06.2020 08:12:41
25,200
3fff83790742a1b0a468032ecff6f8809fde57d9
pin numpy version in setup.py to avoid warnings
[ { "change_type": "MODIFY", "old_path": "setup.py", "new_path": "setup.py", "diff": "@@ -29,7 +29,7 @@ setup(\npackages=find_packages(exclude=[\"examples\"]),\npython_requires='>=3.6',\ninstall_requires=[\n- 'numpy>=1.12', 'absl-py', 'opt_einsum'\n+ 'numpy >=1.12, <1.19', 'absl-py', 'opt_einsum'\n],\...
Python
Apache License 2.0
google/jax
pin numpy version in setup.py to avoid warnings (#3509)
260,335
22.06.2020 10:27:44
25,200
a81e732d3d5398ef5cd74eaf518b6cb2d58877db
fix jet typo: jnp not np
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jet.py", "new_path": "jax/experimental/jet.py", "diff": "@@ -363,7 +363,7 @@ def _integer_pow_taylor(primals_in, series_in, *, y):\nfor k in range(1, len(v)):\nvu = sum(_scale(k, j) * v[k-j] * u[j] for j in range(1, k + 1))\nuv = sum(_scale(k,...
Python
Apache License 2.0
google/jax
fix jet typo: jnp not np (#3507)
260,705
22.06.2020 16:31:08
10,800
e5d4ca31a8b59fb93229d3629035007e5aa329cc
Fix typo understanding jaxprs page on readthedocs
[ { "change_type": "MODIFY", "old_path": "docs/jaxpr.rst", "new_path": "docs/jaxpr.rst", "diff": "@@ -169,7 +169,7 @@ before (with two input vars, one for each element of the input tuple)\nConstant Vars\n--------------\n-ConstVars arise when the computation ontains array constants, either\n+ConstVars ...
Python
Apache License 2.0
google/jax
Fix typo understanding jaxprs page on readthedocs (#3513)
260,335
22.06.2020 17:50:33
25,200
2f7108f78ba4d7fd12a8ad6232685d0d10b28c01
remove the lower_fun default multiple_results=True
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1853,7 +1853,7 @@ def custom_transforms(fun):\nfun_p.def_abstract_eval(fun_abstract_eval)\ndef fun_translation(c, *xla_args, **params):\n- return xla.lower_fun(fun_impl)(c, *xla_args, **params)\n+ return xla....
Python
Apache License 2.0
google/jax
remove the lower_fun default multiple_results=True (#3524)
260,452
22.06.2020 22:43:25
14,400
046006e047543d5c24f75a930ab87ef56c247032
Fix typo: np.bool -> np.bool_ Replaced np.bool (which is just bool) with np.bool_, which is numpy's Boolean type.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/host_callback.py", "new_path": "jax/experimental/host_callback.py", "diff": "@@ -729,7 +729,7 @@ _CODE_TO_DTYPE = {\n5: np.dtype(np.uint16),\n6: np.dtype(np.uint32),\n7: np.dtype(np.uint64),\n- 8: np.dtype(np.bool),\n+ 8: np.dtype(np.bool_),\n...
Python
Apache License 2.0
google/jax
Fix typo: np.bool -> np.bool_ (#3525) Replaced np.bool (which is just bool) with np.bool_, which is numpy's Boolean type.
260,335
22.06.2020 20:04:07
25,200
02494924f9554fb2b4317043319b3731a13fccdd
fix an issue with newer versions of pytype
[ { "change_type": "MODIFY", "old_path": "jax/interpreters/partial_eval.py", "new_path": "jax/interpreters/partial_eval.py", "diff": "@@ -838,7 +838,7 @@ def _reconstruct_pval(pval1: PartialVal, const2: core.Value):\nreturn pval1\nelse:\nif type(pv1) is ConcreteArray:\n- return PartialVal.known(pv1.va...
Python
Apache License 2.0
google/jax
fix an issue with newer versions of pytype (#3526)
260,597
23.06.2020 05:46:41
-7,200
5ee6bc00340e07d1b4fd705bddc2b496cd21f25a
Remove unnecessary static_argnum in np.gradient
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1006,7 +1006,7 @@ def ediff1d(ary, to_end=None, to_begin=None):\nreturn result\n-@partial(jit, static_argnums=(1, 2))\n+@partial(jit, static_argnums=2)\ndef _gradient(a, varargs, axis)...
Python
Apache License 2.0
google/jax
Remove unnecessary static_argnum in np.gradient (#3512)
260,322
23.06.2020 14:25:53
-3,600
490c8533c889127200a9d4a7ed283cfbacc96586
Adds boolean support for bitwise not and unittests for boolean support on logical operations.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -496,6 +496,24 @@ tf_impl[lax.shift_right_logical_p] = _shift_right_logical\ntf_impl[lax.shift_left_p] = tf.bitwise.left_shift\n+def _not(x):\n+ \"\"\"Computes bit...
Python
Apache License 2.0
google/jax
Adds boolean support for bitwise not and unittests for boolean support on logical operations. (#3483) Co-authored-by: Thomas Keck <thomaskeck@google.com>
260,335
23.06.2020 12:08:12
25,200
a45e28377f54c5bd3033b989f8eb9fe516a7583d
add back a full_lower, dropped in
[ { "change_type": "MODIFY", "old_path": "jax/core.py", "new_path": "jax/core.py", "diff": "@@ -36,7 +36,7 @@ from . import source_info_util\nfrom .util import safe_zip, safe_map, partial, curry, prod, partialmethod\nfrom .pprint_util import pp, vcat, PrettyPrint\n-# TODO(dougalm): the trace cache bre...
Python
Apache License 2.0
google/jax
add back a full_lower, dropped in #3491 (#3530)
260,335
23.06.2020 14:03:36
25,200
74ee2ef6eb522f3de93feacc6b15e2f9a93fb8a7
avoid value-based error check in random.choice
[ { "change_type": "MODIFY", "old_path": "jax/random.py", "new_path": "jax/random.py", "diff": "@@ -574,8 +574,6 @@ def choice(key, a, shape=(), replace=True, p=None):\np = jnp.asarray(p)\nif p.shape != (n_inputs,):\nraise ValueError(\"p must be None or match the shape of a\")\n- if jnp.any(p < 0):\n-...
Python
Apache License 2.0
google/jax
avoid value-based error check in random.choice (#3531)
260,677
23.06.2020 23:36:45
-3,600
9d173c622555898b3825a296f82d166da67b6f46
Support `b` and `return_sign` in scipy.special.logsumexp
[ { "change_type": "MODIFY", "old_path": "jax/scipy/special.py", "new_path": "jax/scipy/special.py", "diff": "@@ -101,15 +101,27 @@ expit.defjvps(lambda g, ans, x: g * ans * (lax._const(ans, 1) - ans))\n@_wraps(osp_special.logsumexp)\ndef logsumexp(a, axis=None, b=None, keepdims=False, return_sign=Fal...
Python
Apache License 2.0
google/jax
Support `b` and `return_sign` in scipy.special.logsumexp (#3488)
260,597
24.06.2020 15:22:35
-7,200
a6e3f992a70775ef16c285e024cd2ac62ea32077
Add np.unwrap
[ { "change_type": "MODIFY", "old_path": "jax/numpy/__init__.py", "new_path": "jax/numpy/__init__.py", "diff": "@@ -56,7 +56,7 @@ from .lax_numpy import (\nsquare, squeeze, stack, std, subtract, sum, swapaxes, take, take_along_axis,\ntan, tanh, tensordot, tile, trace, trapz, transpose, tri, tril, tril...
Python
Apache License 2.0
google/jax
Add np.unwrap (#3527)
260,280
24.06.2020 11:54:06
10,800
319eeaf5c97b076cbdc70fb9fa60260cb32416c0
Future warning about lists and tuples
[ { "change_type": "MODIFY", "old_path": "jax/numpy/lax_numpy.py", "new_path": "jax/numpy/lax_numpy.py", "diff": "@@ -1521,6 +1521,10 @@ def _make_reduction(np_fun, op, init_val, preproc=None, bool_op=None,\nif out is not None:\nraise ValueError(\"reduction does not support the `out` argument.\")\n+ i...
Python
Apache License 2.0
google/jax
Future warning about lists and tuples (#3369)
260,519
24.06.2020 21:49:16
-19,080
a44bc0c2c05aa4a079eda3995379dab4a63182dc
Add np.diag_indices_from
[ { "change_type": "MODIFY", "old_path": "docs/jax.numpy.rst", "new_path": "docs/jax.numpy.rst", "diff": "@@ -97,6 +97,7 @@ Not every function in NumPy is implemented; contributions are welcome!\ndegrees\ndiag\ndiag_indices\n+ diag_indices_from\ndiagflat\ndiagonal\ndigitize\n" }, { "change_typ...
Python
Apache License 2.0
google/jax
Add np.diag_indices_from (#3500)
260,705
24.06.2020 19:00:24
10,800
7e5407c734b22aaa73da2bfe9c75edff3d87d37e
Fix typos pytrees page on readthedocs
[ { "change_type": "MODIFY", "old_path": "docs/pytrees.rst", "new_path": "docs/pytrees.rst", "diff": "@@ -55,8 +55,8 @@ to only map over the dictionary argument, we can use::\n(None, 0) # equivalent to (None, {\"k1\": 0, \"k2\": 0})\n-Or, if want every argument to be mapped, we can simply write a sing...
Python
Apache License 2.0
google/jax
Fix typos pytrees page on readthedocs (#3548)
260,335
24.06.2020 16:11:26
25,200
696958d2bd97ecfb83feafc5d70bc9fc32cc8b6d
add remat docstring * add remat docstring first part of addressing
[ { "change_type": "MODIFY", "old_path": "jax/api.py", "new_path": "jax/api.py", "diff": "@@ -1792,6 +1792,87 @@ def eval_shape(fun: Callable, *args, **kwargs):\ndef checkpoint(fun: Callable, concrete: bool = False) -> Callable:\n+ \"\"\"Make ``fun`` recompute internal linearization points when differ...
Python
Apache License 2.0
google/jax
add remat docstring (#3542) * add remat docstring first part of addressing #3314
260,299
25.06.2020 15:50:11
-3,600
c9670d50c5015f36d7569bdf204b0651c64e55fb
Fix lazy broadcast issue
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -2776,7 +2776,8 @@ ad.deflinear(broadcast_p, lambda t, sizes: [_reduce_sum(t, range(len(sizes)))])\nbatching.primitive_batchers[broadcast_p] = _broadcast_batch_rule\ndef _broadcast_in_dim_impl(operand,...
Python
Apache License 2.0
google/jax
Fix lazy broadcast issue (#3536)
260,335
25.06.2020 17:36:17
25,200
db80ca5dd87d27e1800834c2828298aa3f6d8992
allow closures for odeint dynamics functions * allow closures for odeint dynamics functions fixes * add tests for odeint dynamics closing over tracers
[ { "change_type": "MODIFY", "old_path": "jax/experimental/ode.py", "new_path": "jax/experimental/ode.py", "diff": "@@ -31,15 +31,39 @@ import jax.numpy as jnp\nfrom jax import core\nfrom jax import lax\nfrom jax import ops\n-from jax.util import safe_map, safe_zip\n+from jax.util import safe_map, saf...
Python
Apache License 2.0
google/jax
allow closures for odeint dynamics functions (#3562) * allow closures for odeint dynamics functions fixes #2718, #3557 * add tests for odeint dynamics closing over tracers
260,335
25.06.2020 19:17:24
25,200
062ce297ddf9056ca7743a2d262b0db070eb4553
removed stale faq entries
[ { "change_type": "MODIFY", "old_path": "docs/faq.rst", "new_path": "docs/faq.rst", "diff": "-JAX Frequently Asked Questions\n-==============================\n+JAX Frequently Asked Questions (FAQ)\n+====================================\n.. comment RST primer for Sphinx: https://thomas-cokelaer.info/t...
Python
Apache License 2.0
google/jax
removed stale faq entries (#3565)
260,335
25.06.2020 20:57:34
25,200
26c6c3a457414577f7232699095877d6c86d032d
fix error when doing forward-mode of odeint fixes
[ { "change_type": "MODIFY", "old_path": "jax/custom_derivatives.py", "new_path": "jax/custom_derivatives.py", "diff": "@@ -590,3 +590,5 @@ batching.primitive_batchers[custom_vjp_call_jaxpr_p] = _custom_vjp_call_jaxpr_vm\nxla.initial_style_translations[custom_vjp_call_jaxpr_p] = \\\nxla.lower_fun_init...
Python
Apache License 2.0
google/jax
fix error when doing forward-mode of odeint (#3566) fixes #3558
260,676
26.06.2020 18:40:00
-3,600
99a43f20db0c35f6da5d2dfc636bd57bd5bfad6e
Added missing is_stable argument to lax.sort
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1196,8 +1196,8 @@ def cumprod(operand: Array, axis: int) -> Array:\n\"\"\"Computes a cumulative product along `axis`.\"\"\"\nreturn cumprod_p.bind(operand, axis=int(axis))\n-def sort(operand: Union[Ar...
Python
Apache License 2.0
google/jax
Added missing is_stable argument to lax.sort (#3553)
260,335
26.06.2020 11:44:16
25,200
11caa21eca1634a6c4cd7cd1b94a25110c7929aa
ensure lax.reduce monoid test uses original numpy
[ { "change_type": "MODIFY", "old_path": "jax/lax/lax.py", "new_path": "jax/lax/lax.py", "diff": "@@ -1054,17 +1054,17 @@ def _get_monoid_reducer(monoid_op: Callable, x: Array) -> Optional[Callable]:\ndtype = _dtype(x)\nif (type(aval) is ConcreteArray) and aval.shape == ():\nif monoid_op is add:\n- re...
Python
Apache License 2.0
google/jax
ensure lax.reduce monoid test uses original numpy (#3573)
260,444
27.06.2020 00:19:57
-7,200
42cbe49ce648f909eea9b69e2f70ae33a59ea570
Correction a typo of the period of the PRNG.
[ { "change_type": "MODIFY", "old_path": "docs/notebooks/Common_Gotchas_in_JAX.ipynb", "new_path": "docs/notebooks/Common_Gotchas_in_JAX.ipynb", "diff": "\"id\": \"ORMVVGZJgSVi\"\n},\n\"source\": [\n- \"Underneath the hood, numpy uses the [Mersenne Twister](https://en.wikipedia.org/wiki/Mersenne_Twist...
Python
Apache License 2.0
google/jax
Correction a typo of the period of the PRNG. (#3578)
260,411
27.06.2020 14:55:28
-10,800
496cde6ebcce844f6b9321ce7d73c8fbdd96532d
[jax2tf] Add special case for translation of lax.gather to tf.gather. Also adds more tests for conversion for gather.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -902,19 +902,58 @@ def _gather_shape(operand, start_indices, dimension_numbers, slice_sizes):\nreturn out.shape\n+def _try_tf_gather(operand, start_indices, dimens...
Python
Apache License 2.0
google/jax
[jax2tf] Add special case for translation of lax.gather to tf.gather. (#3486) Also adds more tests for conversion for gather.
260,530
28.06.2020 12:11:12
14,400
7b57dc8c8043163a5e649ba66143ccef880d7d58
Issue1635 expm frechet * Implement Frechet derivatives for expm. * Update expm to use the current custom gradients API. Make some stylistic fixes.
[ { "change_type": "MODIFY", "old_path": "docs/jax.scipy.rst", "new_path": "docs/jax.scipy.rst", "diff": "@@ -16,6 +16,7 @@ jax.scipy.linalg\ndet\neigh\nexpm\n+ expm_frechet\ninv\nlu\nlu_factor\n" }, { "change_type": "MODIFY", "old_path": "jax/scipy/linalg.py", "new_path": "jax/scipy/l...
Python
Apache License 2.0
google/jax
Issue1635 expm frechet (#2062) * Implement Frechet derivatives for expm. * Update expm to use the current custom gradients API. Make some stylistic fixes. Co-authored-by: Peter Hawkins <phawkins@google.com>
260,411
29.06.2020 12:48:27
-10,800
6147026b81bc1a2754cc40bd1de58961a8929c4a
[jax2tf] Add support for custom JVP/VJP * [jax2tf] Add support for custom JVP/VJP The custom VJP/JVP in initial style control-flow primitives make use of special custom_jvp_call_jaxpr primitives * Fix flake
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -80,13 +80,20 @@ def _tfval_remove_unit(args: Sequence[TfValOrUnit]) -> Sequence[TfVal]:\ndef _tfval_add_unit(vals: Sequence[TfValOrUnit],\navals: Sequence[core.Ab...
Python
Apache License 2.0
google/jax
[jax2tf] Add support for custom JVP/VJP (#3581) * [jax2tf] Add support for custom JVP/VJP The custom VJP/JVP in initial style control-flow primitives make use of special custom_jvp_call_jaxpr primitives * Fix flake
260,411
30.06.2020 10:12:22
-10,800
59344028c85ed0c8fad20b052275b572c2d60785
[jax2tf] Fix tf.gather handling of out-of-bounds indices JAX and XLA clamp out-of-bounds indices, while tf.gather aborts. We ensure that when we rewrite lax.gather to tf.gather, we use XLA.
[ { "change_type": "MODIFY", "old_path": "jax/experimental/jax2tf/jax2tf.py", "new_path": "jax/experimental/jax2tf/jax2tf.py", "diff": "@@ -938,9 +938,14 @@ def _try_tf_gather(operand, start_indices, dimension_numbers, slice_sizes):\nreturn None\n# TODO: should we allow ourselves to add a reshape, or ...
Python
Apache License 2.0
google/jax
[jax2tf] Fix tf.gather handling of out-of-bounds indices (#3604) JAX and XLA clamp out-of-bounds indices, while tf.gather aborts. We ensure that when we rewrite lax.gather to tf.gather, we use XLA.