MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / _check_env_variable

Function _check_env_variable

astroclip/astrodino/distributed.py:149–154  ·  view source on GitHub ↗
(key: str, new_value: str)

Source from the content-addressed store, hash-verified

147
148
149def _check_env_variable(key: str, new_value: str):
150 # Only check for difference with preset environment variables
151 if key in os.environ and os.environ[key] != new_value:
152 raise RuntimeError(
153 f"Cannot export environment variables as {key} is already set"
154 )
155
156
157class _TorchDistributedEnvironment:

Callers 2

exportMethod · 0.85
enableFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected