Update build.py

pull/692/head
Xinchen Liu 2023-04-04 14:36:09 +08:00 committed by GitHub
parent 39887a102e
commit d2544d5b5d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -8,7 +8,14 @@ import logging
import os
import torch
from torch._six import string_classes
TORCH_MAJOR = int(torch.__version__.split('.')[0])
TORCH_MINOR = int(torch.__version__.split('.')[1])
if TORCH_MAJOR == 1 and TORCH_MINOR < 8:
from torch._six import string_classes
else:
string_classes = str
from collections import Mapping
from fastreid.config import configurable