GithubHelp home page GithubHelp logo

allennlp-hub's People

Contributors

brendan-ai2 avatar dirkgr avatar schmmd 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

Watchers

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

allennlp-hub's Issues

Error loading pretrained models

I'm getting the following error when trying to load the pretrained NER model

  File "<stdin>", line 1, in <module>
  File "utils.py", line 111, in fine_grained_ner_model
    "sentence-tagger",
  File "utils.py", line 17, in _load_predictor
    archive = load_archive(archive_file)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/models/archival.py", line 230, in load_archive
    cuda_device=cuda_device)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/models/model.py", line 327, in load
    return cls.by_name(model_type)._load(config, serialization_dir, weights_file, cuda_device)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/models/model.py", line 265, in _load
    model = Model.from_params(vocab=vocab, params=model_params)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 365, in from_params
    return subclass.from_params(params=params, **extras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 386, in from_params
    kwargs = create_kwargs(cls, params, **extras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 133, in create_kwargs
    kwargs[name] = construct_arg(cls, name, annotation, param.default, params, **extras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 229, in construct_arg
    return annotation.from_params(params=subparams, **subextras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 365, in from_params
    return subclass.from_params(params=params, **extras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/modules/text_field_embedders/basic_text_field_embedder.py", line 160, in from_params
    for name, subparams in token_embedder_params.items()
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/modules/text_field_embedders/basic_text_field_embedder.py", line 160, in <dictcomp>
    for name, subparams in token_embedder_params.items()
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/from_params.py", line 365, in from_params
    return subclass.from_params(params=params, **extras)
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/modules/token_embedders/elmo_token_embedder.py", line 110, in from_params
    options_file = params.pop('options_file')
  File "/home/ubuntu/anaconda3/envs/test-env/lib/python3.7/site-packages/allennlp/common/params.py", line 260, in pop
    raise ConfigurationError("key \"{}\" is required at location \"{}\"".format(key, self.history))
allennlp.common.checks.ConfigurationError: 'key "options_file" is required at location "model.text_field_embedder.token_embedders.elmo."'

How do I pass the options_file to the ELMO model? I tried passing it as a json key in the overrides argument of the load_archive method, but to no avail.

Access denied for model https://s3-us-west-2.amazonaws.com/allennlp/models/bert-base-srl-2020.02.10.tar.gz

I am trying to use the bert-base model for SRL, but I get access denied, i.e.:
OSError: HEAD request failed for url https://s3-us-west-2.amazonaws.com/allennlp/models/bert-base-srl-2020.02.10.tar.gz with status code 403
Using this code:

from allennlp import predictors
from allennlp_hub.pretrained.helpers import _load_predictor
import allennlp.models

def bert_srl_shi_2019() -> predictors.SemanticRoleLabelerPredictor:
    predictor = _load_predictor(
        "https://s3-us-west-2.amazonaws.com/allennlp/models/bert-base-srl-2020.02.10.tar.gz",
        "semantic-role-labeling",
    )
    return predictor


predictor = bert_srl_shi_2019()
output = predictor.predict(
  sentence="Did Uriah honestly think he could beat the game in under three hours?"
)
print(output)

Update configs in model archive files

allenai/allennlp#3550 removed a deprecated config file parameter option and made some other breaking config changes. We need to update the config files in all of the pretrained models in this repo, then re-upload the model (probably also updating the link here to an updated one, instead of overwriting the old model). See here for slightly more context.

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.