Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: Show progress when encoding with multiprocessing (encode_multi_process) #1651

Open
MikulasZelinka opened this issue Jul 27, 2022 · 2 comments

Comments

@MikulasZelinka
Copy link

Hi,

when encoding sentences without multiprocessing, it's easy enough to just monitor the progress with tqdm by wrapping the loop (when encoding individual sentences) or just using the built-in progress bar of encode:

def encode(self, sentences: Union[str, List[str], List[int]],
batch_size: int = 32,
show_progress_bar: bool = None,

However, when using encode_multi_process, that isn't easily possible because everything is hidden inside those methods:

def start_multi_process_pool(self, target_devices: List[str] = None):
def encode_multi_process(self, sentences: List[str], pool: Dict[str, object], batch_size: int = 32, chunk_size: int = None):

Would it please be possible to add progress bar(s) for multiprocess encoding?

Either one progress bar for the whole bunch of sequences, or a progress bar per process. Thank you!

@abhishekmamdapure
Copy link

Any update on this ?

@jaanli
Copy link

jaanli commented Apr 16, 2024

+1, this would be super helpful. encode supports this but encode_multi_process does not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants