{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":699980700,"defaultBranch":"main","name":"optimistix","ownerLogin":"patrick-kidger","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2023-10-03T17:59:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/33688385?v=4","public":true,"private":false,"isOrgOwned":false},"refInfo":{"name":"","listCacheKey":"v0:1716687134.0","currentOid":""},"activityList":{"items":[{"before":null,"after":"b930ea63d7eca56df62dfbde9d4eb72cc319f8b8","ref":"refs/heads/forward-complex","pushedAt":"2024-05-26T01:32:14.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Switched from reverse mode to forward mode where possible.\n\nThis commit switches some functions that unnecessarily use reverse-mode autodiff to using forward-mode autodiff. In particular this is to fix https://github.com/patrick-kidger/optimistix/pull/51#issuecomment-2124401072.\n\nWhilst I\"m here, I noticed what looks like some incorrect handling of complex numbers. I've tried fixing those up, but at least as of this commit the test I've added fails. I've poked at this a bit but not yet been able to resolve this. It seems something is still awry!","shortMessageHtmlLink":"Switched from reverse mode to forward mode where possible."}},{"before":"776820485fd9df320d3089bcd302f2f69124cf14","after":null,"ref":"refs/heads/gauss-newton-jacrev","pushedAt":"2024-05-25T22:34:00.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"65b044eeb1c015faaa754de361461c4f40a2506b","after":null,"ref":"refs/heads/dev","pushedAt":"2024-05-12T12:41:23.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"a1743c14d834f7a180bd1715b667a33d384f7d54","after":"d9b7ba600b029a8d0aabf9a3771b21f8fb96c47a","ref":"refs/heads/main","pushedAt":"2024-05-12T12:41:21.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"bump version","shortMessageHtmlLink":"bump version"}},{"before":"97f107381f403ff777c668b9baf8644534670191","after":"65b044eeb1c015faaa754de361461c4f40a2506b","ref":"refs/heads/dev","pushedAt":"2024-05-11T22:50:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"bump version","shortMessageHtmlLink":"bump version"}},{"before":null,"after":"97f107381f403ff777c668b9baf8644534670191","ref":"refs/heads/dev","pushedAt":"2024-05-08T17:35:48.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"bump version","shortMessageHtmlLink":"bump version"}},{"before":"c30d316a80f2142765c0959f68be910388194190","after":"a1743c14d834f7a180bd1715b667a33d384f7d54","ref":"refs/heads/main","pushedAt":"2024-05-01T12:03:32.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"AbstractGaussNewton now supports reverse-autodiff for Jacobians.\n\nIn particular this is useful when the underlying function only supports reverse-mode autodifferentiation due to a `jax.custom_vjp`, see https://github.com/patrick-kidger/optimistix/issues/50","shortMessageHtmlLink":"AbstractGaussNewton now supports reverse-autodiff for Jacobians."}},{"before":"4d7856150233f58e531dbef0e88af889ed61fc64","after":"c30d316a80f2142765c0959f68be910388194190","ref":"refs/heads/main","pushedAt":"2024-04-20T09:30:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Updated ecosystem","shortMessageHtmlLink":"Updated ecosystem"}},{"before":"0d80f0467a41657da3b22707e6873d6b90f20927","after":"776820485fd9df320d3089bcd302f2f69124cf14","ref":"refs/heads/gauss-newton-jacrev","pushedAt":"2024-03-30T09:00:02.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"AbstractGaussNewton now supports reverse-autodiff for Jacobians.\n\nIn particular this is useful when the underlying function only supports reverse-mode autodifferentiation due to a `jax.custom_vjp`, see https://github.com/patrick-kidger/optimistix/issues/50","shortMessageHtmlLink":"AbstractGaussNewton now supports reverse-autodiff for Jacobians."}},{"before":"890539f6f4504cf5869ff2052c461552b231ceba","after":"4d7856150233f58e531dbef0e88af889ed61fc64","ref":"refs/heads/main","pushedAt":"2024-03-30T08:57:11.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"complex fixes","shortMessageHtmlLink":"complex fixes"}},{"before":null,"after":"0d80f0467a41657da3b22707e6873d6b90f20927","ref":"refs/heads/gauss-newton-jacrev","pushedAt":"2024-03-18T20:43:10.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"AbstractGaussNewton now supports reverse-autodiff for Jacobians.\n\nIn particular this is useful when the underlying function only supports reverse-mode autodifferentiation due to a `jax.custom_vjp`, see https://github.com/patrick-kidger/optimistix/issues/50","shortMessageHtmlLink":"AbstractGaussNewton now supports reverse-autodiff for Jacobians."}},{"before":"07f559a608fa3c06129cad650dfac97988286546","after":"890539f6f4504cf5869ff2052c461552b231ceba","ref":"refs/heads/main","pushedAt":"2024-03-16T08:20:25.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Adds a check in order to prevent terminating on first step for functions with initial condition yielding 0 in function evaluation. Corresponding tests.","shortMessageHtmlLink":"Adds a check in order to prevent terminating on first step for functi…"}},{"before":"92364d4747234341906f23398bc45dcb83bb8235","after":null,"ref":"refs/heads/fix-no-jit","pushedAt":"2024-03-02T12:31:44.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"57be72f9c0c9db02799d38ab6fcd97e98fe779dd","after":"07f559a608fa3c06129cad650dfac97988286546","ref":"refs/heads/main","pushedAt":"2024-03-02T12:31:42.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Fixed compatibility with no-jit. See https://github.com/patrick-kidger/diffrax/issues/368","shortMessageHtmlLink":"Fixed compatibility with no-jit. See patrick-kidger/diffrax#368"}},{"before":"bc363b856503b053779a0ab4ad4ab682f32f9178","after":"57be72f9c0c9db02799d38ab6fcd97e98fe779dd","ref":"refs/heads/main","pushedAt":"2024-02-17T14:47:31.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"added citation to readme","shortMessageHtmlLink":"added citation to readme"}},{"before":"9c269291a4ed37957f085d5f3b0c24410701721b","after":"92364d4747234341906f23398bc45dcb83bb8235","ref":"refs/heads/fix-no-jit","pushedAt":"2024-02-17T01:24:09.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Fixed compatibility with no-jit. See https://github.com/patrick-kidger/diffrax/issues/368","shortMessageHtmlLink":"Fixed compatibility with no-jit. See patrick-kidger/diffrax#368"}},{"before":"e43a265f45f045b2b0623f46e421ef18d6a84f53","after":null,"ref":"refs/heads/successful","pushedAt":"2024-02-17T01:22:17.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":null,"after":"9c269291a4ed37957f085d5f3b0c24410701721b","ref":"refs/heads/fix-no-jit","pushedAt":"2024-02-08T11:40:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Fixed compatibility with no-jit. See https://github.com/patrick-kidger/diffrax/issues/368","shortMessageHtmlLink":"Fixed compatibility with no-jit. See patrick-kidger/diffrax#368"}},{"before":"93b5fbd53fc0e1692c9d82ae6e29528ecf36b6fd","after":null,"ref":"refs/heads/strict-modules","pushedAt":"2024-01-29T22:17:59.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"d29dace8614c21056ee746d11e229094264e06fb","after":"bc363b856503b053779a0ab4ad4ab682f32f9178","ref":"refs/heads/main","pushedAt":"2024-01-29T22:17:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using strict=True","shortMessageHtmlLink":"Now using strict=True"}},{"before":"b63582a60fd30d52455912338ca48c983b8aa79a","after":"d29dace8614c21056ee746d11e229094264e06fb","ref":"refs/heads/main","pushedAt":"2024-01-27T16:41:58.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"removed copyright notice from each file","shortMessageHtmlLink":"removed copyright notice from each file"}},{"before":"8fe194dfc45ca8e160f166d0cff3747bc0826a75","after":"93b5fbd53fc0e1692c9d82ae6e29528ecf36b6fd","ref":"refs/heads/strict-modules","pushedAt":"2024-01-09T18:07:49.000Z","pushType":"force_push","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using strict=True","shortMessageHtmlLink":"Now using strict=True"}},{"before":null,"after":"8fe194dfc45ca8e160f166d0cff3747bc0826a75","ref":"refs/heads/strict-modules","pushedAt":"2024-01-09T15:43:36.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using strict=True","shortMessageHtmlLink":"Now using strict=True"}},{"before":"a3f684eb9d7b617a6c4b5c4e16a293a22355641c","after":null,"ref":"refs/heads/strict-numpy","pushedAt":"2024-01-02T22:26:07.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"f148f2cc510b527c8da071969eee163a1cf89a3a","after":"b63582a60fd30d52455912338ca48c983b8aa79a","ref":"refs/heads/main","pushedAt":"2024-01-02T22:26:04.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using strict rank and dtype promotions when testing.","shortMessageHtmlLink":"Now using strict rank and dtype promotions when testing."}},{"before":"e253acea3ef304226df1765f788d5f7d33339bee","after":"f148f2cc510b527c8da071969eee163a1cf89a3a","ref":"refs/heads/main","pushedAt":"2024-01-02T22:25:37.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Typo fix","shortMessageHtmlLink":"Typo fix"}},{"before":"5528cc3cf16ed39a97236730e24d3a6ff7a8059d","after":"e253acea3ef304226df1765f788d5f7d33339bee","ref":"refs/heads/main","pushedAt":"2024-01-02T22:17:09.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Fix small typo in index.md","shortMessageHtmlLink":"Fix small typo in index.md"}},{"before":null,"after":"a3f684eb9d7b617a6c4b5c4e16a293a22355641c","ref":"refs/heads/strict-numpy","pushedAt":"2023-12-30T20:06:39.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using strict rank and dtype promotions when testing.","shortMessageHtmlLink":"Now using strict rank and dtype promotions when testing."}},{"before":"b2c7c2a05f8664e9531cfef8c9612535905f85c8","after":null,"ref":"refs/heads/dev","pushedAt":"2023-12-27T16:55:59.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"}},{"before":"c4299ee07265211acbd012246fa21a01684fd218","after":"5528cc3cf16ed39a97236730e24d3a6ff7a8059d","ref":"refs/heads/main","pushedAt":"2023-12-27T16:55:56.000Z","pushType":"pr_merge","commitsCount":8,"pusher":{"login":"patrick-kidger","name":"Patrick Kidger","path":"/patrick-kidger","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/33688385?s=80&v=4"},"commit":{"message":"Now using the same jaxpr in the state.\n\nThis is quite an important fix!\n\nThe bit that matters here is that the `f_eval_info.jac` in\n`AbstractGaussNewton.step` now throws away its static (non-array) parts\nof its PyTree, and instead uses the equivalent static (non-array) parts\nof `state.f_info.jac`, i.e. as were computed in\n`AbstractGaussNewton.init`.\n\nNow at a logical level this shouldn't matter at all: the static pieces\nshould be the same in both cases, as they're just the output of\n`_make_f_info` with similarly-structured inputs.\n\nHowever, `_make_f_info` calls `lx.FunctionLinearOperator` which calls\n`eqx.filter_closure_convert` which calls `jax.make_jaxpr` which returns\na jaxpr... and so between the two calls to `_make_f_info`, we actually\nend up with two jaxprs. Both encode the same program, but are two\ndifferent Python objects. Now jaxprs have `__eq__` defined according to\nidentity, so these two (functionally identical) jaxprs do not compare\nas equal.\n\nPreviously we worked around this inside `_iterate.py`: we carefully\nremoved or wrapped any jaxprs before anything that would try to compare\nthem for equality. This was a bit ugly, but it worked.\n\nHowever, it turns out that this still left a problem when manually\nstepping an Optimistix solver! (In a way akin to an Optax solver:\nsomething like\n```python\n@eqx.filter_jit\ndef make_step(...):\n ... = solver.step(...)\n\nfor ... in ...: # Python level for-loop\n ... = make_step(...)\n```\n)\nthen in fact on every iteration of the Python loop, we would end up\nrecompiling, as we always gets a new jaxpr at\n```\nstate # state for the Gauss-Newton solver\n .f_info # as returned by _make_f_info\n .jac # the FunctionLinearOperator\n .fn # the closure-converted function\n .jaxpr # the jaxpr from the closure conversion\n```\n!\n\nNow one fix is simply to demand that manually stepping a solver\nrequires similar hackery as we had in `_iterate.py`. But maybe enough\nis enough, and we should try doing something better instead: that is,\nwe do what this PR does, and just preserves the same jaxpr all the way\nthrough.\n\nFor bonus points, this means that we can now remove our special jaxpr\nhandling from `_iterate.py` (and from `filter_cond`, which also needed\nthis for the same reason).\n\nFinally, you might be wondering: why do we need to trace two equivalent\njaxprs at all? This seems inefficient -- can we arrange to trace it\njust once? The answer is \"probably, but not in this PR\". This seems to\nrequire that (a) Lineax offer a way to turn off closure conversion\n(done in https://github.com/google/lineax/pull/71), but that (b) when\nusing this, this still seems to trigger a similar issue in JAX, that\nthe primal and tangent results from `jax.custom_jvp` match. So for now\nthis is just something to try and tackle later -- once we do, we'll get\nslightly better compile times.","shortMessageHtmlLink":"Now using the same jaxpr in the state."}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEU_GhUwA","startCursor":null,"endCursor":null}},"title":"Activity · patrick-kidger/optimistix"}