Skip to content

Commit

Permalink
Move to directory structure for pyproject.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
hristo-vrigazov committed Jan 3, 2024
1 parent 0045160 commit e99bb6e
Show file tree
Hide file tree
Showing 9 changed files with 34 additions and 5 deletions.
2 changes: 1 addition & 1 deletion MICROLIB.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ this example:

```python
import numpy as np
from mmap_ninja import numpy as np_ninja
from src.mmap_ninja import numpy as np_ninja

arr = np.random.randn(200, 224, 224, 3)
np_ninja.from_ndarray('imgs_mmap', arr)
Expand Down
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# pyproject.toml

[build-system]
requires = ["setuptools>=61.0.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "mmap_ninja"
version = "0.7.1"
description = "Microlib for converting LLM weights into sepweight format"
readme = "README.md"
authors = [{ name = "Hristo Vrigazov", email = "[email protected]" }]
license = { file = "LICENSE" }
classifiers = [
"License :: OSI Approved :: MIT License",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
]
dependencies = ["torch"]
requires-python = ">=3.8"

[project.urls]
Homepage = "https://github.com/microlib-org/llm_microlibs/llm_sepweight"

[project.optional-dependencies]
dev = ["safetensors", "pytest", "tqdm", "pytest-dotenv"]
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion mmap_ninja/generic.py → src/mmap_ninja/generic.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from mmap_ninja import base
from mmap_ninja import numpy as np_ninja
from src.mmap_ninja import numpy as np_ninja
from mmap_ninja.base import Wrapped
from mmap_ninja.string import StringsMmap
from mmap_ninja.ragged import RaggedMmap
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion mmap_ninja/ragged.py → src/mmap_ninja/ragged.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

import numpy as np

from mmap_ninja import numpy, base
from mmap_ninja import base
from src.mmap_ninja import numpy


def _np_shape_extend(shapes, arr):
Expand Down
3 changes: 2 additions & 1 deletion mmap_ninja/string.py → src/mmap_ninja/string.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

import numpy as np

from mmap_ninja import numpy, base
from mmap_ninja import base
from src.mmap_ninja import numpy
from mmap_ninja.base import _bytes_to_str, _str_to_bytes, _sequence_of_strings_to_bytes


Expand Down
3 changes: 2 additions & 1 deletion tests/test_numpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@

import numpy as np

from mmap_ninja import numpy as np_ninja, generic
from mmap_ninja import generic
from src.mmap_ninja import numpy as np_ninja


def test_numpy(tmp_path):
Expand Down

0 comments on commit e99bb6e

Please sign in to comment.