lablup / lablup/backend.ai

Refactor client SDK progress bar for vfolder upload and download func APIs

Open
#344 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
670
Forks
183
Avg merge
17h 7m
Merged PRs (30d)
358

Description

The Python client SDK's vfolder upload and download commands display a progress bar when executed in a terminal using `tqdm`. The issue is that the functional API layer directly uses `tqdm`, so it may show unwanted stdout outputs when used as a library, though this is controllable using `show_progress` argument. This is a leak of abstraction.

By the design principle, all terminal manipulation and console outputs should be done inside `ai.backend.client.cli` (and `ai.backend.client.output`) only, while `ai.backend.client.func` should only provide a programming interface without console outputs (but it may include use of `logging` because logging policy could be controlled by the host program).

- Let's move invocation of `tqdm` to `ai.backend.client.cli` and/or `ai.backend.client.output`.
- Let's make a simple progress reporter abstraction so that the functional implementation still could provide the progress information and the CLI output handler could receive it.

JIRA Issue: BA-279

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.