MCPcopy Create free account
hub / github.com/zai-org/CodeGeeX / main

Function main

codegeex/megatron/tools/collect_env.py:7–19  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

5
6
7def main():
8 s = ""
9 for name in ENV_NAMES:
10 if name in os.environ:
11 value = os.environ[name]
12 s += "{}={}\n".format(name, value)
13 print(f"{name}={value}")
14 else:
15 print(f"{name} is not set")
16
17 # write env vars to .deepspeed_env
18 with open(".deepspeed_env", "w") as f:
19 f.write(s)
20
21
22if __name__ == "__main__":

Callers 1

collect_env.pyFile · 0.70

Calls 1

writeMethod · 0.45

Tested by

no test coverage detected