Add standalone function to join FSAs for FBW V2 op consumption#92
Add standalone function to join FSAs for FBW V2 op consumption#92
Conversation
|
Note: the real reason why this change is happening is because we previously had a copy-paste version of |
|
If you want an utility function I would just move the function definition out of the class into a standalone function. Keep the interface as is for the classes and call the new utility functions inside of the build_batched_fsa methods. |
This reverts commit 9504417.
Interface is left as is
|
Thanks for the feedback! That also makes sense. I've kept the interface and moved the code into its own function. |
The
build_batched_fsafunction is a nice utility function that can be used if you have your own FSAs already built somehow and you want to join them. However, as the code is currently, we have to build an object of any subclass of_RasrFsaBuilderFbw2. This is cumbersome for the user, who has to provide an extra path in the code that represents the RASR config, and wait for the object to be created (which involves extra overhead, lots of debugging messages in the log, etc). It would be ideal to use thebuild_batched_fsafunction without having to explicitly create any instance.This PR sets the
build_batched_fsafunction as static.I also took the liberty of setting
apply_tdp_scale_to_fsa_tupleas static, but this is not too relevant for my use case.