Skip to content

Commit

Permalink
Update build.py (#692)
Browse files Browse the repository at this point in the history
  • Loading branch information
lxc86739795 committed Apr 5, 2023
1 parent 39887a1 commit 817c748
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion fastreid/data/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,14 @@
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
Expand Down

0 comments on commit 817c748

Please sign in to comment.