mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
Fix the pytype error. PyType is looking for a __init__ method. This does not change the behavior of the class.
``` Function PartitionSpec.__init__ expects 1 arg(s), got 3 [wrong-arg-count] Expected: (self) Actually passed: (self, _, _) ``` PiperOrigin-RevId: 441211351
This commit is contained in:
parent
a2c2d9af91
commit
3136004c62
@ -2188,6 +2188,10 @@ class PartitionSpec(tuple):
|
||||
create a separate class for this so JAX's pytree utilities can distinguish it
|
||||
from a tuple that should be treated as a pytree.
|
||||
"""
|
||||
|
||||
def __init__(self, *partitions):
|
||||
pass
|
||||
|
||||
def __new__(cls, *partitions):
|
||||
return tuple.__new__(PartitionSpec, partitions)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user