allenai / allennlp-hub Goto Github PK
View Code? Open in Web Editor NEWA collection of selected of models built with AllenNLP.
License: Apache License 2.0
A collection of selected of models built with AllenNLP.
License: Apache License 2.0
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.
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)
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.
Minimally http://build.allennlp.org/viewType.html?buildTypeId=AllenNLPHub_Master, maybe also http://build.allennlp.org/viewType.html?buildTypeId=AllenNLPHub_Release.
We have this set up for the main repo, but I can't find where the configuration lives in TC or Slack.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.