MCPcopy
hub / github.com/facebookresearch/dlrm / env2int

Function env2int

extend_distributed.py:39–44  ·  view source on GitHub ↗
(env_list, default=-1)

Source from the content-addressed store, hash-verified

37
38
39def env2int(env_list, default=-1):
40 for e in env_list:
41 val = int(os.environ.get(e, -1))
42 if val >= 0:
43 return val
44 return default
45
46
47def get_my_slice(n):

Callers 1

init_distributedFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected