nshutils 0.6.1__tar.gz → 0.7.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nshutils-0.6.1 → nshutils-0.7.0}/PKG-INFO +4 -4
- {nshutils-0.6.1 → nshutils-0.7.0}/pyproject.toml +5 -5
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/actsave/_saver.py +10 -9
- {nshutils-0.6.1 → nshutils-0.7.0}/README.md +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/__init__.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/actsave/__init__.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/actsave/_loader.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/collections.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/logging.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/snoop.py +0 -0
- {nshutils-0.6.1 → nshutils-0.7.0}/src/nshutils/typecheck.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nshutils
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.7.0
|
4
4
|
Summary:
|
5
5
|
Author: Nima Shoghi
|
6
6
|
Author-email: nimashoghi@gmail.com
|
@@ -9,10 +9,10 @@ Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.10
|
10
10
|
Classifier: Programming Language :: Python :: 3.11
|
11
11
|
Classifier: Programming Language :: Python :: 3.12
|
12
|
-
Requires-Dist: beartype
|
13
|
-
Requires-Dist: jaxtyping
|
12
|
+
Requires-Dist: beartype
|
13
|
+
Requires-Dist: jaxtyping
|
14
14
|
Requires-Dist: numpy
|
15
|
-
Requires-Dist: pysnooper
|
15
|
+
Requires-Dist: pysnooper
|
16
16
|
Requires-Dist: typing-extensions
|
17
17
|
Description-Content-Type: text/markdown
|
18
18
|
|
@@ -1,17 +1,17 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "nshutils"
|
3
|
-
version = "0.
|
3
|
+
version = "0.7.0"
|
4
4
|
description = ""
|
5
5
|
authors = ["Nima Shoghi <nimashoghi@gmail.com>"]
|
6
6
|
readme = "README.md"
|
7
7
|
|
8
8
|
[tool.poetry.dependencies]
|
9
9
|
python = "^3.10"
|
10
|
-
pysnooper = "^1.2.0"
|
11
|
-
jaxtyping = "^0.2.33"
|
12
|
-
typing-extensions = "*"
|
13
|
-
beartype = "^0.18.5"
|
14
10
|
numpy = "*"
|
11
|
+
pysnooper = "*"
|
12
|
+
jaxtyping = "*"
|
13
|
+
typing-extensions = "*"
|
14
|
+
beartype = "*"
|
15
15
|
|
16
16
|
|
17
17
|
[tool.poetry.group.dev.dependencies]
|
@@ -15,24 +15,25 @@ from typing_extensions import Never, ParamSpec, TypeVar, override
|
|
15
15
|
|
16
16
|
from ..collections import apply_to_collection
|
17
17
|
|
18
|
-
|
19
|
-
|
18
|
+
if not TYPE_CHECKING:
|
19
|
+
try:
|
20
|
+
import torch # type: ignore
|
20
21
|
|
21
|
-
if not TYPE_CHECKING:
|
22
22
|
Tensor: TypeAlias = torch.Tensor
|
23
|
-
except ImportError:
|
24
|
-
|
23
|
+
except ImportError:
|
24
|
+
torch = None
|
25
25
|
|
26
|
-
if not TYPE_CHECKING:
|
27
26
|
Tensor: TypeAlias = Never
|
27
|
+
else:
|
28
|
+
import torch # type: ignore
|
29
|
+
|
30
|
+
Tensor: TypeAlias = torch.Tensor
|
28
31
|
|
29
|
-
if TYPE_CHECKING:
|
30
|
-
Tensor: TypeAlias = Never
|
31
32
|
|
32
33
|
log = getLogger(__name__)
|
33
34
|
|
34
35
|
Value: TypeAlias = int | float | complex | bool | str | np.ndarray | Tensor | None
|
35
|
-
ValueOrLambda = Value | Callable[..., Value]
|
36
|
+
ValueOrLambda: TypeAlias = Value | Callable[..., Value]
|
36
37
|
|
37
38
|
|
38
39
|
def _torch_is_scripting() -> bool:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|