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

Error training a model for Named Entity Recognition Tagging #1104

Closed
plantroots opened this issue Feb 23, 2021 · 5 comments
Closed

Error training a model for Named Entity Recognition Tagging #1104

plantroots opened this issue Feb 23, 2021 · 5 comments
Labels
bug Something isn't working looking into it

Comments

@plantroots
Copy link

I am trying to train a NER model with this configuration:

input_features:
    -
        name: utterance
        type: text
        level: word
        encoder: rnn
        cell_type: lstm
        reduce_output: null
        preprocessing:
          word_tokenizer: space

output_features:
    -
        name: tag
        type: sequence
        decoder: tagger

The error that I am seeing is:

StagingError: in user code:

    /usr/local/lib/python3.6/dist-packages/ludwig/models/ecd.py:176 train_step  *
        model_outputs = self((inputs, targets), training=True)
    /usr/local/lib/python3.6/dist-packages/ludwig/models/ecd.py:118 call  *
        decoder_outputs = decoder(
    /usr/local/lib/python3.6/dist-packages/ludwig/features/base_feature.py:271 call  *
        logits = self.logits(logits_input, target=target, training=training)
    /usr/local/lib/python3.6/dist-packages/ludwig/features/sequence_feature.py:243 logits  *
        inputs,
    /usr/local/lib/python3.6/dist-packages/ludwig/decoders/sequence_decoders.py:785 _logits_training  *
        return self.call(inputs, training=training, mask=mask)
    /usr/local/lib/python3.6/dist-packages/ludwig/decoders/sequence_decoders.py:774 call  *
        LENGTHS: inputs[LENGTHS]

The input data looks like this:

{
  'utterance': 'Jury awards more than $ 37M to family of Korryn Gaines in civil case against Baltimore County', 
  'tag': 'O O O O O O O O O PERSON PERSON O O O O LOCATION LOCATION'
}

OS: Ubuntu 18.04.5 LTS
Ludwig version: 0.3.3
Python version: 3.6.9

@jimthompson5802 jimthompson5802 added the bug Something isn't working label Feb 24, 2021
@jimthompson5802
Copy link
Collaborator

@plantroots Thank you for submitting the issue. Using the information you provided, I'm able to recreate the issue.

We'll now have to do a more deeper dive to identify root cause and a solution.

@w4nderlust
Copy link
Collaborator

w4nderlust commented Mar 7, 2021

Merged the PR, it should have solved the issue. @plantroots can you confirm please?
Closing for now, will reopen if needed.

@plantroots
Copy link
Author

@w4nderlust Training seems to work now. Thank you!

@guiscaranse
Copy link

guiscaranse commented Mar 11, 2021

@w4nderlust I was also having this issue, any idea when this shipping in a release?

@w4nderlust
Copy link
Collaborator

The issue is solved, so the next release of Ludwig will contain the fix. In the meantime you can install Ludwig from the git repo: pip uninstall ludwig & pip install gut+http://github.com/ludwig-ai/ludwig.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working looking into it
Projects
None yet
Development

No branches or pull requests

4 participants