Skip to content

Commit 0b2148f

Browse files
committed
environment and import fix
1 parent 7cc9717 commit 0b2148f

15 files changed

+153
-158
lines changed

environment.yml

+137-142
Original file line numberDiff line numberDiff line change
@@ -1,158 +1,153 @@
1-
name: pytorch1.7
1+
name: py38
22
channels:
3-
- simpleitk
4-
- pytorch-nightly
5-
- conda-forge
3+
- pytorch
64
- defaults
5+
- conda-forge
76
dependencies:
87
- _libgcc_mutex=0.1=main
9-
- _pytorch_select=0.2=gpu_0
10-
- absl-py=0.9.0=py38h32f6830_1
8+
- _openmp_mutex=4.5=1_gnu
9+
- absl-py=0.15.0=pyhd3eb1b0_0
10+
- aiohttp=3.8.1=py38h7f8727e_0
11+
- aiosignal=1.2.0=pyhd3eb1b0_0
12+
- async-timeout=4.0.1=pyhd3eb1b0_0
13+
- attrs=21.2.0=pyhd3eb1b0_0
1114
- blas=1.0=mkl
12-
- blinker=1.4=py_1
13-
- brotlipy=0.7.0=py38h1e0a361_1000
15+
- blinker=1.4=py38h06a4308_0
16+
- brotli=1.0.9=he6710b0_2
17+
- brotlipy=0.7.0=py38h27cfd23_1003
1418
- bzip2=1.0.8=h7b6447c_0
15-
- c-ares=1.16.1=h516909a_2
16-
- ca-certificates=2021.1.19=h06a4308_0
17-
- cachetools=4.1.1=py_0
18-
- certifi=2020.12.5=py38h06a4308_0
19-
- cffi=1.14.1=py38he30daa8_0
20-
- chardet=3.0.4=py38h32f6830_1006
21-
- click=7.1.2=pyh9f0ad1d_0
22-
- cryptography=3.0=py38h766eaa4_0
23-
- cudatoolkit=11.0.221=h6bb024c_0
24-
- cycler=0.10.0=py_2
25-
- dbus=1.13.16=hb2f20db_0
26-
- einops=0.3.0=py_0
27-
- expat=2.2.9=he6710b0_2
28-
- ffmpeg=4.2.2=h20bf706_0
29-
- filelock=3.0.12=pyhd3eb1b0_1
30-
- fontconfig=2.13.0=h9420a91_0
31-
- freetype=2.10.4=h5ab3b9f_0
32-
- future=0.18.2=py38h32f6830_1
33-
- gdcm=2.8.9=py38h138f8cb_1
34-
- glib=2.65.0=h3eb4bd4_0
35-
- gmp=6.1.2=h6c8ec71_1
36-
- gnutls=3.6.5=h71b1129_1002
37-
- google-auth=1.20.1=py_0
38-
- google-auth-oauthlib=0.4.1=py_2
39-
- grpcio=1.31.0=py38h2c89da0_0
40-
- gst-plugins-base=1.14.0=hbbd80ab_1
41-
- gstreamer=1.14.0=hb31296c_0
42-
- h5py=2.10.0=py38hd6299e0_1
43-
- hdf5=1.10.6=hb1b8bf9_0
19+
- c-ares=1.17.1=h27cfd23_0
20+
- ca-certificates=2021.10.26=h06a4308_2
21+
- cached-property=1.5.2=hd8ed1ab_1
22+
- cached_property=1.5.2=pyha770c72_1
23+
- cachetools=4.2.2=pyhd3eb1b0_0
24+
- certifi=2021.10.8=py38h06a4308_0
25+
- cffi=1.14.6=py38h400218f_0
26+
- charset-normalizer=2.0.4=pyhd3eb1b0_0
27+
- click=8.0.3=pyhd3eb1b0_0
28+
- cryptography=3.4.8=py38hd23ed53_0
29+
- cudatoolkit=11.3.1=h2bc3f7f_2
30+
- cycler=0.11.0=pyhd3eb1b0_0
31+
- dataclasses=0.8=pyh6d0b6a4_7
32+
- dbus=1.13.18=hb2f20db_0
33+
- einops=0.3.2=pyhd8ed1ab_0
34+
- expat=2.4.1=h2531618_2
35+
- ffmpeg=4.3=hf484d3e_0
36+
- filelock=3.4.2=pyhd8ed1ab_1
37+
- fontconfig=2.13.1=h6c09931_0
38+
- fonttools=4.25.0=pyhd3eb1b0_0
39+
- freetype=2.11.0=h70c0345_0
40+
- frozenlist=1.2.0=py38h7f8727e_0
41+
- fsspec=2021.10.1=pyhd3eb1b0_0
42+
- future=0.18.2=py38_1
43+
- giflib=5.2.1=h7b6447c_0
44+
- glib=2.69.1=h5202010_0
45+
- gmp=6.2.1=h2531618_2
46+
- gnutls=3.6.15=he1e5248_0
47+
- google-auth=1.33.0=pyhd3eb1b0_0
48+
- google-auth-oauthlib=0.4.4=pyhd3eb1b0_0
49+
- grpcio=1.42.0=py38hce63b2e_0
50+
- gst-plugins-base=1.14.0=h8213a91_2
51+
- gstreamer=1.14.0=h28cd5cc_2
52+
- h5py=3.6.0=py38ha0f2276_0
53+
- hdf5=1.10.6=nompi_h3c11f04_101
4454
- icu=58.2=he6710b0_3
45-
- idna=2.10=pyh9f0ad1d_0
46-
- importlib-metadata=1.7.0=py38h32f6830_0
47-
- intel-openmp=2020.1=217
48-
- jpeg=9b=h024ee3a_2
49-
- json-c=0.13.1=h1bed415_0
50-
- kiwisolver=1.2.0=py38hbf85e49_0
55+
- idna=3.3=pyhd3eb1b0_0
56+
- importlib-metadata=4.8.2=py38h06a4308_0
57+
- intel-openmp=2021.4.0=h06a4308_3561
58+
- jpeg=9d=h7f8727e_0
59+
- kiwisolver=1.3.1=py38h2531618_0
5160
- lame=3.100=h7b6447c_0
52-
- lcms2=2.11=h396b838_0
53-
- ld_impl_linux-64=2.33.1=h53a641e_7
54-
- libedit=3.1.20181209=hc058e9b_0
55-
- libffi=3.3=he6710b0_1
56-
- libgcc-ng=9.1.0=hdf63c60_0
57-
- libgfortran-ng=7.3.0=hdf63c60_0
58-
- libjpeg-turbo=2.0.5=h516909a_0
59-
- libopus=1.3.1=h7b6447c_0
61+
- lcms2=2.12=h3be6417_0
62+
- ld_impl_linux-64=2.35.1=h7274673_9
63+
- libffi=3.3=he6710b0_2
64+
- libgcc-ng=9.3.0=h5101ec6_17
65+
- libgfortran-ng=7.5.0=ha8ba4b0_17
66+
- libgfortran4=7.5.0=ha8ba4b0_17
67+
- libgomp=9.3.0=h5101ec6_17
68+
- libiconv=1.15=h63c8f33_5
69+
- libidn2=2.3.2=h7f8727e_0
6070
- libpng=1.6.37=hbc83047_0
61-
- libprotobuf=3.13.0=h8b12597_0
62-
- libstdcxx-ng=9.1.0=hdf63c60_0
63-
- libtiff=4.1.0=h2733197_1
64-
- libuuid=1.0.3=h1bed415_2
71+
- libprotobuf=3.19.1=h4ff587b_0
72+
- libstdcxx-ng=9.3.0=hd4cf53a_17
73+
- libtasn1=4.16.0=h27cfd23_0
74+
- libtiff=4.2.0=h85742a9_0
75+
- libunistring=0.9.10=h27cfd23_0
76+
- libuuid=1.0.3=h7f8727e_2
6577
- libuv=1.40.0=h7b6447c_0
66-
- libvpx=1.7.0=h439df22_0
78+
- libwebp=1.2.0=h89dd481_0
79+
- libwebp-base=1.2.0=h27cfd23_0
6780
- libxcb=1.14=h7b6447c_0
68-
- libxml2=2.9.10=he19cac6_1
69-
- lz4-c=1.9.2=he6710b0_0
70-
- markdown=3.2.2=py_0
71-
- matplotlib=3.1.3=py38_0
72-
- matplotlib-base=3.1.3=py38hef1b27d_0
73-
- mkl=2020.1=217
74-
- mkl-service=2.3.0=py38he904b0f_0
75-
- mkl_fft=1.1.0=py38h23d657b_0
76-
- mkl_random=1.1.1=py38h0573a6f_0
77-
- ncurses=6.2=he6710b0_1
78-
- nettle=3.4.1=hbb512f6_0
79-
- ninja=1.9.0=py38hfd86e86_0
80-
- numpy=1.18.1=py38h4f9e942_0
81-
- numpy-base=1.18.1=py38hde5b4d6_1
82-
- oauthlib=3.0.1=py_0
83-
- olefile=0.46=py_0
84-
- openh264=2.1.0=hd408876_0
85-
- openjpeg=2.3.1=h981e76c_3
86-
- openssl=1.1.1i=h27cfd23_0
87-
- packaging=20.4=py_0
88-
- pcre=8.44=he6710b0_0
89-
- pillow=8.0.1=py38he98fc37_0
90-
- protobuf=3.13.0=py38h950e882_0
91-
- pyasn1=0.4.8=py_0
92-
- pyasn1-modules=0.2.7=py_0
93-
- pycparser=2.20=pyh9f0ad1d_2
94-
- pydicom=2.1.0=pyhd3deb0d_0
95-
- pyjwt=1.7.1=py_0
81+
- libxml2=2.9.12=h03d6c58_0
82+
- lz4-c=1.9.3=h295c915_1
83+
- markdown=3.3.4=py38h06a4308_0
84+
- matplotlib=3.5.0=py38h06a4308_0
85+
- matplotlib-base=3.5.0=py38h3ed280b_0
86+
- mkl=2021.4.0=h06a4308_640
87+
- mkl-service=2.4.0=py38h7f8727e_0
88+
- mkl_fft=1.3.1=py38hd3c417c_0
89+
- mkl_random=1.2.2=py38h51133e4_0
90+
- monai=0.8.0=pyhd8ed1ab_1
91+
- multidict=5.2.0=py38h7f8727e_2
92+
- munkres=1.1.4=py_0
93+
- ncurses=6.3=h7f8727e_2
94+
- nettle=3.7.3=hbbd107a_1
95+
- numpy=1.21.2=py38h20f2e39_0
96+
- numpy-base=1.21.2=py38h79a1101_0
97+
- oauthlib=3.1.1=pyhd3eb1b0_0
98+
- olefile=0.46=pyhd3eb1b0_0
99+
- openh264=2.1.1=h4ff587b_0
100+
- openssl=1.1.1l=h7f8727e_0
101+
- packaging=21.3=pyhd3eb1b0_0
102+
- pcre=8.45=h295c915_0
103+
- pillow=8.4.0=py38h5aabda8_0
104+
- pip=21.2.4=py38h06a4308_0
105+
- protobuf=3.19.1=py38h295c915_0
106+
- pyasn1=0.4.8=pyhd3eb1b0_0
107+
- pyasn1-modules=0.2.8=py_0
108+
- pycparser=2.21=pyhd3eb1b0_0
109+
- pydicom=2.2.2=pyh6c4a22f_0
110+
- pyjwt=2.1.0=py38h06a4308_0
96111
- pynrrd=0.4.2=pyh95af2a2_0
97-
- pyopenssl=19.1.0=py_1
98-
- pyparsing=2.4.7=pyh9f0ad1d_0
112+
- pyopenssl=21.0.0=pyhd3eb1b0_1
113+
- pyparsing=3.0.4=pyhd3eb1b0_0
99114
- pyqt=5.9.2=py38h05f1152_4
100-
- pysocks=1.7.1=py38h32f6830_1
101-
- python=3.8.3=hcff3b4d_0
102-
- python-dateutil=2.8.1=py_0
103-
- python-lmdb=0.98=py38he6710b0_0
104-
- python_abi=3.8=1_cp38
105-
- pytorch=1.8.0.dev20210122=py3.8_cuda11.0.221_cudnn8.0.5_0
106-
- pyyaml=5.3.1=py38h1e0a361_0
115+
- pysocks=1.7.1=py38h06a4308_0
116+
- python=3.8.12=h12debd9_0
117+
- python-dateutil=2.8.2=pyhd3eb1b0_0
118+
- python-lmdb=0.99=py38h709712a_0
119+
- python_abi=3.8=2_cp38
120+
- pytorch=1.10.1=py3.8_cuda11.3_cudnn8.2.0_0
121+
- pytorch-lightning=1.2.10=pyhd8ed1ab_0
122+
- pytorch-mutex=1.0=cuda
123+
- pyyaml=6.0=py38h7f8727e_1
107124
- qt=5.9.7=h5867ecd_1
108-
- readline=8.0=h7b6447c_0
109-
- requests=2.24.0=pyh9f0ad1d_0
110-
- requests-oauthlib=1.3.0=pyh9f0ad1d_0
111-
- rsa=4.6=pyh9f0ad1d_0
112-
- setuptools=51.0.0=py38h06a4308_2
113-
- simpleitk=2.0rc3=py38hf484d3e_0
125+
- readline=8.1.2=h7f8727e_0
126+
- requests=2.27.1=pyhd3eb1b0_0
127+
- requests-oauthlib=1.3.0=py_0
128+
- rsa=4.7.2=pyhd3eb1b0_1
129+
- scipy=1.7.3=py38hc147768_0
130+
- setuptools=58.0.4=py38h06a4308_0
114131
- sip=4.19.13=py38he6710b0_0
115-
- six=1.15.0=py_0
116-
- sqlite=3.31.1=h62c20be_1
117-
- tensorboard=2.3.0=pyh4dce500_0
118-
- tensorboard-plugin-wit=1.6.0=pyh9f0ad1d_0
119-
- tk=8.6.8=hbc83047_0
120-
- torchvision=0.9.0.dev20210122=py38_cu110
121-
- tornado=6.0.4=py38h1e0a361_1
122-
- tqdm=4.48.2=pyh9f0ad1d_0
123-
- typing_extensions=3.7.4.3=py_0
124-
- urllib3=1.25.10=py_0
125-
- werkzeug=1.0.1=pyh9f0ad1d_0
126-
- wheel=0.36.2=pyhd3eb1b0_0
127-
- x264=1!157.20191217=h7b6447c_0
132+
- six=1.16.0=pyhd3eb1b0_0
133+
- sqlite=3.37.0=hc218d9a_0
134+
- tensorboard=2.4.0=pyhc547734_0
135+
- tensorboard-plugin-wit=1.6.0=py_0
136+
- tk=8.6.11=h1ccaba5_0
137+
- torchaudio=0.10.1=py38_cu113
138+
- torchmetrics=0.6.2=pyhd8ed1ab_0
139+
- torchvision=0.11.2=py38_cu113
140+
- tornado=6.1=py38h27cfd23_0
141+
- tqdm=4.62.3=pyhd3eb1b0_1
142+
- typing-extensions=3.10.0.2=hd3eb1b0_0
143+
- typing_extensions=3.10.0.2=pyh06a4308_0
144+
- urllib3=1.26.7=pyhd3eb1b0_0
145+
- werkzeug=2.0.2=pyhd3eb1b0_0
146+
- wheel=0.37.1=pyhd3eb1b0_0
128147
- xz=5.2.5=h7b6447c_0
129-
- yaml=0.2.5=h516909a_0
130-
- zipp=3.1.0=py_0
131-
- zlib=1.2.11=h7b6447c_3
132-
- zstd=1.4.4=h0b5b093_3
133-
- pip:
134-
- aiohttp==3.7.3
135-
- async-timeout==3.0.1
136-
- attrs==20.3.0
137-
- dataclasses==0.6
138-
- fairscale==0.1.5
139-
- fsspec==0.8.4
140-
- itk==5.1.1
141-
- itk-core==5.1.1
142-
- itk-filtering==5.1.1
143-
- itk-io==5.1.1
144-
- itk-numerics==5.1.1
145-
- itk-registration==5.1.1
146-
- itk-segmentation==5.1.1
147-
- monai==0.3.0
148-
- multidict==5.1.0
149-
- nibabel==3.1.1
150-
- omegaconf==2.0.5
151-
- onnxruntime==1.6.0
152-
- pip==21.0.1
153-
- python-graphviz==0.16
154-
- pytorch-lightning==1.2.0.dev0
155-
- torchviz==0.0.1
156-
- yarl==1.6.3
157-
prefix: /home/robertsc/.conda/envs/pytorch1.7
158-
148+
- yaml=0.2.5=h7b6447c_0
149+
- yarl=1.6.3=py38h27cfd23_0
150+
- zipp=3.7.0=pyhd3eb1b0_0
151+
- zlib=1.2.11=h7f8727e_4
152+
- zstd=1.4.9=haebb681_0
153+
prefix: /home/robertsc/.conda/envs/py38
File renamed without changes.

