コード例 #1
0
ファイル: node.py プロジェクト: rsepassi/ray
    def start_ray_processes(self):
        """Start all of the processes on the node."""
        set_temp_root(self._ray_params.temp_dir)
        logger.info(
            "Process STDOUT and STDERR is being redirected to {}.".format(
                get_logs_dir_path()))

        # If this is the head node, start the relevant head node processes.
        if self._redis_address is None:
            self.start_redis()
            self.start_monitor()
            self.start_raylet_monitor()

        self.start_plasma_store()
        self.start_raylet()

        if self._ray_params.include_log_monitor:
            self.start_log_monitor()
        if self._ray_params.include_webui:
            self.start_ui()
コード例 #2
0
ファイル: default_worker.py プロジェクト: valldabo2/ray
    args = parser.parse_args()

    info = {
        "node_ip_address": args.node_ip_address,
        "redis_address": args.redis_address,
        "store_socket_name": args.object_store_name,
        "manager_socket_name": args.object_store_manager_name,
        "local_scheduler_socket_name": args.local_scheduler_name,
        "raylet_socket_name": args.raylet_name
    }

    logging.basicConfig(level=logging.getLevelName(args.logging_level.upper()),
                        format=args.logging_format)

    # Override the temporary directory.
    tempfile_services.set_temp_root(args.temp_dir)

    ray.worker.connect(info,
                       mode=ray.WORKER_MODE,
                       use_raylet=(args.raylet_name is not None))

    error_explanation = """
  This error is unexpected and should not have happened. Somehow a worker
  crashed in an unanticipated way causing the main_loop to throw an exception,
  which is being caught in "python/ray/workers/default_worker.py".
  """

    try:
        # This call to main_loop should never return if things are working.
        # Most exceptions that are thrown (e.g., inside the execution of a
        # task) should be caught and handled inside of the call to