Comments (5)
Hi @leerumor,
We have a setup.py
that serves the same purpose as a requirements.txt
.
I can't really tell what is happening from the error. I may need more info to help you. For example:
- which version of AllenNLP are you using?
- can you show me exactly what your call to
run_senteval.py
looks like? And especially, which pre-trained model are you evaluating? - did you install following the install instructions here? This would have installed the correct dependencies from the
setup.py
so you shouldn't need arequirements.txt
(that would be redundant).
from declutr.
Thanks for your reply.
I did following the instructions, here are the versions:
allennlp 1.1.0 pypi_0 pypi
allennlp-models 1.1.0 pypi_0 pypi
pytorch-metric-learning 0.9.96 pypi_0 pypi
typer 0.3.2 pypi_0 pypi
validators 0.18.2 pypi_0 pypi
torch 1.6.0 pypi_0 pypi
I downloaded SentEval toolkit and moved declutr-base to output folder. Then run command:
python scripts/run_senteval.py allennlp "SentEval" "output" \
--output-filepath "output/senteval_results.json" \
--cuda-device 0 \
--include-package "declutr"
from declutr.
The error was because there is no "model" key in config dict:
Params({'trainer': {'use_amp': True}, 'hidden_dropout_prob': 0.1, 'vocab_size': 50265, 'type_vocab_size': 1, 'hidden_act': 'gelu', 'gradient_checkpointing': False, 'attention_probs_dropout_prob': 0.1, 'layer_norm_eps': 1e-05, 'initializer_range': 0.02, 'bos_token_id': 0, 'eos_token_id': 2, 'output_hidden_states': True, 'max_position_embeddings': 514, 'model_type': 'roberta', 'intermediate_size': 3072, 'hidden_size': 768, 'architectures': ['RobertaForMaskedLM'], 'num_attention_heads': 12, 'num_hidden_layers': 12, 'pad_token_id': 1})
but when I added config["model"]="declutr", another error occured:
Traceback (most recent call last):
File "scripts/run_senteval.py", line 732, in <module>
app()
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/typer/main.py", line 214, in __call__
return get_command(self)(*args, **kwargs)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/click/core.py", line 829, in __call__
return self.main(*args, **kwargs)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/click/core.py", line 782, in main
rv = self.invoke(ctx)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/click/core.py", line 610, in invoke
return callback(*args, **kwargs)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/typer/main.py", line 497, in wrapper
return callback(**use_params) # type: ignore
File "scripts/run_senteval.py", line 714, in allennlp
overrides="{'trainer.use_amp': true}",
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/allennlp/models/archival.py", line 191, in load_archive
cuda_device=cuda_device,
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/allennlp/models/model.py", line 369, in load
return model_class._load(config, serialization_dir, weights_file, cuda_device)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/allennlp/models/model.py", line 285, in _load
vocab_dir, vocab_params.get("padding_token"), vocab_params.get("oov_token")
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/allennlp/data/vocabulary.py", line 328, in from_files
base_directory = cached_path(directory, extract_archive=True)
File "/home/hadoop-aipnlp/anaconda3/lib/python3.7/site-packages/allennlp/common/file_utils.py", line 175, in cached_path
raise FileNotFoundError(f"file {url_or_filename} not found")
FileNotFoundError: file output/vocabulary not found
from declutr.
Great, thanks for the extra info.
Will you call ls
on wherever the "output"
folder is on your system and let me know the output? If you downloaded declutr-base
from here, it should contain everything you need.
Alternatively, I have added a notebook in #182 that will walk you through the evaluation process.
from declutr.
Closing this because the notebook should provide enough information to evaluate any of the pre-trained models (or your own models) against SentEval. Please re-open if you are still having difficulties!
from declutr.
Related Issues (20)
- Saving the model in hugging face format is not working
- Does the training notebook not work in windows jupyter notebook HOT 1
- Cant set up DECLUTR in local AWS linux machine HOT 2
- argument 'lazy' for dataset_reader HOT 2
- Superclass initialization in token embedder HOT 2
- Could not lex the character code 194 HOT 3
- Minimum text length violated despite preprocessing HOT 2
- How to plot the learning curve from the output logs created post training of declutr? HOT 1
- Impact of "shorter" documents (span, number of tokens) for extended pretraining HOT 7
- Installation issue HOT 8
- Wrong training procedure? HOT 6
- Strange issue occuring during Training HOT 2
- load pretrained tf1 model with pytorch HOT 5
- How to integrate a longer sequence model like longformer into declutr architecture HOT 8
- Encoder class breaks for long strings
- can i finetune the model ? HOT 2
- Update DeCLUTR requirements? HOT 5
- How to use a validation dataset when training? HOT 8
- RuntimeError: Error(s) in loading state_dict for DeCLUTR: HOT 2
- Error while encoding HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from declutr.