Skip to content

Commit 84f52dd

Browse files
Merge pull request #170 from ArnauMiro/169-remove_tqdm
removed tqdm
2 parents 8c872d7 + 40cab67 commit 84f52dd

File tree

2 files changed

+4
-8
lines changed

2 files changed

+4
-8
lines changed

Diff for: Examples/example_dataset.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,8 @@
6161
'var2' : {'idim':1,'value':var2},
6262
},
6363
# Now we add the fields, i.e., the actual data to compute
64-
# things. So K has ndim = 2 as there are two extra dimensions
65-
# other than the number of points
66-
K = {'ndim':2,'value':K}
64+
# things. So K has ndim = 1 as there is only one field
65+
K = {'ndim':1,'value':K}
6766
)
6867
print(d)
6968

Diff for: pyLOM/NN/utils.py

+2-5
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
from torch import Generator, randperm, default_generator
1414
from itertools import product, accumulate
1515
from typing import List, Optional, Tuple, cast, Sequence, Union, Callable
16-
from tqdm import tqdm
1716

1817
from . import DEVICE
1918
from ..utils.cr import cr
@@ -688,8 +687,7 @@ def map(self, function: Callable, fn_kwargs: dict = {}, batched: bool = False, b
688687

689688
if not batched:
690689
batch_size = 1
691-
pbar = tqdm(range(0, len(self), batch_size), desc="Mapping dataset", unit="iters")
692-
for i in pbar:
690+
for i in range(0, len(self), batch_size):
693691
batch = self[i:i + batch_size]
694692
if self.variables_in is not None:
695693
inputs, outputs = batch
@@ -733,8 +731,7 @@ def filter(
733731
if not batched:
734732
batch_size = 1
735733
indices = []
736-
pbar = tqdm(range(0, len(self), batch_size), desc="Filtering dataset", unit="iters")
737-
for i in pbar:
734+
for i in range(0, len(self), batch_size):
738735
batch = self[i:i + batch_size]
739736
if self.variables_in is not None:
740737
inputs, outputs = batch

0 commit comments

Comments
 (0)