Giter VIP home page Giter VIP logo

Comments (5)

agolo-alan-hogue avatar agolo-alan-hogue commented on August 26, 2024

Hi!

More fun with GENRE!

I manually replaced np.float with just float, which happens only in fairseq.

That gives another error. I'll paste that one below. So I went to the normal GENRE repo and found this note regarding fairseq here:

fairseq>=0.10 (optional for training GENRE) NOTE: fairseq is going though changing without backward compatibility. Install fairseq from source and use [this](https://github.com/nicola-decao/fairseq/tree/fixing_prefix_allowed_tokens_fn) commit for reproducibilty. See https://github.com/pytorch/fairseq/pull/3276 for the current PR that should fix fairseq/master.

So it sounds to me like if you were to pull or rebase this PR maybe this would fix these problems?

Thanks for your help!

Latest error:

root@3e9ee535d1b0:/GENRE# python3 main.py --yago -i example_article.jsonl  -o out.jsonl --split_iter --mention_trie data/mention_trie.pkl  --mention_to_candidates_dict data/mention_to_candidates_dict.pkl
Traceback (most recent call last):
  File "main.py", line 3, in <module>
    from model import Model
  File "/GENRE/model.py", line 6, in <module>
    from genre.fairseq_model import GENRE
  File "/GENRE/genre/fairseq_model.py", line 15, in <module>
    from fairseq.models.bart import BARTHubInterface, BARTModel
  File "/GENRE/fairseq/fairseq/models/__init__.py", line 208, in <module>
    module = importlib.import_module("fairseq.models." + model_name)
  File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/GENRE/fairseq/fairseq/models/wav2vec/__init__.py", line 6, in <module>
    from .wav2vec import *  # noqa
  File "/GENRE/fairseq/fairseq/models/wav2vec/wav2vec.py", line 25, in <module>
    from fairseq.tasks import FairseqTask
  File "/GENRE/fairseq/fairseq/tasks/__init__.py", line 15, in <module>
    from .fairseq_task import FairseqTask, LegacyFairseqTask  # noqa
  File "/GENRE/fairseq/fairseq/tasks/fairseq_task.py", line 13, in <module>
    from fairseq import metrics, search, tokenizer, utils
ImportError: cannot import name 'metrics' from 'fairseq' (unknown location)

from elevant.

flackbash avatar flackbash commented on August 26, 2024

You set up GENRE from here, right? https://github.com/ad-freiburg/GENRE

If so, then could you please post the same issue in that repository? It was maintained by my colleague and I myself had nothing to do with setting it up and sadly don't know much about it.

from elevant.

agolo-alan-hogue avatar agolo-alan-hogue commented on August 26, 2024

There is no "Issues" tab in that repo, which I think means it is not turned on by the maintainer, so I thought that might mean they should be reported here. Do you think you could ask the maintainer to turn them on?

from elevant.

flackbash avatar flackbash commented on August 26, 2024

Oh I see, I didn't notice. I'll ask him about it!

from elevant.

flackbash avatar flackbash commented on August 26, 2024

It is now possible to open issues in the GENRE repository :)

from elevant.

Related Issues (14)

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.