Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
add logging
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikb11 authored and Borda committed Mar 10, 2021
1 parent f0d59fc commit 288cc6e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flash/core/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import logging
import os.path
import zipfile
from typing import Any, Type
Expand Down Expand Up @@ -42,8 +42,7 @@ def download_file(url: str, path: str, verbose: bool = False) -> None:
chunk_size = 1024
num_bars = int(file_size / chunk_size)
if verbose:
print(dict(file_size=file_size))
print(dict(num_bars=num_bars))
logging.info(f'file size: {dict(file_size=file_size)} \n # bars: {dict(num_bars=num_bars)}')
with open(local_filename, 'wb') as fp:
for chunk in tq(
r.iter_content(chunk_size=chunk_size),
Expand Down

0 comments on commit 288cc6e

Please sign in to comment.