[Ez][BE]: Remove accidental classvar#153540
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/153540
Note: Links to docs will display an error until the docs builds have been completed. ❌ 1 New FailureAs of commit 331fa22 with merge base f1de3f9 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
5ea51ea to
43d4b6c
Compare
43d4b6c to
331fa22
Compare
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
|
@pytorchbot revert -m "Broken internal tests, @albanD may you help the author get his PR merged? D74804063" -c ghfirst |
|
@pytorchbot successfully started a revert job. Check the current status here. |
This reverts commit e0dece5. Reverted #153540 on behalf of https://github.com/jeanschmidt due to Broken internal tests, @albanD may you help the author get his PR merged? D74804063 ([comment](#153540 (comment)))
|
@Skylion007 your PR has been successfully reverted. |
| # from run-time to resolve circular dependency. | ||
| from torch.distributed._shard.sharded_tensor import ShardedTensor | ||
|
|
||
| _ShardingDim: TypeAlias = Union[int, str] |
There was a problem hiding this comment.
I'm guess something imported the type Alias from the dataclass internally? I mean we can keep it as a class based TypeAlias but seems silly
There was a problem hiding this comment.
The error is:
Incompatible parameter type [6]: In call `torch.distributed._shard.sharding_spec.chunk_sharding_spec.ChunkShardingSpec.__init__`, for argument `placements`, expected `List[Union[str, _remote_device]]` but got `List[str]`.
There was a problem hiding this comment.
So I guess we need to fix the wrong type internally and not much we can do here?
There was a problem hiding this comment.
This is either an issue with TypeAlias resolution leaving that type unresolved or we need an explicit cast somewhere. Could also be that the TypeAlias was never properly picked up before for some reason
|
@aorenste Would you mind shepherding / debugging this when you get a chance? |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
Untyped variables become ClassVar in dataclasses, this type alias should just be a type alias; no need for it to eb a classvar.
cc @H-Huang @awgu @wanchaol @fegin @fduwjj @wz337 @wconstab @d4l3k @pragupta