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


Python Debug.initFaulthandler方法代码示例

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


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

示例1: set

# 需要导入模块: import Debug [as 别名]
# 或者: from Debug import initFaulthandler [as 别名]
from Util import to_bool
from threading import Condition

InitTypes = set()
Verbose = False  # disables all per-segment log messages
Quiet = False # disables all but error messages

def print(str):
  import __builtin__
  if not Quiet:
    __builtin__.print(str)

print("CRNN SprintControl[pid %i] Python module load" % os.getpid())

rnn.initBetterExchook()
Debug.initFaulthandler(sigusr1_chain=True)  # Sprint also handles SIGUSR1.
rnn.initThreadJoinHack()

# Start Sprint PythonControl interface. {

def init(name, reference, config, sprint_unit=None, version_number=None, callback=None, **kwargs):
  """
  This will be called by Sprint PythonControl.
  But we also call it ourselves e.g. in getSegmentList() and SprintNnPythonLayer.
  :param str name: this specifies the caller. e.g. "Sprint.PythonControl"
  :param reference: this is any object to identify the specific instance of the caller, if there are multiple.
  :param str config: this will be passed over from Sprint. you can configure that via --*.pymod-config.
  :param str sprint_unit: if this is called by Sprint PythonControl, this will specify which specific part
    of Sprint is using this PythonControl, because there can be multiple parts.
    E.g. there is "FeedForwardTrainer", "SegmentwiseNnTrainer" and "NnTrainer.pythonControl".
  :param int|None version_number: if this is called by Sprint PythonControl, this will set the version number.
开发者ID:atuxhe,项目名称:returnn,代码行数:33,代码来源:SprintControl.py


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