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

Retrieval Example: Failed load from saved model #1497

Open
nfrumkin opened this issue Nov 9, 2023 · 0 comments
Open

Retrieval Example: Failed load from saved model #1497

nfrumkin opened this issue Nov 9, 2023 · 0 comments

Comments

@nfrumkin
Copy link

nfrumkin commented Nov 9, 2023

Hello,

I was going through the retrieval example and torch.load() throws an error in two_tower_retrieval.py:

RuntimeError: Need to initialize default process group using "init_process_group" before loading ShardedTensor

I initialize the process group as the error indicates and run into the following error on dmp.load_state_dict(retrieval_sd):

AttributeError: 'Tensor' object has no attribute 'local_shards'

To Reproduce

a. execute two_tower_train.py using command 2 in the retrieval example's README to get the retrieval model.
b. execute two_tower_retrieval.py using command 3.

Any help is appreciated!

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

No branches or pull requests

1 participant