pixel-model/pixelcnn.py pixel_model/pixelcnn.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
from pytorch_lightning.metrics import Accuracy, Precision, Recall
1818
from tqdm import tqdm
1919

20-
from layers import FixupCausalResBlock, PreActFixupCausalResBlock, input_to_stack, stack_to_output, GatedResBlock
20+
from pixel_model.layers import FixupCausalResBlock, PreActFixupCausalResBlock, input_to_stack, stack_to_output, GatedResBlock
21+
from pixel_model.train_helpers import idx_to_one_hot, bits_per_dim, mixup_data, mixup_criterion
2122
from utils.logging_helpers import sub_metric_log_dict
2223
from utils.argparse_helpers import booltype
23-
from train_helpers import idx_to_one_hot, bits_per_dim, mixup_data, mixup_criterion
2424

2525

2626

pixel-model/pixelsnail.py pixel_model/pixelsnail.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
from pytorch_lightning.metrics import Accuracy, Precision, Recall
1818
from tqdm import tqdm
1919

20-
from layers import CausalAttentionPixelBlock, PreActFixupCausalResBlock, input_to_stack, stack_to_output, GatedResBlock
20+
from pixel_model.layers import CausalAttentionPixelBlock, PreActFixupCausalResBlock, input_to_stack, stack_to_output, GatedResBlock
21+
from pixel_model.train_helpers import idx_to_one_hot, bits_per_dim, mixup_data, mixup_criterion
2122
from utils.logging_helpers import sub_metric_log_dict
2223
from utils.argparse_helpers import booltype
23-
from train_helpers import idx_to_one_hot, bits_per_dim, mixup_data, mixup_criterion
2424

