Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default bundle_samples is quite annoying #118

Open
torfjelde opened this issue Mar 10, 2023 · 1 comment
Open

Default bundle_samples is quite annoying #118

torfjelde opened this issue Mar 10, 2023 · 1 comment

Comments

@torfjelde
Copy link
Member

torfjelde commented Mar 10, 2023

The default implementation of bundle_samples specializes on Vector{T}, which in becomes very annoying if you want to implement your own bundle_samples, e.g. if you then use AbstractVector you almost immediately run into ambiguity errors.

function bundle_samples(
samples::Vector, ::AbstractModel, ::AbstractSampler, ::Any, ::Type{Vector{T}}; kwargs...
) where {T}
return map(samples) do sample
convert(T, sample)
end
end

In addition, IIUC it seems quite "useless" given that by default sample already returns a Vector of the transitions?

Thoughts on removing this?

@torfjelde
Copy link
Member Author

Do you have any thoughts on this @devmotion ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant