running the mfa on scientific linux - error with corpus.py

113 views
Skip to first unread message

djdo...@uchicago.edu

unread,
Jul 27, 2017, 3:32:22 PM7/27/17
to MFA Users

Hi,


I’ve been trying to install the MFA on a server at my university. We tried the downloadable version for Linux, and building it from source. We keep running into this same error:

But when we tested get_sample_rate on its own, it works perfectly.


I’m pretty sure our data is formatted correctly, because train_and_align works perfectly when I run it on the same data on my Mac. We’re pretty stumped, and we’re wondering if the problem is that we’re running Scientific Linux. Do you have ideas for how we can keep troubleshooting, or how we can make the MFA work on Scientific Linux?

Thank you,

DJ


Michael McAuliffe

unread,
Jul 31, 2017, 10:28:22 AM7/31/17
to MFA Users, djdo...@uchicago.edu
Hi DJ,

I'm a little stumped as well by that error.  It looks like from some quick googling, it might be related to Python versioning.  Can you double check what version of Python 3 you're running?  It looks like it has to be 3.4+ (I've only really tested it on 3.5 and 3.6).

Cheers,
Michael

Darby Douros

unread,
Jul 31, 2017, 4:55:55 PM7/31/17
to Michael McAuliffe, MFA Users
Hi Michael,

I'm getting the same error running it with python 3.5 and 3.6. Is there anything else I should try?

Thanks,
DJ


Michael McAuliffe

unread,
Aug 1, 2017, 11:35:51 AM8/1/17
to MFA Users, djdo...@uchicago.edu
So just to be clear, you're running MFA via:
 
python3 -m aligner.command_line.train_and_align ~/washotest1 ...

And when you run just 'python3', it says in the start up information that it's version 3.6?

If it doesn't, or if you're running via python, double check that `which python` points to where you want it to point.  If that's still giving you the same error, can you paste the output of those command calls here?

Thanks!

Darby Douros

unread,
Aug 1, 2017, 1:15:28 PM8/1/17
to Michael McAuliffe, MFA Users
I've been manually loading python 3.6.1 each time, because python3 isn't the default on this server.

Here's the output when I manually load python 3.6.1 and run `python3' and `which python,' and then run mfa_train_and_align:

[djdouros@midway-login1 montreal-forced-aligner]$ module load python/3.6.1+intel-16.0
[djdouros@midway-login1 montreal-forced-aligner]$ python3
Python 3.6.1 (default, Jul 13 2017, 07:23:30) 
[GCC Intel(R) C++ gcc 4.4.7 mode] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 
[djdouros@midway-login1 montreal-forced-aligner]$ which python
alias python='python3'
/software/python-3.6.1-el6-x86_64+intel-16.0/bin/python3
[djdouros@midway-login1 montreal-forced-aligner]$ bin/mfa_train_and_align ~/washotest1 ~/attempted_dict_0914S04.txt ~/washotest36
Setting up corpus information...
Traceback (most recent call last):
  File "aligner/command_line/train_and_align.py", line 165, in <module>
  File "aligner/command_line/train_and_align.py", line 52, in align_corpus
  File "aligner/corpus.py", line 309, in __init__
  File "aligner/corpus.py", line 151, in get_sample_rate
AttributeError: __exit__
Failed to execute script train_and_align
[djdouros@midway-login1 montreal-forced-aligner]$ 

Michael McAuliffe

unread,
Aug 1, 2017, 1:25:51 PM8/1/17
to MFA Users, djdo...@uchicago.edu
Ah, ok, so when it gets built, it doesn't use the system version of Python, so if you rebuild it with the updated python 3, the binaries should reflect that.  I'm guessing that the original issue was some compatibility issue with libc or something, right?  And then you built it with the default version of python3 on the system, which was less than 3.4, so any changes to getting 3.6 on there would not be reflected until you rebuild the binaries.

Let me know if that doesn't work!

Darby Douros

unread,
Aug 3, 2017, 1:01:35 PM8/3/17
to Michael McAuliffe, MFA Users

Hi Michael,


We’re getting an error trying to rebuild it with python 3.6. We still want to get the mfa on our server at some point, but for right now I’m going to continue using it on our lab computers.


Thank you so much for taking the time to answer all my questions. I have just a couple more now, that should be simpler: First, can I run the aligner on TextGrids with multiple tiers, but have it only force align one tier? And second, can I “train” it to output more precise alignments if I adjust one of its output TextGrids and run it through again?


DJ


Michael McAuliffe

unread,
Aug 8, 2017, 8:16:14 PM8/8/17
to Darby Douros, MFA Users
Hi DJ,

Sorry for the slow response!  If you rename the tiers you want to skip to "notes" it'll ignore them, but those tiers don't currently get passed through the alignment process.

Unfortunately, there's no way currently to learn from already existing alignments, though that would be nice to have for manually aligned corpora.  A bad hack solution is usually to include more data, since that'll fix some gross alignment errors.

Cheers,
Michael

--
You received this message because you are subscribed to the Google Groups "MFA Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mfa-users+unsubscribe@googlegroups.com.
To post to this group, send email to mfa-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mfa-users/CAM2PkG7C6pRMZfA6O-nMpVcQ_SVCDrO-axkWS2o9M8uA%2BDJmAQ%40mail.gmail.com.

For more options, visit https://groups.google.com/d/optout.

Darby Douros

unread,
Aug 9, 2017, 5:21:39 PM8/9/17
to Michael McAuliffe, MFA Users
Hi Michael,

This clears things up. Thank you so much for all your help!

DJ
Reply all
Reply to author
Forward
0 new messages