Skip to content

Commit

Permalink
[nnx] fix fiddle
Browse files Browse the repository at this point in the history
  • Loading branch information
cgarciae committed Jan 23, 2025
1 parent e3bcc44 commit 4da0d24
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion flax/nnx/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import dataclasses
import inspect
import sys
import threading
import typing as tp
from abc import ABCMeta
Expand Down Expand Up @@ -157,7 +158,9 @@ def __init_subclass__(cls) -> None:
init=cls._graph_node_init, # type: ignore
)

cls.__signature__ = inspect.signature(cls.__init__)
if 'sphinx-build' in sys.argv[0]:
# set correct signature for sphinx
cls.__signature__ = inspect.signature(cls.__init__)

if not tp.TYPE_CHECKING:

Expand Down

0 comments on commit 4da0d24

Please sign in to comment.