Skip to content

Can't load published pre-trained models #33

@phatcher

Description

@phatcher

I get a native library exception when trying to load pre-trained models downloaded from the Fasttext site e.g. the language identification model, lid.176.bin

Wrote a simple unit test

[Fact]
public void CanLoadBinaryModel()
{
    using var fastText = new FastTextWrapper(loggerFactory: _loggerFactory);
    string file = Path.Combine(_tempDir, "lid.176.bin");

    fastText.LoadModel(file);

    fastText.IsModelReady().Should().BeTrue();
}

which throws the exception

FastText.NetWrapper.NativeLibraryException
C:\Users\paulh\AppData\Local\Temp\1c3778c52cad44aa9de4d24492380b2b\lid.176.bin cannot be opened for loading!

Looking around this seems to imply there's a model version difference between the fasttext binary and the trained model

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions