Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sh preprocess_raw.sh input.txt fails #18

Open
oholter opened this issue Jun 23, 2021 · 1 comment
Open

sh preprocess_raw.sh input.txt fails #18

oholter opened this issue Jun 23, 2021 · 1 comment

Comments

@oholter
Copy link

oholter commented Jun 23, 2021

Hi!
I would like to try the AMR parser on the pretrained model.
I successfully open StanfordNLPServer, then I try to run the preprocess_raw.sh input.txt-command. It fails when executing the command:

python -u -m stog.data.dataset_readers.amr_parsing.preprocess.feature_annotator \
    ${raw_file}.raw \
    --compound_file ${compound_file}

I'm running the code in a docker container using python 3.6.13 with all dependencies from requirements.txt. The input.txt-file contains two simple sentences. The traceback is pasted below.

Am I missing something?

root@d92e2317f450:/app# sh preprocess_raw.sh input.txt
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/runpy.py", line 183, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/local/lib/python3.6/runpy.py", line 109, in _get_module_details
    __import__(pkg_name)
  File "/app/stog/data/__init__.py", line 1, in <module>
    from stog.data.dataset_readers.dataset_reader import DatasetReader
  File "/app/stog/data/dataset_readers/__init__.py", line 10, in <module>
    from stog.data.dataset_readers.dataset_reader import DatasetReader
  File "/app/stog/data/dataset_readers/dataset_reader.py", line 4, in <module>
    from stog.data.instance import Instance
  File "/app/stog/data/instance.py", line 3, in <module>
    from stog.data.fields.field import DataArray, Field
  File "/app/stog/data/fields/__init__.py", line 7, in <module>
    from stog.data.fields.array_field import ArrayField
  File "/app/stog/data/fields/array_field.py", line 10, in <module>
    class ArrayField(Field[numpy.ndarray]):
  File "/app/stog/data/fields/array_field.py", line 42, in ArrayField
    @overrides
  File "/usr/local/lib/python3.6/site-packages/overrides/overrides.py", line 88, in overrides
    return _overrides(method, check_signature, check_at_runtime)
  File "/usr/local/lib/python3.6/site-packages/overrides/overrides.py", line 114, in _overrides
    _validate_method(method, super_class, check_signature)
  File "/usr/local/lib/python3.6/site-packages/overrides/overrides.py", line 135, in _validate_method
    ensure_signature_is_compatible(super_method, method, is_static)
  File "/usr/local/lib/python3.6/site-packages/overrides/signature.py", line 93, in ensure_signature_is_compatible
    ensure_return_type_compatibility(super_type_hints, sub_type_hints, method_name)
  File "/usr/local/lib/python3.6/site-packages/overrides/signature.py", line 288, in ensure_return_type_compatibility
    f"{method_name}: return type `{sub_return}` is not a `{super_return}`."
TypeError: ArrayField.empty_field: return type `None` is not a `stog.data.fields.field.Field`.
@zjcerwin
Copy link

zjcerwin commented Jul 6, 2021

try downgrading the version of overrides to 3.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants