sciv 0.0.90__py3-none-any.whl → 0.0.91__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.
@@ -8,6 +8,7 @@ import numpy as np
8
8
  import pandas as pd
9
9
 
10
10
  from anndata import AnnData
11
+ from torch import OutOfMemoryError
11
12
 
12
13
  from .. import util as ul
13
14
  from ..tool import umap, tsne
@@ -126,11 +127,17 @@ def poisson_vi(
126
127
  if model_dir is not None:
127
128
  if os.path.exists(os.path.join(model_dir, "model.pt")):
128
129
  ul.log(__name__).info(f"Due to the existence of file `model.pt`, it is loaded by default.")
130
+
129
131
  try:
130
132
  model = scvi.external.POISSONVI.load(model_dir, adata=adata)
131
- except FileExistsError as fee:
132
- ul.log(__name__).error(f"File `model.pt` failed to load, you can execute `Poisson VI` again by deleting file `model.pt` ({model_dir}/model.pt).\n {fee}")
133
- raise ValueError(f"File `model.pt` failed to load, you can execute `Poisson VI` again by deleting file `model.pt` ({model_dir}/model.pt).")
133
+ except OutOfMemoryError as ome:
134
+ ul.log(__name__).warning(f"GPU failed to run, try to switch to CPU running.\n {ome}")
135
+
136
+ try:
137
+ model = scvi.external.POISSONVI.load(model_dir, adata=adata, accelerator="cpu", devices="cpu")
138
+ except Exception as e:
139
+ ul.log(__name__).error(f"File `model.pt` failed to load, you can execute `Poisson VI` again by deleting file `model.pt` ({model_dir}/model.pt).\n {e}")
140
+ raise ValueError(f"File `model.pt` failed to load, you can execute `Poisson VI` again by deleting file `model.pt` ({model_dir}/model.pt).")
134
141
  else:
135
142
  ul.file_method(__name__).makedirs(model_dir)
136
143
  model = __train__()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sciv
3
- Version: 0.0.90
3
+ Version: 0.0.91
4
4
  Summary: Unveiling the pivotal cell types involved in variant function regulation at a single-cell resolution
5
5
  Project-URL: github, https://github.com/YuZhengM/sciv
6
6
  Author-email: Zheng-Min Yu <yuzmbio@163.com>
@@ -24,7 +24,7 @@ sciv/preprocessing/_anndata_.py,sha256=3d1cHFs1YA9UZkIPE089nZHFi-DjK-c1fRyi2shfS
24
24
  sciv/preprocessing/_gencode_.py,sha256=HKhRgK76khGepdv4FaKiOvTys1uJTbvIyrKUta5W0K8,2108
25
25
  sciv/preprocessing/_gsea_.py,sha256=AH_PpUNfMN7WkF0pqAuUhEC6qZwKrtQm6VaaYu6JLfI,3803
26
26
  sciv/preprocessing/_scanpy_.py,sha256=flC10W5YPgJE5Ccxt5hP8qW3Q3cOi8DZ36Z1j9D3oNA,11481
27
- sciv/preprocessing/_scvi_.py,sha256=ZIDkQ_4deYmzSMiAbu5C3j_jMMl7hBTFLCBXHCNj3B4,10332
27
+ sciv/preprocessing/_scvi_.py,sha256=FcRdQRkQulnKakldJ1y8HsGB9kJK3BNO-HbE7A92Bhc,10660
28
28
  sciv/preprocessing/_snapatac_.py,sha256=Dq8CHF7Psl3CQszaEokQYO56Oe2uzyWOy_cGlaOywfc,27798
29
29
  sciv/tool/__init__.py,sha256=WXzHkWt6RgBC3qqD-98nR5wQmt6oC850ox_VpMrapSU,2468
30
30
  sciv/tool/_algorithm_.py,sha256=yTImeGMWK6Y2gxygR90bqRF1vkvU857l5M9A_Q_VoZI,49839
@@ -33,7 +33,7 @@ sciv/tool/_random_walk_.py,sha256=lnMiJyDuqDB75l9IkFLr7bIgKYhWxlBdIcExSErpQNw,48
33
33
  sciv/util/__init__.py,sha256=nOxZ8if27X7AUJ6hZwTwxOJwIBJb0obWlHjqCzjg_Gc,1964
34
34
  sciv/util/_constant_.py,sha256=w0wKQd8guLd1ZTW24_5aECrWsIWDiNQmEpLsWlHar1A,3000
35
35
  sciv/util/_core_.py,sha256=ZD2uSnEBHVu0i9TmXWzri_3bXZzYKnIZk818gW3zadE,14751
36
- sciv-0.0.90.dist-info/METADATA,sha256=0yOyKQwEYMys8J6KodKgk2FORBN2SZQhRmiTF5je2FI,3465
37
- sciv-0.0.90.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
38
- sciv-0.0.90.dist-info/licenses/LICENSE,sha256=4UvHVf3qCOZjHLs4LkYz8u96XRpXnZrpTKrkUQPs5_A,1075
39
- sciv-0.0.90.dist-info/RECORD,,
36
+ sciv-0.0.91.dist-info/METADATA,sha256=sCohu-lYE2ZeRrPcU9zYsKnrY9WrjC5l1St-aYQZUxM,3465
37
+ sciv-0.0.91.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
38
+ sciv-0.0.91.dist-info/licenses/LICENSE,sha256=4UvHVf3qCOZjHLs4LkYz8u96XRpXnZrpTKrkUQPs5_A,1075
39
+ sciv-0.0.91.dist-info/RECORD,,
File without changes