Closed bikegirl closed 4 years ago
Not all the usage information works in v0.9.0. We have a release candidate out (allennlp-v1.0.0.rc1
) that should be able to run this model. I'm going to update the demo on Monday.
Do I need to update allennlp somehow locally on my virtenv or should I remove the virtenv and just create a new one with the newly update allennlp release candidate?
@bikegirl you can probably re-use your existing environment but I typically just create a new one to be safe. We have the release candidate out now and the demo has updated usage information.
Okay awesome, I will test this out and update.
I tried to install the new release, but it didn't work.
I removed my conda virtenv and start anew. These were my steps:
conda create --name allenlp python=3.6.10
conda activate allennlp
conda install allennlp==1.0.0rc1 allennlp-models==1.0.0rc1
I get this error:
Try pip install allennlp==1.0.0rc1
instead. I recommend following the instructions in our README.md.
The simple pip install allennlp==1.0.0rc1
does not work either for me.
My terminal reports a "successful" installation of allennlp when I run that command (mainly b/c I've already installed it successfully supposedly), but when I type conda list
to confirm the package was installed in my environment or I try to import allennlp, it says there is no such module.
See photos attached.
I can try the readme again, but the read me has same instructions.
I wanted to make a comment above, where it says "requirement already satisfied" and it shows it's installed at this path: /Users/rebeccaflores/miniconda3/lib/python3.7/site-packages
I have no idea why it was installed in this path if I pip installed
while I was in my virtual environment. I would have expected something along the lines of: /Users/rebeccaflores/miniconda3/
envs/allennlp/lib/python3.7/site-packages
so I have no idea what's going on. I don't know if I should uninstall if from my base so that I can have it only in my allennlp environments or just leave it as is and not mess with it.
Anyhow, from my base path I am able to use all the tools I want locally at least.
I'm sorry, but I also have no idea by this point... I'm able to use it in my environment but clearly it's not working in yours.
Haha who knows. I really need the tools right now, so since it's working fine on my base I'm not going to mess with it lol. Later this summer I am going to try and delete it from the base and see if I can get it installed and working just in the allennlp virtenv. Thanks for all your help!
@schmmd this is just a friendly ping to make sure you haven't forgotten about this issue 😜
@schmmd this is just a friendly ping to make sure you haven't forgotten about this issue 😜
Closing, as a long time has passed and I wasn't able to reproduce the original issue. @bikegirl I hope you figured something out to get the information back in April! Please open a new issue if there's anything outstanding.
Describe the bug I have an allennlp virt env and have allennlp installed successfully. I am able to use the dep parse predictor perfectly for analysis, but when I use the coref predictor via the same exact steps as the dep parse predictor, it doesn't not work.
To Reproduce Steps to reproduce the behavior
Expected behavior This is an example of using the dependency parser from allennlp `(allennlp) rebeccaflores@Rebeccas-MBP envs % python Python 3.6.10 | packaged by conda-forge | (default, Apr 6 2020, 14:40:13) [GCC Clang 9.0.1 ] on darwin Type "help", "copyright", "credits" or "license" for more information.
System (please complete the following information):
conda install allennlp -c pytorch -c allennlp -c conda-forge
conda install pytorch torchvision -c pytorch
Additional context This is my stack trace for the error: `>>> coref_resolver = Predictor.from_path("https://storage.googleapis.com/allennlp-public-models/coref-spanbert-large-2020.02.27.tar.gz") Traceback (most recent call last): File "", line 1, in
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/predictors/predictor.py", line 105, in from_path
return Predictor.from_archive(load_archive(archive_path), predictor_name)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/models/archival.py", line 153, in load_archive
cuda_device=cuda_device)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/models/model.py", line 321, in load
return cls.by_name(model_type)._load(config, serialization_dir, weights_file, cuda_device)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/models/model.py", line 268, in _load
model = Model.from_params(vocab=vocab, params=model_params)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 274, in from_params
return subclass.from_params(params=params, extras)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 285, in from_params
kwargs = create_kwargs(cls, params, extras)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 147, in create_kwargs
kwargs[name] = annotation.from_params(params=subparams, subextras)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 274, in from_params
return subclass.from_params(params=params, extras)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/modules/text_field_embedders/basic_text_field_embedder.py", line 117, in from_params
for name, subparams in token_embedder_params.items()
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/modules/text_field_embedders/basic_text_field_embedder.py", line 117, in
for name, subparams in token_embedder_params.items()
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/from_params.py", line 260, in from_params
default_to_first_choice=default_to_first_choice)
File "/Users/rebeccaflores/miniconda3/envs/allennlp/lib/python3.6/site-packages/allennlp/common/params.py", line 259, in pop_choice
raise ConfigurationError(message)
allennlp.common.checks.ConfigurationError: "pretrained_transformer_mismatched not in acceptable choices for model.text_field_embedder.token_embedders.tokens.type: ['embedding', 'character_encoding', 'elmo_token_embedder', 'openai_transformer_embedder']"