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

Parallelized DiscreteHMM.sample() #3053

Merged
merged 6 commits into from
Mar 22, 2022
Merged

Parallelized DiscreteHMM.sample() #3053

merged 6 commits into from
Mar 22, 2022

Conversation

ordabayevy
Copy link
Member

This is a follow up PR to #3050 that proposes to use sampling approach based on parallel-scan algorithm.

Copy link
Member

@fritzo fritzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @ordabayevy! The algorithm looks good to me.

Could you update the docstring to reflect complexity changes, in particular the two paragraphs

This uses [1] to parallelize over time, achieving O(log(time)) parallel
complexity for computing :meth:log_prob and :meth:filter.

and

The :meth:sample method is sequential (not parallized), slow, and memory
inefficient. It is intended for data generation only and is not recommended
during inference.

@fritzo fritzo merged commit 8bc4cd1 into dev Mar 22, 2022
@ordabayevy
Copy link
Member Author

Thanks for reviewing @fritzo !

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

Successfully merging this pull request may close these issues.

None yet

2 participants