Skip to content

Commit 70efc60

Browse files
committed
fixup! [Utils] Add deprecation handling for kwargs with deprecate_kwarg decorator (#455)
1 parent 76e25e6 commit 70efc60

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

fla/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# -*- coding: utf-8 -*-
22

3+
from fla._version import __version__
34
from fla.layers import (
45
ABCAttention,
56
Attention,
@@ -68,6 +69,7 @@
6869
)
6970

7071
__all__ = [
72+
'__version__',
7173
'ABCAttention', 'ABCForCausalLM', 'ABCModel',
7274
'Attention', 'TransformerForCausalLM', 'TransformerModel',
7375
'BasedLinearAttention',
@@ -91,5 +93,3 @@
9193
'RWKV6Attention', 'RWKV6ForCausalLM', 'RWKV6Model',
9294
'RWKV7Attention', 'RWKV7ForCausalLM', 'RWKV7Model',
9395
]
94-
95-
__version__ = '0.3.0'

fla/_version.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# -*- coding: utf-8 -*-
2+
3+
__version__ = '0.3.0'

fla/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import triton
1616
from packaging import version
1717

18-
from fla import __version__
18+
from fla._version import __version__
1919

2020
logger = logging.getLogger(__name__)
2121

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313

1414
def get_package_version():
15-
with open(Path(os.path.dirname(os.path.abspath(__file__))) / 'fla' / '__init__.py') as f:
15+
with open(Path(os.path.dirname(os.path.abspath(__file__))) / 'fla' / '_version.py') as f:
1616
version_match = re.search(r"^__version__\s*=\s*(.*)$", f.read(), re.MULTILINE)
1717
return ast.literal_eval(version_match.group(1))
1818

0 commit comments

Comments
 (0)