Logo
Explore Help
Register Sign In
mirrors/mmclassification
1
0
Fork 0
You've already forked mmclassification
mirror of https://github.com/open-mmlab/mmclassification.git synced 2025-06-03 21:53:55 +08:00
Code Issues Projects Releases Wiki Activity
mmclassification/mmcls/utils/progress.py

11 lines
283 B
Python
Raw Normal View History

[Feature] Add Base Retriever and Image2Image Retriever for retrieval tasks. (#1055) * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * feat: add image retriever * update retriever * fix lint * add hook unit test * Use `register_buffer` to save prototype vectors and add a progress bar during preparing prototype. * update UTs * update UTs * fix typo * modify the hook Co-authored-by: Ezra-Yu <18586273+Ezra-Yu@users.noreply.github.com> Co-authored-by: mzr1996 <mzr1996@163.com>
2022-11-02 17:43:56 +08:00
# Copyright (c) OpenMMLab. All rights reserved.
import mmengine.dist as dist
import rich.progress as progress
def track_on_main_process(sequence, *args, **kwargs):
if not dist.is_main_process():
return sequence
yield from progress.track(sequence, *args, **kwargs)
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 865ms Template: 5ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API