2525

2626

pixel-model/sample_embeddings.py pixel_model/sample_embeddings.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
from tqdm import tqdm
1313
from filelock import FileLock
1414

15-
from pixelcnn import PixelCNN
16-
from pixelsnail import PixelSNAIL
15+
from pixel_model.pixelcnn import PixelCNN
16+
from pixel_model.pixelsnail import PixelSNAIL
1717

1818
GPU = torch.device('cuda')
1919

pixel-model/test.py pixel_model/test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import matplotlib.pyplot as plt
33
from torchvision.utils import make_grid
44

5-
from model import CausalConv3dAdd
5+
from pixel_model.layers import CausalConv3dAdd
66

77
if __name__ == '__main__':
88
inp = torch.zeros((1, 3, 20,20,20))

pixel-model/train.py pixel_model/train.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
import torch
55
import pytorch_lightning as pl
66

7-
from pixelcnn import PixelCNN
8-
from pixelsnail import PixelSNAIL
7+
from pixel_model.pixelcnn import PixelCNN
8+
from pixel_model.pixelsnail import PixelSNAIL
99
from utils.load_lmdb_dataset import LMDBDataModule
1010

1111
def parse_arguments():
File renamed without changes.

vqvae/calc_ssim_from_checkpoint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
from einops import rearrange
1111
import torch.nn as nn
1212

