@@ -49,7 +49,7 @@ Return `N` samples from the MCMC `sampler` for the provided `model`.
49
49
50
50
A callback function `f` with type signature
51
51
```julia
52
- f(rng, model, sampler, N , iteration, transition; kwargs... )
52
+ f(rng, model, sampler, transition , iteration)
53
53
```
54
54
may be provided as keyword argument `callback`. It is called after every sampling step.
55
55
"""
@@ -60,7 +60,7 @@ function mcmcsample(
60
60
N:: Integer ;
61
61
progress = true ,
62
62
progressname = " Sampling" ,
63
- callback = (args... ; kwargs ... ) -> nothing ,
63
+ callback = (args... ) -> nothing ,
64
64
chain_type:: Type = Any,
65
65
kwargs...
66
66
)
@@ -75,7 +75,7 @@ function mcmcsample(
75
75
transition = step! (rng, model, sampler, N; iteration= 1 , kwargs... )
76
76
77
77
# Run callback.
78
- callback (rng, model, sampler, N , 1 , transition; kwargs ... )
78
+ callback (rng, model, sampler, transition , 1 )
79
79
80
80
# Save the transition.
81
81
transitions = transitions_init (transition, model, sampler, N; kwargs... )
@@ -90,7 +90,7 @@ function mcmcsample(
90
90
transition = step! (rng, model, sampler, N, transition; iteration= i, kwargs... )
91
91
92
92
# Run callback.
93
- callback (rng, model, sampler, N , i, transition; kwargs ... )
93
+ callback (rng, model, sampler, transition , i)
94
94
95
95
# Save the transition.
96
96
transitions_save! (transitions, i, transition, model, sampler, N; kwargs... )
@@ -119,7 +119,7 @@ and should return `true` when sampling should end, and `false` otherwise.
119
119
120
120
A callback function `f` with type signature
121
121
```julia
122
- f(rng, model, sampler, N , iteration, transition; kwargs... )
122
+ f(rng, model, sampler, transition , iteration)
123
123
```
124
124
may be provided as keyword argument `callback`. It is called after every sampling step.
125
125
"""
@@ -131,7 +131,7 @@ function mcmcsample(
131
131
chain_type:: Type = Any,
132
132
progress = true ,
133
133
progressname = " Convergence sampling" ,
134
- callback = (args... ; kwargs ... ) -> nothing ,
134
+ callback = (args... ) -> nothing ,
135
135
kwargs...
136
136
)
137
137
# Perform any necessary setup.
@@ -142,7 +142,7 @@ function mcmcsample(
142
142
transition = step! (rng, model, sampler, 1 ; iteration= 1 , kwargs... )
143
143
144
144
# Run callback.
145
- callback (rng, model, sampler, 1 , 1 , transition; kwargs ... )
145
+ callback (rng, model, sampler, transition , 1 )
146
146
147
147
# Save the transition.
148
148
transitions = transitions_init (transition, model, sampler; kwargs... )
@@ -155,7 +155,7 @@ function mcmcsample(
155
155
transition = step! (rng, model, sampler, 1 , transition; iteration= i, kwargs... )
156
156
157
157
# Run callback.
158
- callback (rng, model, sampler, 1 , i, transition; kwargs ... )
158
+ callback (rng, model, sampler, transition , i)
159
159
160
160
# Save the transition.
161
161
transitions_save! (transitions, i, transition, model, sampler; kwargs... )
@@ -244,4 +244,4 @@ function mcmcpsample(
244
244
245
245
# Concatenate the chains together.
246
246
return reduce (chainscat, chains)
247
- end
247
+ end
0 commit comments