82f9c7014e2d0acd3e3869066f5dc3142ec9e7a7,python/ray/autoscaler/_private/command_runner.py,KubernetesCommandRunner,_home,#KubernetesCommandRunner#,250
Before Change
// TODO (Dmitri): Think about how to use the node"s HOME variable
// without making an extra kubectl exec call.
if self._home_cached is None:
cmd = self.kubectl + [
"exec", "-it", self.node_id, "--", "printenv", "HOME"
]
joined_cmd = " ".join(cmd)
raw_out = self.process_runner.check_output(joined_cmd, shell=True)
self._home_cached = raw_out.decode().strip("\n\r")
return self._home_cached
After Change
if self._home_cached is not None:
return self._home_cached
for _ in range(MAX_HOME_RETRIES - 1):
try:
self._home_cached = self._try_to_get_home()
return self._home_cached
except Exception:
// TODO (Dmitri): Identify the exception we"re trying to avoid.
logger.info("Error reading container"s home directory. "
f"Retrying in {HOME_RETRY_DELAY_S} seconds.")
time.sleep(HOME_RETRY_DELAY_S)
// Last try
self._home_cached = self._try_to_get_home()
return self._home_cached
def _try_to_get_home(self):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: ray-project/ray
Commit Name: 82f9c7014e2d0acd3e3869066f5dc3142ec9e7a7
Time: 2020-12-17
Author: 62982571+Gekho457@users.noreply.github.com
File Name: python/ray/autoscaler/_private/command_runner.py
Class Name: KubernetesCommandRunner
Method Name: _home
Project Name: dmlc/gluon-nlp
Commit Name: 2c5f22199b46837b9801378ce172dcd13f125769
Time: 2018-07-17
Author: leonard@lausen.nl
File Name: gluonnlp/base.py
Class Name:
Method Name:
Project Name: chainer/chainercv
Commit Name: 515aeca78379b6577974a78cd0df4eed78f5bfae
Time: 2017-07-06
Author: yuyuniitani@gmail.com
File Name: setup.py
Class Name:
Method Name: