File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change 21
21
function DynamicPPL. Experimental. _determine_varinfo_jet (
22
22
model:: DynamicPPL.Model ; only_ddpl:: Bool = true
23
23
)
24
- # Use SamplingContext to test type stability.
25
- sampling_model = DynamicPPL. contextualize (
26
- model, DynamicPPL. SamplingContext (model. context)
27
- )
28
-
29
24
# First we try with the typed varinfo.
30
- varinfo = DynamicPPL. typed_varinfo (sampling_model )
25
+ varinfo = DynamicPPL. typed_varinfo (model )
31
26
32
- # Let's make sure that both evaluation and sampling doesn't result in type errors.
27
+ # Let's make sure that evaluation doesn't result in type errors.
33
28
issuccess, result = DynamicPPL. Experimental. is_suitable_varinfo (
34
- sampling_model , varinfo; only_ddpl
29
+ model , varinfo; only_ddpl
35
30
)
36
31
37
32
if ! issuccess
38
33
# Useful information for debugging.
39
- @debug " Evaluaton with typed varinfo failed with the following issues:"
34
+ @debug " Evaluation with typed varinfo failed with the following issues:"
40
35
@debug result
41
36
end
42
37
@@ -46,7 +41,7 @@ function DynamicPPL.Experimental._determine_varinfo_jet(
46
41
else
47
42
# Warn the user that we can't use the type stable one.
48
43
@warn " Model seems incompatible with typed varinfo. Falling back to untyped varinfo."
49
- DynamicPPL. untyped_varinfo (sampling_model )
44
+ DynamicPPL. untyped_varinfo (model )
50
45
end
51
46
end
52
47
You can’t perform that action at this time.
0 commit comments