Closed Mohd-Misran closed 4 years ago
Hi, thanks for reporting this error. Could you provide the pytorch version and device info.
Yu Zhang Soochow University
From: Mohammed Misran notifications@github.com Sent: Thursday, July 30, 2020 8:02:02 PM To: yzhangcs/parser parser@noreply.github.com Cc: Subscribed subscribed@noreply.github.com Subject: [yzhangcs/parser] AttributeError: module 'torch.distributed' has no attribute 'is_initialized' (#37)
I loaded the crf-con-en model to the Parser. Then I tried to use the predict() function on a list of English tokens. But I get the above error. Need help on how to debug this!
` from supar import Parser import nltk
parser = Parser.load("crf-con-en")
text = nltk.word_tokenize("John, who is the CEO of a company, played golf.")
output = parser.predict(data=[text], verbose=False) `
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/yzhangcs/parser/issues/37, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AEMMYK72IAG3GAWY42BNLK3R6FOLVANCNFSM4PNSP65A.
@yzhangcs
Torch version 1.5.1 Windows 10 Pro
@Mohd-Misran You could check if torch.distributed.is_available()
is True
(https://github.com/facebookresearch/maskrcnn-benchmark/issues/280).
@yzhangcs
torch.distributed.is_available()
is False
@Mohd-Misran It seems that distributed training is not supported on Windows.
@Mohd-Misran DDP is supported on Windows since torch 1.7.
I loaded the crf-con-en model to the Parser. Then I tried to use the predict() function on a list of English tokens. But I get the above error. Need help on how to debug this!
Here's my code:
from supar import Parser
import nltk
parser = Parser.load("crf-con-en")
text = nltk.word_tokenize("John, who is the CEO of a company, played golf.")
output = parser.predict(data=[text], verbose=False)
Complete error log:
AttributeError Traceback (most recent call last)