Skip to content

stanza 1.6.0 failing IT on linux #38

@RichJackson

Description

@RichJackson

...although passing on Mac.

kazu/utils/stanza_pipeline.py:19: in simple_stanza_init
    stanza_pipeline = stanza.Pipeline(
/tmp/kazu-env/lib/python3.9/site-packages/stanza/pipeline/core.py:235: in __init__
    self.load_list = maintain_processor_list(resources, lang, package, processors, maybe_add_mwt=(not kwargs.get("tokenize_pretokenized")))
/tmp/kazu-env/lib/python3.9/site-packages/stanza/resources/common.py:208: in maintain_processor_list
    add_mwt(processors, resources, lang)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

processors = {'tokenize': 'genia'}
resources = {'af': {'backward_charlm': {'oscar': {'md5': 'af65d719157609173ed04bd6208fc2ae'}}, 'default_dependencies': {'depparse'...b4d7ab922', 'default_processors': {'depparse': 'padt', 'lemma': 'padt', 'mwt': 'padt', 'ner': 'aqmar', ...}, ...}, ...}
lang = 'en'

    def add_mwt(processors, resources, lang):
        """Add mwt if tokenize is passed without mwt.
    
        If tokenize is in the list, but mwt is not, and there is a corresponding
        tokenize and mwt pair in the resources file, mwt is added so no missing
        mwt errors are raised.
    
        TODO: how does this handle EWT in English?
        """
        value = processors[TOKENIZE]
>       if value in resources[lang][PACKAGES] and MWT in resources[lang][PACKAGES][value]:
E       KeyError: 'packages'

/tmp/kazu-env/lib/python3.9/site-packages/stanza/resources/common.py:184: KeyError

The above exception was the direct cause of the following exception:

kazu_test_config = {'ray': {'init': {'_target_': 'ray.init', 'address': None, 'namespace': 'serve', 'num_cpus': None, 'object_store_memor.../github/runner/kazu/kazu/temp_model_pack_test_dir_16816/kazu_model_pack_public/ontologies/global_parser_actions.json'}}

    @requires_model_pack
    def test_equivalent_to_explosion_for_simple_sents(kazu_test_config):
>       st_step: Step = instantiate(kazu_test_config.StanzaStep)

kazu/tests/test_sentence_segmentation.py:53: 

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions