MCPcopy Create free account
hub / github.com/PaddlePaddle/Paddle / get

Method get

python/paddle/utils/environments.py:45–53  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

43 self._cached_value: T | None = None
44
45 def get(self) -> T:
46 _current_env_value = os.getenv(self.name)
47 if (
48 self._cached_value is None
49 or self._last_env_value != _current_env_value
50 ):
51 self._cached_value = self.parse_from_string()
52 self._last_env_value = _current_env_value
53 return self._cached_value
54
55 def set(self, value: T) -> None:
56 os.environ[self.name] = self.convert_to_string(value)

Callers 15

__repr__Method · 0.95
_conv2d_flopsFunction · 0.45
_gelu_flopsFunction · 0.45
_layer_norm_flopsFunction · 0.45
_matmul_flopsFunction · 0.45
_matmul_v2_flopsFunction · 0.45
_relu_class_flopsFunction · 0.45
_softmax_flopsFunction · 0.45
_pool_flopsFunction · 0.45
_get_downloadFunction · 0.45
__init__Method · 0.45

Calls 1

parse_from_stringMethod · 0.95

Tested by

no test coverage detected