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

token-classification: use is_world_process_zero instead of is_world_master() #8828

Merged
merged 1 commit into from
Nov 30, 2020
Merged

token-classification: use is_world_process_zero instead of is_world_master() #8828

merged 1 commit into from
Nov 30, 2020

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 🤗

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.

None yet

3 participants