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

stanza 1.6.0 failing IT on linux #38

Open
RichJackson opened this issue Jun 10, 2024 · 0 comments
Open

stanza 1.6.0 failing IT on linux #38

RichJackson opened this issue Jun 10, 2024 · 0 comments

Comments

@RichJackson
Copy link
Collaborator

...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: 
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

1 participant