Closed jtrmal closed 3 days ago
So, on linux the tests fail to compile with the same error. So I guess it's not just apple/clang weirdness.
Let me help you.
You can change
../fstext/trivial-factor-weight.h:393:14
from
data->base = new StateIterator< TrivialFactorWeightFst<A, F> >(*this);
to
data->base.reset(new StateIterator< TrivialFactorWeightFst<A, F> >(*this));
By the way, if you need to support multiple openfst versions, then you can do
#if OPEN_FST_VERSION_XXX
data->base = new StateIterator< TrivialFactorWeightFst<A, F> >(*this);
#elif OPEN_FST_VERSION_YYY
data->base.reset(new StateIterator< TrivialFactorWeightFst<A, F> >(*this));
#endif
HINT:
data->base
was a raw pointer, but it is changed to a std::unique_ptr
in openfst 1.8.3
The test is failing because of line src/fstextra/lattice-utils-test.cc:109 I modified it thusly
// since semiring is idempotent, this should succeed too.
std::cout << "Distance: " << ShortestDistance(cfst) << " x " << ShortestDistance(nbest_fst_1b) << std::endl;
assert(ApproxEqual(ShortestDistance(cfst),
ShortestDistance(nbest_fst_1b)));
The output is:
Distance: 0,1.25,1_2 x 0,1.25,
lattice-utils-test: lattice-utils-test.cc:109: void fst::TestShortestPath() [with Weight = fst::LatticeWeightTpl<double>; Int = int]: Assertion `ApproxEqual(ShortestDistance(cfst), ShortestDistance(nbest_fst_1b))' failed.
NB: I was able to repro it on another machine/distro.
Full log from the test lattice-utils-test.testlog.txt
Full log from the test lattice-utils-test.testlog.txt
Have you fixed it?
I didn't, yet, apologies. I might be able to do it next week. Or if you want to take a stab at it...? Y.
On Wed, Jul 31, 2024 at 04:44 Fangjun Kuang @.***> wrote:
Full log from the test lattice-utils-test.testlog.txt https://github.com/user-attachments/files/16380954/lattice-utils-test.testlog.txt
Have you fixed it?
— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/pull/4927#issuecomment-2259532130, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYXZ5U7W6XI4XAGESXYDZPBFRXAVCNFSM6AAAAABLOEXNFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJZGUZTEMJTGA . You are receiving this because you authored the thread.Message ID: @.***>
I can take a stab at it tomorrow… To be more precise, it's like 6 in the morning here, and it's still "today", so tomorrow can be any time within 24h from now...
I had my wife check that it compiles for her and it was OK. I want to keep this moving or people will become dispirited from the slow progress, so I'll merge this and if there are problems we'll fix them later.
Wait, I see there's a test failing, let me see if I can fix it. Edit: can't reproduce right now as we're having problems connecting to the outside from our servers.
Does anyone have time to run the tests locally and see what the output of the failing test (lattice-utils-test I think) is? Our systems have some issues right now that make this difficult.
The issue does not seem to happen with OpenFST 1.7.2. Trying with 1.8.3 which is what the failed test ran with.
OK, I have not been able to reproduce the issue with openfst-1.8.3 because of this: /star-dan/kaldi/tools/openfst-1.8.3/missing: line 81: aclocal-1.16: command not found but let me just merge anyway because it looks like it doesn't hurt with earlier versions of OpenFST so nothing is broken that was working before. We can fix this later.
Weird, I cannot reproduce the issue either. I'm confused, but hey, at least it's working y.
On Sun, Sep 8, 2024 at 9:32 AM Daniel Povey @.***> wrote:
Merged #4927 https://github.com/kaldi-asr/kaldi/pull/4927 into master.
— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/pull/4927#event-14173472505, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACUKYX6VSMOCVKPEZSILL63ZVP4RVAVCNFSM6AAAAABLOEXNFCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGE3TGNBXGI2TANI . You are receiving this because you authored the thread.Message ID: @.***>
we could perhaps add something to the github actions to cat the .testlog file to the screen on failing test?
On Mon, Sep 9, 2024 at 4:53 PM jtrmal @.***> wrote:
Weird, I cannot reproduce the issue either. I'm confused, but hey, at least it's working y.
On Sun, Sep 8, 2024 at 9:32 AM Daniel Povey @.***> wrote:
Merged #4927 https://github.com/kaldi-asr/kaldi/pull/4927 into master.
— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/pull/4927#event-14173472505, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ACUKYX6VSMOCVKPEZSILL63ZVP4RVAVCNFSM6AAAAABLOEXNFCVHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJUGE3TGNBXGI2TANI>
. You are receiving this because you authored the thread.Message ID: @.***>
— Reply to this email directly, view it on GitHub https://github.com/kaldi-asr/kaldi/pull/4927#issuecomment-2337524025, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAZFLO3DB5NRE4XUOV3NEJDZVVOZ7AVCNFSM6AAAAABLOEXNFCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZXGUZDIMBSGU . You are receiving this because you modified the open/close state.Message ID: @.***>
I'll do my best to look at it today. As soon as I crawl out of the comms closet. Looks like I got me my Internet back...
I added a thin compatibility layer (and a few ifdefs) By default the build infrastructure uses OpenFST-1.7.2 and there should be no change compared to current pipelines. It is however switch the openFst version while making
/tools
like so:and after that the version should be picked up by
configure
(also to be re-run) and flags will be appropriately defined. Will be grateful for reviews/testing --so far I tested only on Apple M3For 1.8.3, not all tests will compile. There are two outstanding tests failing to compile with this error:
if anyone can help me figure out the issue, I will be grateful
cc: @georgthegreat @mmcauliffe