13-
from model import VQVAE
13+
from vqvae.model import VQVAE
1414
from utils import CTDataModule
1515
from metrics.evaluate import SSIM3DSlices
1616

vqvae/decode_embeddings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import torch.nn.functional as F
99
from torch.utils.data import DataLoader
1010

11-
from model import VQVAE
11+
from vqvae.model import VQVAE
1212
from utils import CTScanDataset, DepthPadAndCrop
1313

1414
def inverse_softplus(x):

vqvae/extract_embeddings.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import numpy as np
88
from tqdm import tqdm
99

10-
from model import VQVAE
10+
from vqvae.model import VQVAE
1111
from utils import CTDataModule
1212

1313

vqvae/layers.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import torch.nn.functional as F
99
from torch import nn
1010

11-
from evonorm import EvoNorm3DS0
11+
from vqvae.evonorm import EvoNorm3DS0
1212

1313

1414
class EvonormResBlock(nn.Module):

vqvae/model.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from torch import nn
99
from torch.distributions.normal import Normal
1010

11-
from layers import Encoder, Decoder, FixupResBlock, PreActFixupResBlock, EvonormResBlock, Encoder2
11+
from vqvae.layers import Encoder, Decoder, FixupResBlock, PreActFixupResBlock, EvonormResBlock, Encoder2
1212
from utils import ExtractCenterCylinder
1313
from metrics.distribution import Logistic, mixture_nll_loss, generic_nll_loss
1414
from metrics.evaluate import nmse, psnr, SSIM3DSlices

0 commit comments

Comments
 (0)