Skip to content

Conversation

@stefan-it
Copy link
Collaborator

Hi,

I just found some leftovers of the is_world_master() function in the token classification example.

As this method has been removed, the following error message is thrown when using the do_prediction option:

Traceback (most recent call last):
  File "run_ner.py", line 394, in <module>
    main()
  File "run_ner.py", line 372, in main
    if trainer.is_world_master():
AttributeError: 'Trainer' object has no attribute 'is_world_master'

This PR fixes it and uses the new is_world_process_zero() method instead!

@stefan-it
Copy link
Collaborator Author

/cc @sgugger 🤗

@stefan-it stefan-it requested a review from sgugger November 28, 2020 01:14
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing!

@sgugger sgugger merged commit 19fa01c into huggingface:master Nov 30, 2020
@stefan-it stefan-it deleted the fix-token-classification-example branch November 30, 2020 16:20
stas00 pushed a commit to stas00/transformers that referenced this pull request Dec 5, 2020
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

Successfully merging this pull request may close these issues.

3 participants