Closed BWStearns closed 4 months ago
Please read the docs carefully, especially sections 10.4 and 10.5 in the readme. Your service tries to load all language models into memory in the first call of detect_language_of()
. It is better to preload the language models before doing the first classification:
let detector = LanguageDetectorBuilder::from_all_languages().with_preloaded_language_models().build();
However, in your case this will fail as well because you don't have enough memory. You need at least 1 GB RAM to load all language models. An alternative would be to restrict the languages to be loaded.
Ahhh ok. Sorry about the confusion! I missed that section.
When calling
detect_language_of
on my ECS service it appears to get stuck and just hang forever. Interestingly this doesn't happen locally. I've gated theAnd in the logs I end up with the following and then my worker just hangs forever. It doesn't panic as far as I can tell.
And it never gets to Language Detected. Any ideas on why it might be getting stuck? Each container only has memory 512 and cpu 256. Does this need a bigger container?
Edit to add: It seems to happen especially so with short inputs and with German and English in particular. Short French and Russian inputs came back fine, and sufficiently long inputs came back fine. Some examples below (there is a spelling error, but my use case is for a writing assistant so hopefully it doesn't hang if there's typos).
Warum konnen wit nicht?
Wie viel kostet die kekse?