Git Product home page Git Product logo

zero-shot-bert-adapters's People

Contributors

christofid avatar comidan avatar drugilsberg avatar gilpasternak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

zero-shot-bert-adapters's Issues

Model download failed

The model link you provided cannot be accessed at all? Can you directly feed the model into the code? Or explain what kind of pre trained model is useless? Thank you.

Error when running the example in README

After installing all I run the example

model_name = "bert-base-uncased"
device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
berta = model.instantiate_model(2, 2, device, model_name,
                                {"entailment": 0, "contradiction": 1}, path="model.pt", dict=True)

and I get error

AttributeError: 'BertModel' object has no attribute 'add_adapter'

Python version: Python 3.10.6
OS Version: `MacOS Monterey 12.6'

Failing to install using poetry

I tried to install the package on a clean env using the following commands:

poetry add  git+https://github.com/GT4SD/zberta.git

and

poetry add git+ssh://[email protected]/github.com/GT4SD/zberta.git

and I getting the following error:

CalledProcessError

  Command '['git', 'clone', '--recurse-submodules', '--', 'ssh://[email protected]/github.com/GT4SD/zberta.git', '/var/folders/5t/lgg8r5ws1xbdm8pp6kh37ytm0000gn/T/pypoetry-git-zbertaeirek49a']' returned non-zero exit status 128.

  at /usr/local/Cellar/poetry/1.1.15/libexec/lib/python3.10/site-packages/poetry/utils/_compat.py:217 in run
      213│                 process.wait()
      214│                 raise
      215│             retcode = process.poll()
      216│             if check and retcode:
    → 217│                 raise CalledProcessError(
      218│                     retcode, process.args, output=stdout, stderr=stderr
      219│                 )
      220│         finally:
      221│             # None because our context manager __exit__ does not use them.

python version: 3.9 & 3.10
os version: MacOS Monterey 12.6
poetry version: 1.1.15

Training Issue

Hi, Thank you for your making this pipeline open source. I really appreciate that.

I am having an issue in BERTA instance while training. Please find the error and the code.

image

image

Any solution/advice would be really appreciated. Thanks

Need to train the model on any other dataset other than Banking

Hi @comidan, Thanks again for making this pipeline open-source.
I have two concerns.

  1. Whether the model is using both datasets (SNLI and Banking77-OOS) or it’s only using SNLI for the training? if yes, then can you please point out where and how is it used in the code?

  2. It is related to the 1st one as well. Actually, I need to train the BERT-A model with any other dataset other than Banking77-OOS to generate unknown intents. Can you please guide me on how to do that?

Error while running sample code on Colab

---> 15 z_intents = unknown_intents_set("en_core_web_trf", z_dataset['test']['text'])
16 berta = model.instantiate_model(z_banking.labels(), z_banking.output_dim(), device, model_name,
17 z_banking.nli_labels(), path="model.pt", dict=True)

/usr/local/lib/python3.7/dist-packages/zberta/intent_discovery/unknown_intents.py in unknown_intents_set(dataset, spacy_model)
15 def unknown_intents_set(dataset, spacy_model=None):
16 global nlp_engine
---> 17 if spacy_model is not None and spacy_model not in default_spacy:
18 os.system("python -m spacy download " + spacy_model + " --no-deps")
19 nlp_engine = spacy.load(spacy_model)

TypeError: 'in ' requires string as left operand, not list

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.