Skip to content

Commit

Permalink
remove tqdm dependency (#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
hirosassa committed May 11, 2024
1 parent 3f72843 commit 34dea8b
Show file tree
Hide file tree
Showing 5 changed files with 699 additions and 647 deletions.
3 changes: 1 addition & 2 deletions gokart/target.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import luigi
import numpy as np
import pandas as pd
from tqdm import tqdm

from gokart.conflict_prevention_lock.task_lock import TaskLockParams, make_task_lock_params
from gokart.conflict_prevention_lock.task_lock_wrappers import wrap_dump_with_lock, wrap_load_with_lock, wrap_remove_with_lock
Expand Down Expand Up @@ -179,7 +178,7 @@ def save(self, df: pd.DataFrame, file_path: str):

split_size = df.values.nbytes // self.max_byte + 1
logger.info(f'saving a large pdDataFrame with split_size={split_size}')
for i, idx in tqdm(list(enumerate(np.array_split(range(df.shape[0]), split_size)))):
for i, idx in list(enumerate(np.array_split(range(df.shape[0]), split_size))):
df.iloc[idx[0] : idx[-1] + 1].to_pickle(os.path.join(dir_path, f'data_{i}.pkl'))

@staticmethod
Expand Down

0 comments on commit 34dea8b

Please sign in to comment.