Giter Club home page Giter Club logo

Comments (5)

mickvanhulst avatar mickvanhulst commented on August 14, 2024 1

Hi @KDercksen and @ym-han,

I did indeed test BLINK briefly. I agree that the sample code was a bit buggy, but I did get it to work. In the end I was not able to evaluate BLINK on GERBIL as it seemed that they relied on accepting entire corpuses in one go, whereas the GERBIL API only provided the user with one document at a time. This made the API extremely slow and after trying a few things out, I decided to leave it at that.

from rel.

KDercksen avatar KDercksen commented on August 14, 2024

Hi ym-han,

Thanks for your question! Interestingly, this is not something I can reproduce. Could you report back to me the output of:

type(flair.cache_root)

As well as your version of Flair (pip freeze | grep flair)? cache_root should be a path object automatically, in which case the expression flair.cache_root / "models/taggers" is valid.

To force a fix, you might change the definition of fetch_model to def fetch_model(path_or_url, cache_dir=Path(flair.cache_root) / "models/taggers")

from rel.

ym-han avatar ym-han commented on August 14, 2024

Thanks, this is very helpful! You are right that there was an issue with flair and my installation --- after more testing I found that it had to do with how the virtual environment wasn't properly insulated because of the way I had set up my python paths. (I think there was another flair installation in a different virtual environment that was getting called.) But after getting the virtual environment properly insulated, the flair issue went away.

I did find, by the way, that I had to manually copy over models.json --- just doing the installation via the git clone method detailed on the main page hadn't copied that over, and the code needed that to run. But again I could have just set things up wrongly or something.

It would also be helpful for newbies if the docs could be more explicit about how "model_path" in config shouldn't be pointing to a subdirectory of the base url directory or anything like that. As far as I understand from experimentation, "model_path" is just supposed to be ed-wiki-2019 (or 2014 if one wants to use that). But please let me know if I'm wrong!

Finally, it'd also be helpful for newbies if you could provide the prediction scores that you'd got for a bunch of sample data, just so we can check that we are getting the numbers we 'should' be getting --- just so we can be sure that we've installed everything correctly.

P.S.: While going through the repo, I saw that you were benchmarking REL against BLINK. Could I ask how REL fared? (My experience with BLINK was that the interactive thing worked, but the sample code they provided for programmatically / non-interactively supplying arguments to the entity linker seemed buggy.)

from rel.

KDercksen avatar KDercksen commented on August 14, 2024

Thanks, this is very helpful! You are right that there was an issue with flair and my installation --- after more testing I found that it had to do with how the virtual environment wasn't properly insulated because of the way I had set up my python paths. (I think there was another flair installation in a different virtual environment that was getting called.) But after getting the virtual environment properly insulated, the flair issue went away.

Good to hear that's fixed! :-)

I did find, by the way, that I had to manually copy over models.json --- just doing the installation via the git clone method detailed on the main page hadn't copied that over, and the code needed that to run. But again I could have just set things up wrongly or something.

Hmm, that shouldn't be happening... It is possible that it's due to your installation. You could try to reinstall in a clean virtualenv and see if that fixes it automatically, but it sounds like you already solved it for now.

It would also be helpful for newbies if the docs could be more explicit about how "model_path" in config shouldn't be pointing to a subdirectory of the base url directory or anything like that. As far as I understand from experimentation, "model_path" is just supposed to be ed-wiki-2019 (or 2014 if one wants to use that). But please let me know if I'm wrong!

Thanks for the tip. We touch on this in the tutorial on using custom models, but I can understand how it is not immediately obvious from the earlier tutorials. Using just ed-wiki-2019 will download the ED model into your local cache, for example. If you download the model yourself, you should use a full path without extension; e.g. if your ED model resides in /path/to/model_dir with the files /path/to/model_dir/model.config and /path/to/model_dir/model.state_dict, you should pass /path/to/model_dir/model in the ED config dictionary. Hopefully that clears it up a little!

Finally, it'd also be helpful for newbies if you could provide the prediction scores that you'd got for a bunch of sample data, just so we can check that we are getting the numbers we 'should' be getting --- just so we can be sure that we've installed everything correctly.

This would be a nice addition, thanks for the idea!

P.S.: While going through the repo, I saw that you were benchmarking REL against BLINK. Could I ask how REL fared? (My experience with BLINK was that the interactive thing worked, but the sample code they provided for programmatically / non-interactively supplying arguments to the entity linker seemed buggy.)

As far as I remember, REL did a bit better/quicker; maybe @mickvanhulst can chime in, as he did the comparison.

Thanks for your suggestions, we're happy to see some community involvement in REL! Please feel free to ask for further help if you happen to need it. Any other suggestions are also welcome!

from rel.

mickvanhulst avatar mickvanhulst commented on August 14, 2024

Closing this as the issue seems to be resolved. Feel free to open it again if I am wrong :)!

from rel.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.