当前位置: 首页>>代码示例>>Python>>正文


Python progressbar.DynamicMessage方法代码示例

本文整理汇总了Python中progressbar.DynamicMessage方法的典型用法代码示例。如果您正苦于以下问题:Python progressbar.DynamicMessage方法的具体用法?Python progressbar.DynamicMessage怎么用?Python progressbar.DynamicMessage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在progressbar的用法示例。


在下文中一共展示了progressbar.DynamicMessage方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: create_progress_bar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import DynamicMessage [as 别名]
def create_progress_bar(dynamic_msg=None):
    # Taken from Andreas Rueckle.
    # usage:
    #   bar = _create_progress_bar('loss')
    #   L = []
    #   for i in bar(iterable):
    #       ...
    #       L.append(...)
    #
    #   bar.dynamic_messages['loss'] = np.mean(L)
    widgets = [
        ' [batch ', progressbar.SimpleProgress(), '] ',
        progressbar.Bar(),
        ' (', progressbar.ETA(), ') '
    ]
    if dynamic_msg is not None:
        widgets.append(progressbar.DynamicMessage(dynamic_msg))
    return progressbar.ProgressBar(widgets=widgets) 
开发者ID:UKPLab,项目名称:e2e-nlg-challenge-2017,代码行数:20,代码来源:timing.py

示例2: _make_progressbar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import DynamicMessage [as 别名]
def _make_progressbar(self, N):
        """ Returns a progressbar to use during optimization"""

        if self.max_ind_shift is not None:

            bar = progressbar.ProgressBar(widgets=[
                ' ', progressbar.DynamicMessage('ObjectiveFn'),
                ' ', progressbar.DynamicMessage('ObjectiveFn_Normalized'),
                ' Iteration: ',
                ' ', progressbar.Counter(), '/%d' % N,
                ' ', progressbar.AdaptiveETA(),
            ], max_value=N)

        else:

            bar = progressbar.ProgressBar(widgets=[
                ' ', progressbar.DynamicMessage('ObjectiveFn'),
                ' Iteration: ',
                ' ', progressbar.Counter(), '/%d' % N,
                ' ', progressbar.AdaptiveETA(),
            ], max_value=N)

        return bar 
开发者ID:fancompute,项目名称:angler,代码行数:25,代码来源:optimization.py

示例3: _create_progress_bar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import DynamicMessage [as 别名]
def _create_progress_bar(dynamic_msg=None):
    widgets = [
        ' [batch ', progressbar.SimpleProgress(), '] ',
        progressbar.Bar(),
        ' (', progressbar.ETA(), ') '
    ]
    if dynamic_msg is not None:
        widgets.append(progressbar.DynamicMessage(dynamic_msg))
    return progressbar.ProgressBar(widgets=widgets) 
开发者ID:UKPLab,项目名称:iwcs2017-answer-selection,代码行数:11,代码来源:__init__.py

示例4: make_widget

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import DynamicMessage [as 别名]
def make_widget():
    widgets = [progressbar.Percentage(), ' ', progressbar.SimpleProgress(), ' ', 
                                 progressbar.Bar(left = '[', right = ']'), ' ', progressbar.ETA(), ' ', 
                                 progressbar.DynamicMessage('LOSS'), ' ',  progressbar.DynamicMessage('PREC'), ' ',
                                 progressbar.DynamicMessage('REC')]
    bar = progressbar.ProgressBar(widgets = widgets)
    return bar


### Find nearest timestamps ### 
开发者ID:illidanlab,项目名称:urgent-care-comparative,代码行数:12,代码来源:utilities.py

示例5: make_progressbar

# 需要导入模块: import progressbar [as 别名]
# 或者: from progressbar import DynamicMessage [as 别名]
def make_progressbar(max_value, show_output):
    widgets = [
        progressbar.Timer(format='Time: %(elapsed)s'),
        ' |',
        progressbar.Percentage(),
        progressbar.Bar(),
        ' ',
        progressbar.ETA(),
    ]

    if show_output:
        widgets.extend([' | ', progressbar.DynamicMessage('loss')])

    return progressbar.ProgressBar(max_value=max_value, widgets=widgets) 
开发者ID:itdxer,项目名称:neupy,代码行数:16,代码来源:iters.py


注:本文中的progressbar.DynamicMessage方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。