mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
TqdmThreadPoolExecutor => ThreadPoolExecutor
- Fixes https://github.com/iterative/dvc/pull/2703#discussion_r341763150
This commit is contained in:
@@ -3,12 +3,10 @@ from __future__ import print_function
|
||||
import logging
|
||||
import sys
|
||||
from tqdm import tqdm
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from funcy import merge
|
||||
from dvc.utils import env2bool
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
TqdmThreadPoolExecutor = ThreadPoolExecutor
|
||||
|
||||
|
||||
class Tqdm(tqdm):
|
||||
|
||||
+3
-2
@@ -4,6 +4,7 @@ import stat
|
||||
import errno
|
||||
import logging
|
||||
from functools import partial
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
|
||||
from shortuuid import uuid
|
||||
|
||||
@@ -29,7 +30,7 @@ from dvc.utils import (
|
||||
)
|
||||
from dvc.config import Config
|
||||
from dvc.exceptions import DvcException, DownloadError, UploadError
|
||||
from dvc.progress import Tqdm, TqdmThreadPoolExecutor
|
||||
from dvc.progress import Tqdm
|
||||
|
||||
from dvc.path_info import PathInfo
|
||||
|
||||
@@ -359,7 +360,7 @@ class RemoteLOCAL(RemoteBASE):
|
||||
return 0
|
||||
|
||||
if jobs > 1:
|
||||
with TqdmThreadPoolExecutor(max_workers=jobs) as executor:
|
||||
with ThreadPoolExecutor(max_workers=jobs) as executor:
|
||||
fails = sum(executor.map(func, *plans))
|
||||
else:
|
||||
fails = sum(map(func, *plans))
|
||||
|
||||
Reference in New Issue
Block a user