AttributeError: module ‘torch.cuda’ has no attribute ‘amp’

Issue : AttributeError: module ‘torch.cuda’ has no attribute ‘amp’

Traceback (most recent call last):
File “tools/train_net.py”, line 15, in
from maskrcnn_benchmark.data import make_data_loader
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/data/ init .py”, line 2, in
from .build import make_data_loader
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/data/build.py”, line 11, in
from . import datasets as D
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/data/datasets/ init .py”, line 3, in
from .coco import COCODataset
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/data/datasets/coco.py”, line 6, in
from maskrcnn_benchmark.structures.segmentation_mask import SegmentationMask
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/structures/segmentation_mask.py”, line 5, in
from maskrcnn_benchmark.layers.misc import interpolate
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/layers/ init .py”, line 10, in
from .nms import nms
File “/miniconda3/lib/python3.7/site-packages/maskrcnn_benchmark/layers/nms.py”, line 5, in
from apex import amp
File “/miniconda3/lib/python3.7/site-packages/apex/ init .py”, line 23, in
from . import transformer
File “/miniconda3/lib/python3.7/site-packages/apex/transformer/ init .py”, line 1, in
from apex.transformer import amp
File “/miniconda3/lib/python3.7/site-packages/apex/transformer/amp/ init .py”, line 1, in
from apex.transformer.amp.grad_scaler import GradScaler
File “/miniconda3/lib/python3.7/site-packages/apex/transformer/amp/grad_scaler.py”, line 8, in
class GradScaler(torch.cuda.amp.GradScaler):
AttributeError: module ‘torch.cuda’ has no attribute ‘amp’

Environment:
GPU : RTX 8000
CUDA: 10.0
Pytorch 1.0.1
torchvision 0.2.2
apex 0.1

Question:

Same application is working fine in Tesla T4 CUDA10.0 directly on the same software environment at the GPU server (without using docker image)

If i use RTX 8000 CUDA 10.0 on the same software environment, I am getting error " AttributeError: module ‘torch.cuda’ has no attribute ‘amp’ "

What is the issue? How can i solve it

This subforum is not for support of pytorch. You might get better help posting on the pytorch discussion forum. Searching there, there are similar reports like this one that may give some hints.

Outside my area of expertise. Existing discussions on this error message at the PyTorch forum and GitHub appear to suggest upgrading to a PyTorch version >= 1.5. As Robert Crovella already indicated, this is not the proper venue for PyTorch questions.