tensorneko 0.3.16__py3-none-any.whl → 0.3.17__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.
@@ -15,6 +15,7 @@ from .dispatched_misc import sparse2binary, binary2sparse
15
15
  from .reproducibility import Seed
16
16
  from .string_getter import get_activation, get_loss
17
17
  from .type import ModuleFactory, Shape, Device
18
+ from .gc import run_gc
18
19
 
19
20
  Rearrange = _Rearrange
20
21
 
@@ -77,4 +78,5 @@ __all__ = [
77
78
  "download_files_thread",
78
79
  "WindowMerger",
79
80
  "Registry",
81
+ "run_gc"
80
82
  ]
tensorneko/util/gc.py ADDED
@@ -0,0 +1,11 @@
1
+ # clear gc for python, pytorch, etc
2
+ import gc
3
+ import torch.cuda
4
+
5
+
6
+ def run_gc():
7
+ """
8
+ Clear memory for Python, PyTorch, etc.
9
+ """
10
+ gc.collect()
11
+ torch.cuda.empty_cache()
tensorneko/version.txt CHANGED
@@ -1 +1 @@
1
- 0.3.16
1
+ 0.3.17
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tensorneko
3
- Version: 0.3.16
3
+ Version: 0.3.17
4
4
  Summary: Tensor Neural Engine Kompanion. An util library based on PyTorch and PyTorch Lightning.
5
5
  Home-page: https://github.com/ControlNet/tensorneko
6
6
  Author: ControlNet
@@ -27,7 +27,7 @@ Requires-Dist: av (>=8.0.3)
27
27
  Requires-Dist: einops (>=0.3.0)
28
28
  Requires-Dist: numpy (>=1.20.1)
29
29
  Requires-Dist: pillow (>=8.1)
30
- Requires-Dist: tensorneko-util (==0.3.16)
30
+ Requires-Dist: tensorneko-util (==0.3.17)
31
31
  Requires-Dist: torch (>=1.9.0)
32
32
  Requires-Dist: torchaudio (>=0.9.0)
33
33
  Requires-Dist: torchmetrics (>=0.7.3)
@@ -2,7 +2,7 @@ tensorneko/__init__.py,sha256=uh1HNn1sNpX1bbOqAE_kNJfrH4eMtEzus0hO-Fh9tEw,990
2
2
  tensorneko/neko_model.py,sha256=QTbdOAg9ki0ix6mDL_Qu8Wmd5WJOoUFF3M1SXEp3KGc,10551
3
3
  tensorneko/neko_module.py,sha256=qELXvguSjWo_NvcRQibiFl0Qauzd9JWLSnT4dbGNS3Y,1473
4
4
  tensorneko/neko_trainer.py,sha256=JC8qoKSZ5ngz3grf3S0SjvIFVktDIP_GExth5aFfbGA,10074
5
- tensorneko/version.txt,sha256=XSXl8BxVFKqB3N-DasVRdbWcnpx7WRAyDr5dG_Eo7DA,6
5
+ tensorneko/version.txt,sha256=sOiNkmvwnZw9dn4Od6oRM8jDNFGeaDoTmEVv7sd2w2k,6
6
6
  tensorneko/arch/__init__.py,sha256=w4lTUeyBIZelrnSjlBFWUF0erzOmBFl9FqeWQuSOyKs,248
7
7
  tensorneko/arch/auto_encoder.py,sha256=j6PWWyaNYaYNtw_zZ9ikzhCASqe9viXR3JGBIXSK92Y,2137
8
8
  tensorneko/arch/binary_classifier.py,sha256=1MkEbReXKLdDksRG5Rsife40grJk08EVDcNKp54Xvb4,2316
@@ -73,9 +73,10 @@ tensorneko/preprocess/enum.py,sha256=Wp5qFaUjea5XU4o3N0WxUd-qfzI-m5vr4ZWSqWjELb4
73
73
  tensorneko/preprocess/pad.py,sha256=b4IbbhGNRotZ7weZcKA7hfDqSixPo5KjM6khnqzaeUA,3238
