mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-06-20 12:43:55 +00:00
Fix ColoTensorSpec for py11 (#5440)
This commit is contained in:
parent
a7790a92e8
commit
cbe34c557c
@ -1,4 +1,4 @@
|
||||
from dataclasses import dataclass
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Optional
|
||||
|
||||
from colossalai.legacy.tensor.distspec import DistPlacementPattern, _DistSpec
|
||||
@ -17,5 +17,5 @@ class ColoTensorSpec:
|
||||
"""
|
||||
|
||||
pg: ProcessGroup
|
||||
dist_attr: Optional[_DistSpec] = _DistSpec(DistPlacementPattern.REPLICATE)
|
||||
dist_attr: Optional[_DistSpec] = field(default_factory=lambda: _DistSpec(DistPlacementPattern.REPLICATE))
|
||||
compute_attr: Optional[ComputeSpec] = None
|
||||
|
Loading…
Reference in New Issue
Block a user