Skip to content

[bug] MaseGraph's classmethod from_module #209

@ChengZhang-98

Description

@ChengZhang-98

MaseGraph.from_module is a classmethod but accesses to self in line 226.

@classmethod
def from_module(
cls,
model: torch.nn.Module,
cf_args: Optional[Dict[str, Any]] = None,
custom_ops: dict = {},
):
assert isinstance(
model, torch.nn.Module
), f"model must be a torch.nn.Module. Received: {type(model)}"
graph_module = self.trace_torch_module(model, cf_args, custom_ops)
return cls(model=graph_module, cf_args=cf_args)

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