gpauloski / kfac-pytorch

Distributed K-FAC Preconditioner for PyTorch
MIT License
76 stars 25 forks source link

The problem of this new edition project #86

Closed Elec-coder closed 1 year ago

Elec-coder commented 1 year ago

How did you install K-FAC and PyTorch?

$ pip install -e .
$ pip install -r examples/requirements.txt

What version of commit are you using?

0.4.1

Describe the problem.

Hi gpauloski, when I running the new edition of this project, I encountered the following problems, Traceback (most recent call last): File "torch_cifar10_resnet.py", line 16, in import examples.vision.datasets as datasets File "/home/qzy/KFAC/kfac-pytorch-main/examples/vision/datasets.py", line 15, in T = tuple[torch.Tensor, torch.Tensor] TypeError: 'type' object is not subscriptable Traceback (most recent call last): File "torch_cifar10_resnet.py", line 16, in import examples.vision.datasets as datasets File "/home/qzy/KFAC/kfac-pytorch-main/examples/vision/datasets.py", line 15, in T = tuple[torch.Tensor, torch.Tensor] TypeError: 'type' object is not subscriptable Traceback (most recent call last): File "torch_cifar10_resnet.py", line 16, in import examples.vision.datasets as datasets File "/home/qzy/KFAC/kfac-pytorch-main/examples/vision/datasets.py", line 15, in T = tuple[torch.Tensor, torch.Tensor] TypeError: 'type' object is not subscriptable Traceback (most recent call last): File "torch_cifar10_resnet.py", line 16, in import examples.vision.datasets as datasets File "/home/qzy/KFAC/kfac-pytorch-main/examples/vision/datasets.py", line 15, in T = tuple[torch.Tensor, torch.Tensor]

The environment information is Collecting env info... PyTorch version: 1.12.1+cu102 Is debug build: False CUDA used to build PyTorch: 10.2 ROCM used to build PyTorch: N/A

OS: CentOS Linux release 7.8.2003 (Core) (x86_64) GCC version: (GCC) 7.3.1 20180303 (Red Hat 7.3.1-5) Clang version: Could not collect CMake version: version 3.14.3 Libc version: glibc-2.17

Python version: 3.8.13 (default, Mar 28 2022, 11:38:47) [GCC 7.5.0] (64-bit runtime) Python platform: Linux-3.10.0-1127.13.1.el7.x86_64-x86_64-with-glibc2.17 Is CUDA available: True CUDA runtime version: 10.1.243 GPU models and configuration: GPU 0: Tesla V100-PCIE-16GB GPU 1: Tesla V100-PCIE-16GB GPU 2: Tesla V100-PCIE-16GB GPU 3: Tesla V100-PCIE-16GB

Nvidia driver version: 495.29.05 cuDNN version: Probably one of the following: /usr/lib64/libcudnn.so.7.6.5 /usr/local/cuda-10.1/targets/x86_64-linux/lib/libcudnn.so.7.6.5_bak /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_infer.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_adv_train.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_cnn_infer.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_cnn_train.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_ops_infer.so.8.3.0 /usr/local/cuda-10.2/targets/x86_64-linux/lib/libcudnn_ops_train.so.8.3.0 HIP runtime version: N/A MIOpen runtime version: N/A Is XNNPACK available: True

Versions of relevant libraries: [pip3] kfac-pytorch==0.4.1 [pip3] mypy==0.982 [pip3] mypy-extensions==0.4.3 [pip3] numpy==1.23.3 [pip3] torch==1.12.1 [pip3] torchdata==0.4.1 [pip3] torchinfo==1.5.2 [pip3] torchtext==0.13.1 [pip3] torchvision==0.13.1 [conda] kfac-pytorch 0.4.1 pypi_0 pypi [conda] numpy 1.23.3 pypi_0 pypi [conda] torch 1.12.1 pypi_0 pypi [conda] torchdata 0.4.1 pypi_0 pypi [conda] torchinfo 1.5.2 pypi_0 pypi [conda] torchtext 0.13.1 pypi_0 pypi [conda] torchvision 0.13.1 pypi_0 pypi

Global rank 0 initialized: local_rank = 0, world_size = 4 Global rank 1 initialized: local_rank = 1, world_size = 4 Global rank 2 initialized: local_rank = 2, world_size = 4 Global rank 3 initialized: local_rank = 3, world_size = 4

The old edition of this project does not exist this problem. Thank you.

gpauloski commented 1 year ago

Slicing on tuples (like tuple) was added in Python 3.9. I've updated the typing to be >=3.7 compatible in examples/ in PR #87.

Elec-coder commented 1 year ago

Thank you!