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

RASR FSA Builder #59

Merged
merged 10 commits into from
Sep 2, 2024
Merged

RASR FSA Builder #59

merged 10 commits into from
Sep 2, 2024

Conversation

DanEnergetics
Copy link
Contributor

Components for building FSAs with the librasr python package and using them in a PyTorch training

Daniel Mann added 2 commits August 23, 2024 08:55
@DanEnergetics
Copy link
Contributor Author

I'm not sure about a test for this. It does require the librasr package, which I'm not sure if we should put it into the requirements and to initialize the AllophoneStateFsaBuilder we would need a RASR config file pointing to a valid lexicon afaik

@JackTemaki
Copy link
Contributor

You "could" add extra dependencies just for a test, including a small dummy lexicon and corpus for testing. While this would be preferable to have, I am not sure if this is within your time-scope.

@DanEnergetics
Copy link
Contributor Author

I would like to do it, actually. Having a small dummy corpus and lexicon is a good idea. However, the installation of librasr is not that simple and I'm not sure how we could make it work with the automatic model_tests.

Copy link
Contributor

@michelwi michelwi left a comment

Choose a reason for hiding this comment

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

Excellent documentation, thank you!

i6_models/parts/fsa.py Outdated Show resolved Hide resolved
fsa by simple left-multiplication and moving the tensors to a different device.
It can simply be passed to `i6_native_ops.fbw.fbw_loss` and `i6_native_ops.fast_viterbi.align_viterbi`.
:param num_states: the total number of all states S
:param edges: a [4, E] tensor of edges where each column is an edge consisting
Copy link
Contributor

Choose a reason for hiding this comment

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

Nitpick: E (I guess number of edges) is undefined here.

DanEnergetics and others added 2 commits August 26, 2024 15:25
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
i6_models/parts/fsa.py Outdated Show resolved Hide resolved
Copy link
Contributor

@michelwi michelwi left a comment

Choose a reason for hiding this comment

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

lgtm now. Would you give it another quick test before merging?

@DanEnergetics DanEnergetics merged commit 1972683 into main Sep 2, 2024
2 checks passed
@DanEnergetics DanEnergetics deleted the daniel_fsa_builder branch September 2, 2024 16:12
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

Successfully merging this pull request may close these issues.

4 participants