MCPcopy Create free account
hub / github.com/PaddlePaddle/Research / reset

Method reset

NLP/Text2SQL-BASELINE/text2sql/utils/utils.py:49–64  ·  view source on GitHub ↗

reset all setting Args: msg (TYPE): Default is None Returns: TODO Raises: NULL

(self, only_last=False, msg=None)

Source from the content-addressed store, hash-verified

47 self._last = self._start
48
49 def reset(self, only_last=False, msg=None):
50 """reset all setting
51
52 Args:
53 msg (TYPE): Default is None
54
55 Returns: TODO
56
57 Raises: NULL
58 """
59 if msg is not None:
60 self._msg = msg
61 curr_time = time.time()
62 self._last = curr_time
63 if not only_last:
64 self._start = curr_time
65
66 def check(self):
67 """check cost time from start

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected