ArrayField.empty_field problem with DatasetReader
- Langage dominant
- Python
- Étoiles
- 592
- Forks
- 58
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I followed your instructions and I'm simply trying to get the predictor working with your dataset.
I see an error on initializing `from allennlp.data.dataset_readers import DatasetReader`
```
Exception has occurred: TypeError
ArrayField.empty_field: return type `None` is not a ``.
File "/mnt/d/github/public/specter/src/allennlp/allennlp/data/fields/array_field.py", line 50, in ArrayField
def empty_field(self): # pylint: disable=no-self-use
File "/mnt/d/github/public/specter/src/allennlp/allennlp/data/fields/array_field.py", line 10, in
class ArrayField(Field[numpy.ndarray]):
File "/mnt/d/github/public/specter/src/allennlp/allennlp/data/fields/__init__.py", line 7, in
from allennlp.data.fields.array_field import ArrayField
File "/mnt/d/github/public/specter/src/allennlp/allennlp/data/instance.py", line 3, in
from allennlp.data.fields.field import DataArray, Field
File "/mnt/d/github/public/specter/src/allennlp/allennlp/data/dataset_readers/dataset_reader.py", line 8, in
```
Here's how I am using it. I am launching the predict_command.py with the following arguments (see below). I even tried running from embed.py with the same arguments you showed in the Readme.md and I get the same error which is why I am investigating it this way. It doesn't even get to reading the arguments and the program has crashed.
```
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Predict_command.py",
"type": "python",
"request": "launch",
"program": "specter/predict_command.py",
"args": [
"archive_file=./model.tar.gz",
"input_file=data/sample-metadata.json",
"--output-file=output.json",
"--batch_size=16",
"--cuda_device=-1",
"--predictor=specter_predictor",
],
"console": "integratedTerminal"
} ]
}
```
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Évaluation
Cette issue n'a pas encore été évaluée.