Exemplo n.º 1
0
def start_scheduler(scheduler_address, cleanup):
  """This method starts a scheduler process.

  Args:
    scheduler_address (str): The ip address and port to use for the scheduler.
    cleanup (bool): True if using Ray in local mode. If cleanup is true, then
      this process will be killed by serices.cleanup() when the Python process
      that imported services exits.
  """
  scheduler_port = scheduler_address.split(":")[1]
  p = subprocess.Popen(["scheduler", scheduler_address, "--log-file-name", config.get_log_file_path("scheduler-" + scheduler_port + ".log")], env=_services_env)
  if cleanup:
    all_processes.append(p)
Exemplo n.º 2
0
def start_scheduler(scheduler_address, cleanup):
    """This method starts a scheduler process.

  Args:
    scheduler_address (str): The ip address and port to use for the scheduler.
    cleanup (bool): True if using Ray in local mode. If cleanup is true, then
      this process will be killed by serices.cleanup() when the Python process
      that imported services exits.
  """
    scheduler_port = scheduler_address.split(":")[1]
    p = subprocess.Popen([
        "scheduler", scheduler_address, "--log-file-name",
        config.get_log_file_path("scheduler-" + scheduler_port + ".log")
    ],
                         env=_services_env)
    if cleanup:
        all_processes.append(p)
Exemplo n.º 3
0
def start_objstore(scheduler_address, node_ip_address, cleanup):
    """This method starts an object store process.

  Args:
    scheduler_address (str): The ip address and port of the scheduler to connect
      to.
    node_ip_address (str): The ip address of the node running the object store.
    cleanup (bool): True if using Ray in local mode. If cleanup is true, then
      this process will be killed by serices.cleanup() when the Python process
      that imported services exits.
  """
    random_string = "".join(
        random.choice(string.ascii_uppercase + string.digits)
        for _ in range(10))
    p = subprocess.Popen([
        "objstore", scheduler_address, node_ip_address, "--log-file-name",
        config.get_log_file_path("-".join(["objstore", random_string]) +
                                 ".log")
    ],
                         env=_services_env)
    if cleanup:
        all_processes.append(p)
Exemplo n.º 4
0
def start_objstore(scheduler_address, node_ip_address, cleanup):
  """This method starts an object store process.

  Args:
    scheduler_address (str): The ip address and port of the scheduler to connect
      to.
    node_ip_address (str): The ip address of the node running the object store.
    cleanup (bool): True if using Ray in local mode. If cleanup is true, then
      this process will be killed by serices.cleanup() when the Python process
      that imported services exits.
  """
  random_string = "".join(random.choice(string.ascii_uppercase + string.digits) for _ in range(10))
  p = subprocess.Popen(["objstore", scheduler_address, node_ip_address, "--log-file-name", config.get_log_file_path("-".join(["objstore", random_string]) + ".log")], env=_services_env)
  if cleanup:
    all_processes.append(p)