Skip to content

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

@ztorchan

Description

@ztorchan

🐛 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions