Remove import fallbacks.

This commit is contained in:
Aymeric Augustin
2019-12-22 18:19:07 +01:00
parent 798b3b3899
commit 75a23d24af
4 changed files with 3 additions and 29 deletions

View File

@@ -15,6 +15,7 @@ from contextlib import contextmanager
from functools import partial, wraps
from hashlib import sha256
from io import open
from urllib.parse import urlparse
import boto3
import requests
@@ -65,10 +66,6 @@ except ImportError:
)
default_cache_path = os.path.join(torch_cache_home, "transformers")
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
try:
from pathlib import Path