MCPcopy
hub / github.com/ray-project/ray / _get_usage_set

Function _get_usage_set

python/ray/_common/usage/usage_lib.py:196–210  ·  view source on GitHub ↗
(gcs_client, set_name: str)

Source from the content-addressed store, hash-verified

194
195
196def _get_usage_set(gcs_client, set_name: str) -> Set[str]:
197 try:
198 result = set()
199 usages = gcs_client.internal_kv_keys(
200 set_name.encode(),
201 namespace=usage_constant.USAGE_STATS_NAMESPACE.encode(),
202 )
203 for usage in usages:
204 usage = usage.decode("utf-8")
205 result.add(usage[len(set_name) :])
206
207 return result
208 except Exception as e:
209 logger.debug(f"Failed to get usage set {set_name}, {e}")
210 return set()
211
212
213def _put_library_usage(library_usage: str):

Callers 2

Calls 4

encodeMethod · 0.45
decodeMethod · 0.45
addMethod · 0.45
debugMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…