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

Dev #13

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

Dev #13

wants to merge 7 commits into from

Conversation

rouven-spiess
Copy link
Owner

Not a final version here. I started consolidating a new pipeline new_pipeline.py with torchtext instead of torchvision. When I run the script, I get the following error:

/Users/rouvens/PycharmProjects/FedML/FedML/src/fedml/new_pipeline.py
Traceback (most recent call last):
File "/Users/rouvens/PycharmProjects/FedML/FedML/src/fedml/new_pipeline.py", line 2, in
from torchtext.data.utils import get_tokenizer
File "/Users/rouvens/PycharmProjects/FedML/FedML/src/fedml/torchtext.py", line 2, in
from torchtext.data.utils import get_tokenizer
ModuleNotFoundError: No module named 'torchtext.data'; 'torchtext' is not a package

I know that torchtext.data is deprecated, so I tried several versions of torchtext (0.18, 0.4) but without success. After some trials on Stackoverflow and Copilot Chat, I have no more ideas how to solve the issue.

for _text, _label in batch:
text_list.append(_text)
label_list.append(_label)
text_list = pad_sequence(text_list, batch_first=True, padding_value=vocab["<pad>"])
Copy link
Collaborator

Choose a reason for hiding this comment

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

Where is vocab defined?

Copy link
Collaborator

@willfrey willfrey left a comment

Choose a reason for hiding this comment

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

Please see the comment about figuring out where vocab is defined in new_pipeline.py, please! :)

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.

2 participants