MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _validate_group_id

Method _validate_group_id

tensorflow/python/util/lock_util.py:110–114  ·  view source on GitHub ↗
(self, group_id)

Source from the content-addressed store, hash-verified

108 c > 0 for g, c in enumerate(self._group_member_counts) if g != group_id)
109
110 def _validate_group_id(self, group_id):
111 if group_id < 0 or group_id >= self._num_groups:
112 raise ValueError(
113 "group_id={} should be between 0 and num_groups={}".format(
114 group_id, self._num_groups))
115
116 class _Context(object):
117 """Context manager helper for `GroupLock`."""

Callers 3

groupMethod · 0.95
acquireMethod · 0.95
releaseMethod · 0.95

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected