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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: AttributeError: type object 'ColoParameter' has no attribute 'from_torch_tensor' when run hybrid_parallel example #5571

Open
ztorchan opened this issue Apr 8, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@ztorchan
Copy link

ztorchan commented Apr 8, 2024

馃悰 Describe the bug

I noticed that from_torch_tensor method of class ColoParameter and ColoTensor have been removed in PR #4479
(colossalai/tensor/colo_parameter.py, colossalai/tensor/colo_tensor.py).

But this method was still called under file ColossalAI/colossalai/legacy/pipeline/pipelinable.py

setattr(module, name, ColoParameter.from_torch_tensor(tensor=param.data, requires_grad=param.requires_grad))

which cause error:
AttributeError: type object 'ColoParameter' has no attribute 'from_torch_tensor'

Environment

python 3.10.10
cuda 11.6.1
torch 1.12.1

@ztorchan ztorchan added the bug Something isn't working label Apr 8, 2024
@char-1ee
Copy link

char-1ee commented Apr 8, 2024

The legacy directory is deprecated now. Some code that uses dependencies from legacy is out-of-date. You can try to refer to the new implementations.

@awer-A
Copy link

awer-A commented Apr 9, 2024

@char-1ee When I use the latest version of Colossalai, I get an error "ModuleNotFoundError: No module named 'colossalai.context.moe_context'". I don't know which version of Colossalai I should use. Do you have any good suggestions?

@char-1ee
Copy link

char-1ee commented Apr 9, 2024

@awer-A You can try install colossalai from source. I suggest if you want to set up a distributed training environment with ColossalAI on your server, you can follow the instructions in ColossalAI's docker file https://github.com/hpcaitech/ColossalAI/blob/main/docker/Dockerfile, step by step.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants