Skip to content

Commit

Permalink
Merge pull request #4400 from google:nnx-more-optimizations-p2
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 700716670
  • Loading branch information
Flax Authors committed Nov 27, 2024
2 parents be2f861 + 7b50ffe commit 5d896bc
Show file tree
Hide file tree
Showing 6 changed files with 146 additions and 206 deletions.
4 changes: 1 addition & 3 deletions flax/nnx/reprlib.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
import dataclasses
import threading
import typing as tp
from abc import ABC, abstractmethod

A = tp.TypeVar('A')
B = tp.TypeVar('B')
Expand Down Expand Up @@ -48,10 +47,9 @@ class Attr:
end: str = ''


class Representable(ABC):
class Representable:
__slots__ = ()

@abstractmethod
def __nnx_repr__(self) -> tp.Iterator[tp.Union[Object, Attr]]:
raise NotImplementedError

Expand Down
Loading

0 comments on commit 5d896bc

Please sign in to comment.