Repository navigation
varnamedtuple: tuple nodes and partial-array storage - #1539
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1539 +/- ##
==========================================
+ Coverage 84.84% 85.07% +0.22%
==========================================
Files 52 52
Lines 4626 4663 +37
==========================================
+ Hits 3925 3967 +42
+ Misses 701 696 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
DynamicPPL.jl documentation for PR #1539 is available at: |
Contributor
BenchmarksPerformance Ratio: gradient time divided by log-density time. For very small models these ratios are noisy across runs and machines; raw primal and gradient timings are more reliable. The benchmarks are aimed at DynamicPPL developers and mainly catch obvious allocation or type-stability regressions. See benchmark notes for details. Primal times: EnvironmentJulia Version 1.13.4 Commit c1ac32ab733 (2026-11-13 17:30 UTC) Build Info: Official https://julialang.org release Platform Info: OS: Linux (x86_64-linux-gnu) CPU: 4 × AMD EPYC 9V74 80-Core Processor WORD_SIZE: 64 LLVM: libLLVM-20.1.8 (ORCJIT, znver4) GC: Built with stock GC Threads: 1 default, 1 interactive, 1 GC (on 4 virtual cores) |
yebai
force-pushed
the
vnt-tuples
branch
2 times, most recently
from
November 18, 2026 10:13
c2ff02a to
e688d90
Compare
Retain unassigned storage when widening, copying and merging partial values. Accept same-type tuple templates. Boolean-mask and empty integer-vector indices work without a template; they threw a `BoundsError` and an `ArgumentError`. Assisted-by: Claude Code <noreply@anthropic.com>
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Split of #1529 (part 1 of 12). Part 4 stores
conditionandfixvalues in aVarNamedTuplekeyed by address, such asx[1] => v, and copies and merges these tables whenever bindings change. This PR adds the storage that requires:x = (0.0, 0.0); x[1] ~ Normal(); x[2] ~ Normal(),rand(model)records both elements instead of throwing, andfix(model; x=(1.0, 2.0))now takes effect. Mixed-type tuple values such as(1.0, 2)throw anArgumentError, as does indexing into one stored in aVarNamedTuple(main returned the element).Arraystorage with unassigned elements, such as anOffsetArrayof vectors, no longer throws anUndefRefError.Independently of bindings, Boolean-mask and empty integer-vector indices work without a template (they threw a
BoundsErrorand anArgumentError), andtemplated_setindex!!accepts anotherVarNamedTuple's storage as a template.Tests are in
test/varnamedtuple.jl, with the model-level tuple checks intest/compiler.jl; HISTORY records each change.