74
74
  tensorneko/preprocess/resize.py,sha256=hitMlzVnN6n_8nEJwxy4C4ErZrTwpM86QGnYewsrmf8,3469
75
75
  tensorneko/preprocess/face_detector/__init__.py,sha256=_ktIfUZqGTX0hk7RBgKf-zHwG2n9KRH4RS7rjuOI8Bo,262
76
- tensorneko/util/__init__.py,sha256=ztsBVn3NLJanwcYyNYyLtUnws6xLcgP3oHMpkjUQh1o,2172
76
+ tensorneko/util/__init__.py,sha256=1ygIyTqZm1ROCsgQJ9_df5TOezyHx08stMDGjtyMxhE,2208
77
77
  tensorneko/util/configuration.py,sha256=xXeAjDh1FCNTmSPwDdkL-uH-ULfzFF6Fg0LT7gsZ6nQ,2510
78
78
  tensorneko/util/dispatched_misc.py,sha256=_0Go7XezdYB7bpMnCs1MDD_6mPNoWP5qt8DoKuPxynI,997
79
+ tensorneko/util/gc.py,sha256=P3bOZ-2VUNyswnfVz5xfj__ecTSAHpu_kLp2wFcpb6M,185
79
80
  tensorneko/util/misc.py,sha256=LEvACtGDOX43iK86A8-Cek0S9rbXFR0AtTP1edE3XDI,4701
80
81
  tensorneko/util/reproducibility.py,sha256=sw1vVi7VOnmzQYUocI5x9yKeZoHHiA4A5ja136XolrI,2102
81
82
  tensorneko/util/string_getter.py,sha256=Cq2mDYr3q758xJ9OBTwLDf-b6EMSYwlnNB0-kfsElfs,2491
@@ -85,8 +86,8 @@ tensorneko/visualization/log_graph.py,sha256=NvOwWVc_petXWYdgaHosPFLa43sHBeacbYc
85
86
  tensorneko/visualization/matplotlib.py,sha256=xs9Ssc44ojZX65QU8-fftA7Ug_pBuZ3TBtM8vETNq9w,1568
86
87
  tensorneko/visualization/image_browser/__init__.py,sha256=AtykhAE3bXQS6SOWbeYFeeUE9ts9XOFMvrL31z0LoMg,63
87
88
  tensorneko/visualization/watcher/__init__.py,sha256=Nq752qIYvfRUZ8VctKQRSqhxh5KmFbWcqPfZlijVx6s,379
88
- tensorneko-0.3.16.dist-info/LICENSE,sha256=Vd75kwgJpVuMnCRBWasQzceMlXt4YQL13ikBLy8G5h0,1067
89
- tensorneko-0.3.16.dist-info/METADATA,sha256=Y2dgqx89FzcdEV8hkGrFeTNeCmdJ-YqbYWej5WxRSAg,19998
90
- tensorneko-0.3.16.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
91
- tensorneko-0.3.16.dist-info/top_level.txt,sha256=sZHwlP0iyk7_zHuhRHzSBkdY9yEgyC48f6UVuZ6CvqE,11
92
- tensorneko-0.3.16.dist-info/RECORD,,
89
+ tensorneko-0.3.17.dist-info/LICENSE,sha256=Vd75kwgJpVuMnCRBWasQzceMlXt4YQL13ikBLy8G5h0,1067
90
+ tensorneko-0.3.17.dist-info/METADATA,sha256=cezBL0TH1cdY0Sct7GCGLK9jW0ckUXZIL7PRScTckBg,19998
91
+ tensorneko-0.3.17.dist-info/WHEEL,sha256=g4nMs7d-Xl9-xC9XovUrsDHGXt-FT0E17Yqo92DEfvY,92
92
+ tensorneko-0.3.17.dist-info/top_level.txt,sha256=sZHwlP0iyk7_zHuhRHzSBkdY9yEgyC48f6UVuZ6CvqE,11
93
+ tensorneko-0.3.17.dist-info/RECORD,,