Repository navigation
fix: support {, } and \ in dict keys of differentiable fields - #78
Merged
Merged
Conversation
…ansport works apply_tesseract no longer takes gpu_transport. A call with CUDA tensors asks Tesseract.resolve_gpu_transport() which transport to use. This needs tesseract-core 1.15, which also removed the client internals the previous implementation switched per call, so the floor rises to >=1.15.0.
tesseract-core 1.15 requires {, } and \ in a dict key to be
backslash-escaped inside the key's {...} path segment.
Contributor
Benchmark ResultsBenchmarks measure tesseract-torch execution time using noop and vectoradd Tesseracts. 🚀 0 faster, ✅ No significant performance changes detected. Full results
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #78 +/- ##
==========================================
+ Coverage 90.05% 90.30% +0.24%
==========================================
Files 2 2
Lines 362 361 -1
Branches 67 66 -1
==========================================
Hits 326 326
Misses 12 12
+ Partials 24 23 -1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
apaleyes
reviewed
Oct 21, 2026
apaleyes
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Relevant issue or PR
Stacked on #73, since it needs tesseract-core 1.15, which #73 requires. Merge after #73.
Description of changes
A differentiable leaf inside a
dict[str, Differentiable[...]]field is namedparams.{key}in gradient requests. tesseract-core 1.15 requires{,}and\in the key to be backslash-escaped there. tesseract-torch sent such keys unescaped, so their backward pass failed with a validation error:Keys without these characters are sent as before. A key spelled
{}used to be mistaken for the template itself; it is now escaped like any other concrete key.Testing done
a{b,a}b,{}anda\b.