示例#1
0
文件: metrics.py 项目: zwcdp/KBRD
 def _lock(self):
     if hasattr(self.metrics, 'get_lock'):
         # use the shared_table's lock
         return self.metrics.get_lock()
     else:
         # otherwise do nothing
         return no_lock()
示例#2
0
文件: metrics.py 项目: ahiroto/ParlAI
 def _lock(self):
     if hasattr(self.metrics, 'get_lock'):
         # use the shared_table's lock
         return self.metrics.get_lock()
     else:
         # otherwise do nothing
         return no_lock()