Skip to content

[BUG]: self.accelerator.configure(model) #4751

@huangting4201

Description

@huangting4201

🐛 Describe the bug

colossalai/booster/booster.py代码文件第138行self.accelerator.configure(model)

应该改成self.accelerator.configure_model(model)

class Accelerator:
    """
    Accelerator is an abstraction for the hardware device that is used to run the model.

    Args:
        device (str): The device to be used. Currently only support 'cpu' and 'gpu'.
    """

    def __init__(self, device: str):
        ...

    def bind(self):
        ...

    def configure_model(self, model: nn.Module) -> nn.Module:
        """
        Move the model to the device.

        Args:
            model (nn.Module): The model to be moved.
        """
        model = model.to(torch.device(self.device))
        return model

Environment

No response

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