nshutils 0.21.0__py3-none-any.whl → 0.22.1__py3-none-any.whl

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.
@@ -9,7 +9,7 @@ from dataclasses import dataclass
9
9
  from functools import wraps
10
10
  from logging import getLogger
11
11
  from pathlib import Path
12
- from typing import TYPE_CHECKING, Generic, Literal, cast, overload
12
+ from typing import TYPE_CHECKING, Generic, Literal, Union, cast, overload
13
13
 
14
14
  import numpy as np
15
15
  from typing_extensions import Never, ParamSpec, TypeAliasType, TypeVar, override
@@ -37,9 +37,9 @@ else:
37
37
  log = getLogger(__name__)
38
38
 
39
39
  Value = TypeAliasType(
40
- "Value", int | float | complex | bool | str | np.ndarray | Tensor | None
40
+ "Value", Union[int, float, complex, bool, str, np.ndarray, Tensor, None]
41
41
  )
42
- ValueOrLambda = TypeAliasType("ValueOrLambda", Value | Callable[..., Value])
42
+ ValueOrLambda = TypeAliasType("ValueOrLambda", Union[Value, Callable[..., Value]])
43
43
 
44
44
 
45
45
  def _torch_is_scripting() -> bool:
nshutils/lovely/config.py CHANGED
@@ -1,15 +1,15 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from dataclasses import dataclass
3
4
  from typing import ClassVar
4
5
 
5
- import nshconfig as C
6
6
  from typing_extensions import Self
7
7
 
8
8
 
9
- class LovelyConfig(C.Config):
9
+ @dataclass
10
+ class LovelyConfig:
10
11
  """
11
12
  This class is used to manage the configuration of the Lovely library.
12
- It inherits from the Config class in the nshconfig module.
13
13
  """
14
14
 
15
15
  precision: int = 3
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: nshutils
3
- Version: 0.21.0
3
+ Version: 0.22.1
4
4
  Summary:
5
5
  Author: Nima Shoghi
6
6
  Author-email: nimashoghi@gmail.com
@@ -17,7 +17,6 @@ Provides-Extra: snoop
17
17
  Requires-Dist: beartype
18
18
  Requires-Dist: jaxtyping
19
19
  Requires-Dist: lazy-loader
20
- Requires-Dist: nshconfig
21
20
  Requires-Dist: numpy
22
21
  Requires-Dist: pysnooper ; extra == "extra"
23
22
  Requires-Dist: pysnooper ; extra == "snoop"
@@ -2,14 +2,14 @@ nshutils/__init__.py,sha256=AFx1d5k34MyJ2kCHQL5vrZB8GDp2nYUaIUEjszSa25I,477
2
2
  nshutils/__init__.pyi,sha256=ICbY2_XBAlXIVOGyK4PQpatmlUFHHc5-bqM4sfFZoAY,613
3
3
  nshutils/actsave/__init__.py,sha256=hAVsog9d1g3_rQN1TRslrl6sK1PhCGbjy8PPUAmJI58,203
4
4
  nshutils/actsave/_loader.py,sha256=mof3HezUNvLliz7macstX6ewXW05L0Mtv3zJyrbmImg,4640
5
- nshutils/actsave/_saver.py,sha256=LulgC_B7oYtsGjW_I_pnSLrf1k9lmMvHqRxcmfqqrjU,10441
5
+ nshutils/actsave/_saver.py,sha256=Yu0z7D8RPxc-drieVXvxAwFaaNPJKwMQWBj3zwSm8c0,10454
6
6
  nshutils/collections.py,sha256=QWGyANmo4Efq4XRNHDSTE9tRLStwEZHGwE0ATHR-Vqo,5233
7
7
  nshutils/display.py,sha256=Ge63yllx7gi-MKL3mKQeQ5doql_nj56-o5aoTVmusDg,1473
8
8
  nshutils/logging.py,sha256=78pv3-I_gmbKSf5_mYYBr6_H4GNBGErghAdhH9wfYIc,2205
9
9
  nshutils/lovely/__init__.py,sha256=gbWMNs7xfK1CiNdkHvfH0KcyaGjdZ8_WUBGfaEUDN4I,451
10
10
  nshutils/lovely/_base.py,sha256=c2XxNJlEdET2mP2gLzlYY1KHsEN4H9eDD_x8SptuBTA,4277
11
11
  nshutils/lovely/_monkey_patch_all.py,sha256=WZsC6Xp5-Z2GBd6xyZZEsD4C2xNyZy0YBfjZzAy3m8M,2028
12
- nshutils/lovely/config.py,sha256=jsUK_kfEvthL94qxpHxM-Xobdv67sWZpnH_ag4HLTNo,1274
12
+ nshutils/lovely/config.py,sha256=lVNMuU1oUvsYlGN0Sn-m6iOLbJIchVnWDpyHm09nWo8,1224
13
13
  nshutils/lovely/jax_.py,sha256=mPH-tSOzWE27ymupllBnO4O6avvJJxpF2a1-G4dN5Ow,2214
14
14
  nshutils/lovely/numpy_.py,sha256=iHA4BCJIW9IU6DXKEfYbh9RA2xyeXeL0tyHdEja89Sw,1866
15
15
  nshutils/lovely/torch_.py,sha256=3wnXLa-1xwuQVk1fM50mBqOVDv5wZHjfnBwzOnjcFjg,2638
@@ -17,6 +17,6 @@ nshutils/lovely/utils.py,sha256=2ksT5YGVViFuWc8jSkwVCsABripJmyVJdEDDH7aab70,1045
17
17
  nshutils/snoop.py,sha256=7d7_Q5sJmINL1J29wcnxEvpV95zvZYNoVn5frCq-rww,7393
18
18
  nshutils/typecheck.py,sha256=Gi7xtfilN_UwZ1FTFqBVKDhcQzBEDonVxIv3bUj-uXY,5582
19
19
  nshutils/util.py,sha256=tx-XiRbOrpafV3OkJDE5IVFtzn3kN7uSZ8FkMor0H5c,2845
20
- nshutils-0.21.0.dist-info/METADATA,sha256=Qa4bVvnzN2Ip9fbmuaToECZbRSKhgj-zmaNqTKmXXJ4,4431
21
- nshutils-0.21.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
- nshutils-0.21.0.dist-info/RECORD,,
20
+ nshutils-0.22.1.dist-info/METADATA,sha256=GHCw6WkX4yi-KGaDXf-EVgee6AfYnUPD4Z452Wq14rc,4406
21
+ nshutils-0.22.1.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
22
+ nshutils-0.22.1.dist-info/RECORD,,